Add option to set armorstand step height

This commit is contained in:
William Blake Galbreath
2025-01-05 14:17:27 -08:00
committed by granny
parent 4945212daf
commit e4247eb565
5 changed files with 36 additions and 59 deletions

View File

@@ -9,3 +9,20 @@
// CraftBukkit start
private static final int CURRENT_LEVEL = 2;
public boolean preserveMotion = true; // Paper - Fix Entity Teleportation and cancel velocity if teleported; keep initial motion on first setPositionRotation
@@ -253,6 +_,7 @@
public double xOld;
public double yOld;
public double zOld;
+ public float maxUpStep; // Purpur - Add option to set armorstand step height
public boolean noPhysics;
private boolean wasOnFire;
public final RandomSource random = SHARED_RANDOM; // Paper - Share random for entities to make them more random
@@ -4885,7 +_,7 @@
}
public float maxUpStep() {
- return 0.0F;
+ return maxUpStep; // Purpur - Add option to set armorstand step height
}
public void onExplosionHit(@Nullable Entity entity) {

View File

@@ -0,0 +1,10 @@
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -620,6 +_,7 @@
@Override
public void tick() {
+ maxUpStep = level().purpurConfig.armorstandStepHeight; // Purpur - Add option to set armorstand step height
// Paper start - Allow ArmorStands not to tick
if (!this.canTick) {
if (this.noTickPoseDirty) {