mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
48 lines
2.4 KiB
Diff
48 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
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 a0f63263a2439df93757309a6d9f6394abf81073..af6da7a9b93ef808759c7e213354ebfeed7e7a77 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -319,7 +319,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
public double xOld;
|
|
public double yOld;
|
|
public double zOld;
|
|
- private float maxUpStep;
|
|
+ public float maxUpStep; // Purpur - private -> public
|
|
public boolean noPhysics;
|
|
protected 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 3677dd991ae73428984e62e4d6fb757317987887..697d6d6cca0a1c8df9c5bf6852495130a0c57eb4 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
@@ -685,6 +685,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 47bd9c45b4a560b1fcc01eee9606afef7416f70d..7fe6efbed2bd5f9a9d5b9a8ff5118a799cda4d11 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -92,6 +92,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;
|