Skeletons have a 1/3 chance of spawning without a horn

This commit is contained in:
Sollace 2018-08-17 16:37:22 +02:00
parent f49d8bcadf
commit 85622b335d
2 changed files with 11 additions and 5 deletions

View file

@ -33,6 +33,7 @@ public class ModelEnderStallion extends ModelSkeletonPony {
rightArmPose = isCarrying ? ArmPose.BLOCK : ArmPose.EMPTY; rightArmPose = isCarrying ? ArmPose.BLOCK : ArmPose.EMPTY;
leftArmPose = rightArmPose; leftArmPose = rightArmPose;
isUnicorn = true;
isAlicorn = entity.getUniqueID().getLeastSignificantBits() % 3 == 0; isAlicorn = entity.getUniqueID().getLeastSignificantBits() % 3 == 0;
isBoss = !isAlicorn && entity.getUniqueID().getLeastSignificantBits() % 90 == 0; isBoss = !isAlicorn && entity.getUniqueID().getLeastSignificantBits() % 90 == 0;
@ -74,11 +75,6 @@ public class ModelEnderStallion extends ModelSkeletonPony {
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }
@Override
public boolean canCast() {
return true;
}
@Override @Override
public boolean canFly() { public boolean canFly() {
return isAlicorn; return isAlicorn;

View file

@ -10,8 +10,13 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumHandSide; import net.minecraft.util.EnumHandSide;
public class ModelSkeletonPony extends ModelMobPony { public class ModelSkeletonPony extends ModelMobPony {
public boolean isUnicorn;
@Override @Override
public void setLivingAnimations(EntityLivingBase entity, float move, float swing, float ticks) { public void setLivingAnimations(EntityLivingBase entity, float move, float swing, float ticks) {
isUnicorn = entity.getUniqueID().getLeastSignificantBits() % 3 != 0;
rightArmPose = ArmPose.EMPTY; rightArmPose = ArmPose.EMPTY;
leftArmPose = ArmPose.EMPTY; leftArmPose = ArmPose.EMPTY;
@ -42,6 +47,11 @@ public class ModelSkeletonPony extends ModelMobPony {
super.setLivingAnimations(entity, move, swing, ticks); super.setLivingAnimations(entity, move, swing, ticks);
} }
@Override
public boolean canCast() {
return isUnicorn;
}
@Override @Override
protected float getLegOutset() { protected float getLegOutset() {
if (isSleeping()) return 2.6f; if (isSleeping()) return 2.6f;