
Possible way of picking up on undead mobs
Sunconure11 opened this issue ยท 2 comments
A lot of undead mobs are classified under a creature attribute enum named EnumCreatureAttribute.UNDEAD
. Why not use this to pick up on modded undead, or at least, try and pick up on them a bit easier?
Don't I do that already?
This is where I check for the applicable creatures to cancel death:
https://github.com/TheIllusiveC4/Consecration/blob/163c6bb8ec57908feba3e66512250aa8eba20c63/src/main/java/c4/consecration/common/EventHandlerCommon.java#L109
Which leads to this method in the EntityLivingBase class:
public boolean isEntityUndead() { return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD; }