mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-23 10:35:22 +01:00
Added support for colored llamas and horses with equipment.
This commit is contained in:
parent
506179739d
commit
768986a50c
@ -99,6 +99,8 @@ public class Methods {
|
||||
newEntity.setVelocity(killed.getVelocity());
|
||||
if (killed instanceof Ageable && !((Ageable) killed).isAdult()) {
|
||||
((Ageable) newEntity).setBaby();
|
||||
} else if (killed instanceof Llama) {
|
||||
((Llama) newEntity).setColor(((Llama) killed).getColor());
|
||||
} else if (killed instanceof Sheep) {
|
||||
((Sheep) newEntity).setColor(((Sheep) killed).getColor());
|
||||
} else if (killed instanceof Villager) {
|
||||
@ -138,12 +140,19 @@ public class Methods {
|
||||
entityList.removeIf(entity -> ((Sheep) entity).isSheared());
|
||||
}
|
||||
entityList.removeIf(entity -> ((Sheep) entity).getColor() != sheep.getColor());
|
||||
} else if (UltimateStacker.getInstance().isServerVersionAtLeast(ServerVersion.V1_11) && initalEntity instanceof Llama) {
|
||||
Llama llama = ((Llama) initalEntity);
|
||||
entityList.removeIf(entity -> ((Llama) entity).getColor() != llama.getColor());
|
||||
} else if (initalEntity instanceof Villager) {
|
||||
Villager villager = ((Villager) initalEntity);
|
||||
entityList.removeIf(entity -> ((Villager) entity).getProfession() != villager.getProfession());
|
||||
} else if (initalEntity instanceof Slime) {
|
||||
Slime slime = ((Slime) initalEntity);
|
||||
entityList.removeIf(entity -> ((Slime)entity).getSize() != slime.getSize());
|
||||
} else if (initalEntity instanceof Horse) {
|
||||
entityList.removeIf(entity -> ((Horse) entity).getInventory().getSaddle() != null
|
||||
|| ((Horse) entity).getInventory().getArmor() != null);
|
||||
//ToDo: Should be triple checked
|
||||
}
|
||||
|
||||
if (initalEntity.hasMetadata("breedCooldown")) {
|
||||
|
Loading…
Reference in New Issue
Block a user