From 85622b335d62b668da696b61c920b63ef83884a1 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 17 Aug 2018 16:37:22 +0200 Subject: [PATCH] Skeletons have a 1/3 chance of spawning without a horn --- .../model/ponies/ModelEnderStallion.java | 6 +----- .../minelittlepony/model/ponies/ModelSkeletonPony.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java b/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java index 63a2d4db..d3d305fb 100644 --- a/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java +++ b/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java @@ -33,6 +33,7 @@ public class ModelEnderStallion extends ModelSkeletonPony { rightArmPose = isCarrying ? ArmPose.BLOCK : ArmPose.EMPTY; leftArmPose = rightArmPose; + isUnicorn = true; isAlicorn = entity.getUniqueID().getLeastSignificantBits() % 3 == 0; isBoss = !isAlicorn && entity.getUniqueID().getLeastSignificantBits() % 90 == 0; @@ -74,11 +75,6 @@ public class ModelEnderStallion extends ModelSkeletonPony { GlStateManager.popMatrix(); } - @Override - public boolean canCast() { - return true; - } - @Override public boolean canFly() { return isAlicorn; diff --git a/src/main/java/com/minelittlepony/model/ponies/ModelSkeletonPony.java b/src/main/java/com/minelittlepony/model/ponies/ModelSkeletonPony.java index f0ac7541..d1656d26 100644 --- a/src/main/java/com/minelittlepony/model/ponies/ModelSkeletonPony.java +++ b/src/main/java/com/minelittlepony/model/ponies/ModelSkeletonPony.java @@ -10,8 +10,13 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHandSide; public class ModelSkeletonPony extends ModelMobPony { + + public boolean isUnicorn; + @Override public void setLivingAnimations(EntityLivingBase entity, float move, float swing, float ticks) { + isUnicorn = entity.getUniqueID().getLeastSignificantBits() % 3 != 0; + rightArmPose = ArmPose.EMPTY; leftArmPose = ArmPose.EMPTY; @@ -42,6 +47,11 @@ public class ModelSkeletonPony extends ModelMobPony { super.setLivingAnimations(entity, move, swing, ticks); } + @Override + public boolean canCast() { + return isUnicorn; + } + @Override protected float getLegOutset() { if (isSleeping()) return 2.6f;