Files
Purpur/patches/server/0033-Add-option-to-set-armorstand-step-height.patch
granny 991719aa9e Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@c1ea550 Remove more outdated config settings (#9358)
PaperMC/Paper@3a03739 Add method to get ungenerated chunk from long key (#9254)
PaperMC/Paper@072b78a Add trail ruins structure set seed in spigot config (#9327)
PaperMC/Paper@faf9a65 Disable BukkitMirrorTest
PaperMC/Paper@873533b Add method to remove all active potion effects (#9361)
PaperMC/Paper@275173e Updated Upstream (Bukkit/CraftBukkit)
PaperMC/Paper@976b95c Temp: Pre-init PlayerChunkLoaderData in order to prepopulate the BFS lookup cache because potatos (Closes #9338)
PaperMC/Paper@d6d4c78 Move some Folia API to Paper for easy compat (#9360)
PaperMC/Paper@b1fe756 Revert "Move some Folia API to Paper for easy compat (#9360)"
PaperMC/Paper@1f5bec7 Pull Folia API take two
PaperMC/Paper@3756f5b Properly Cancel Usable Items (#9225)
2023-06-20 15:54:20 -07:00

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 f54290965187661ac5ba5cc8fe90e873e71fe66d..000cd8cfab7b298feaf6cf00b29f5e65b0c7a2bd 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -334,7 +334,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 8a8b9e8983be1acad66ad875c901be5bbdeabb1f..09912c11bad7dc639b8afe8b0041a5fbc3189d7f 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -679,6 +679,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 8d764e136fa4ea6f9d3efb555f4e299df8831a4e..1ea0b241a819527e48ad3050bb0f6c57013a891b 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;