From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sun, 6 Oct 2019 12:46:35 -0500 Subject: [PATCH] Add option to set armorstand step height diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java index 4e21ff640261d95f7db1134793fb5e2e91015fd6..e664ca676c21b1c7fdc9df00797060053901e1f7 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -335,7 +335,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public double xOld; public double yOld; public double zOld; - private float maxUpStep; + public float maxUpStep; // Purpur - private -> public public boolean noPhysics; public final RandomSource random; public int tickCount; diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java index 1e86e86b0a100a5d14aee10b60e70c32d2733660..b9bb4745cf540b5720259b009e973633647c36c6 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java @@ -677,6 +677,7 @@ public class ArmorStand extends LivingEntity { @Override public void tick() { + maxUpStep = level().purpurConfig.armorstandStepHeight; // Paper start if (!this.canTick) { if (this.noTickPoseDirty) { diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java index c76957ae7e9f2aa6b34d0a1098cfbc036b723237..ba7f378b9b0c791dd77862439f310a6653cccf30 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java @@ -90,6 +90,11 @@ public class PurpurWorldConfig { return value.isEmpty() ? fallback : value; } + public float armorstandStepHeight = 0.0F; + private void armorstandSettings() { + armorstandStepHeight = (float) getDouble("gameplay-mechanics.armorstand.step-height", armorstandStepHeight); + } + public boolean idleTimeoutKick = true; public boolean idleTimeoutTickNearbyEntities = true; public boolean idleTimeoutCountAsSleeping = false;