mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b89e6a0 Readd more patches PaperMC/Paper@be8ac7a Fix respawn error due to null location PaperMC/Paper@8d91b85 Prioritize vanilla commands in function parsing (#11011)
56 lines
2.6 KiB
Diff
56 lines
2.6 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 d2831ea1480607af84beb7ff7796975d876712a5..4014acb8f83a68c7d3938fdc7a3f002b606ddc1f 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -344,6 +344,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
public double xOld;
|
|
public double yOld;
|
|
public double zOld;
|
|
+ public float maxUpStep; // Purpur
|
|
public boolean noPhysics;
|
|
public final RandomSource random;
|
|
public int tickCount;
|
|
@@ -4658,7 +4659,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
}
|
|
|
|
public float maxUpStep() {
|
|
- return 0.0F;
|
|
+ return maxUpStep;
|
|
}
|
|
|
|
public void onExplosionHit(@Nullable Entity entity) {}
|
|
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 2f398750bfee5758ad8b1367b6fc14364e4de776..9e6e29b9eddc94b50a32713e8ba1a53deebf02f6 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
@@ -683,6 +683,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 6d3b41da6210699869839826e037a038a637c4c3..e5c4ca83392f398e24be193a0ed77daa85db9913 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -91,6 +91,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;
|