AlmuraDev / Almura

The official mod of the Almura Client and Server.
http://www.almuramc.com
Other
16 stars 10 forks source link

Looking For Dev: Re-Implement spawn Twins ability for Farm Animals #485

Closed Dockter closed 6 years ago

Dockter commented 6 years ago

The following animals need to have the "canSpawnTwins" ability re-implemented. Previously we had it for Cows, Chickens and Pigs.

Method: We had implemented canSpawnTwins here: https://github.com/AlmuraDev/Almura/blob/1.7.10/src/main/java/com/almuradev/almura/mixin/entity/animal/MixinEntityAnimal.java

We had "Overwrite" the "spawnBaby" method here: https://github.com/AlmuraDev/Almura/blob/1.7.10/src/main/java/com/almuradev/almura/mixin/entity/ai/MixinEntityAIMate.java . We should be able to do a direct targetted injection into "EntityAIMate". Be advised, SpongeCommon has a mixin into this class already here: https://github.com/SpongePowered/SpongeCommon/blob/stable-7/src/main/java/org/spongepowered/common/mixin/core/entity/ai/MixinEntityAIMate.java#L82

Previously I used a hard-coded itemStack to trigger the spawnTwin ability here: https://github.com/AlmuraDev/Almura/blob/1.7.10/src/main/java/com/almuradev/almura/mixin/entity/animal/MixinEntityChicken.java#L33

Looking for similar implementation, would be better if the spawnTwin was in the content loader in some form.

Dockter commented 6 years ago

This has been re-implemented to my satisfaction as of 11/3 with a new feature of the new items working with temptations AI task.