Added support for slimes and magama cubes.

This commit is contained in:
Brianna O'Keefe 2019-02-09 16:53:10 -05:00
parent 62868dce12
commit be57ecfaac

View File

@ -59,6 +59,8 @@ public class Methods {
((Sheep) newEntity).setColor(((Sheep) killed).getColor());
} else if (killed instanceof Villager) {
((Villager) newEntity).setProfession(((Villager) killed).getProfession());
} else if (killed instanceof Slime) {
((Slime)newEntity).setSize(((Slime)killed).getSize());;
}
newEntity.setFireTicks(killed.getFireTicks());
@ -99,6 +101,11 @@ public class Methods {
entityList.removeIf(entity -> ((Villager) entity).getProfession() != villager.getProfession());
}
if (initalEntity instanceof Slime) {
Slime slime = ((Slime) initalEntity);
entityList.removeIf(entity -> ((Slime)entity).getSize() != slime.getSize());
}
if (initalEntity.hasMetadata("breedCooldown")) {
entityList.removeIf(entity -> !entity.hasMetadata("breedCooldown"));
}