Modded mob compatibility for Herders
Thutmose opened this issue ยท 1 comments
Here are some suggestions for modded mob compatibility for the mob related jobs.
I will probably see about spending some time looking into making some capabilities for making this work easily.
AbstractEntityAIHerder
instead of getAnimalClass(), it should probably use a predicate for validation
https://github.com/ldtteam/minecolonies/blob/release/1.14/src/main/java/com/minecolonies/coremod/entity/ai/citizen/herders/AbstractEntityAIHerder.java#L337-L340
this method could use AnimalEntity for the class, and then use the predicate to validate.
This would also then instead of being a typed class, just use AnimalEntity directly.
for getBreedingItem(), maybe instead change to using something that checks AnimalEntity.isBreedingItem, though this is less critical and can probably be left as is.
EntityAIWorkShepherd
Instead of SheepEntity for the class, return a predicate for whether the entity is shearable, a capability for shearableness could be added, probably similar to what I use here:
https://github.com/Pokecube-Development/Pokecube-Issues-and-Wiki/blob/1.14/src/main/java/thut/api/entity/ShearableCaps.java
though maybe with some added support for properly transfering the items over to the citizen?
This new capability would probably also be useful to include the dyeing of the mobs to it.
EntityAIWorkCowboy
This could have a general "milkable" capability added for it, similar the the shepherd, which could give the container item, and handle the milking itself. This would allow support for Mooshrooms, and any other milkable or similar mobs that mods happen to add, like all of the fluid cows for example.
Summery of things to do:
- Capability for shearing
- Capability for milking
- Use predicate for the animal lookup instead of class