-
-
Notifications
You must be signed in to change notification settings - Fork 479
Expand file tree
/
Copy path0032-Add-option-to-set-armorstand-step-height.patch
More file actions
47 lines (43 loc) · 2.4 KB
/
Copy path0032-Add-option-to-set-armorstand-step-height.patch
File metadata and controls
47 lines (43 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 036688d52541dda8d8eef6fee43823844f245124..7ca03d221e33cec1df99b6dcd60fcdd401530938 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -336,7 +336,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 94a30a0c1266bf919d1dc4ca2b19489edd54a7fa..61a2048625df012f563d3a0db567630bdfe489c3 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 - Allow ArmorStands not to tick
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;