mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
From ced6e8afca35db154d628d4c700f5c943dcb5299 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
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityArmorStand.java | 1 +
|
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
|
|
2 files changed, 6 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
index 250bccee4..7543f2cee 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
@@ -615,6 +615,7 @@ public class EntityArmorStand extends EntityLiving {
|
|
|
|
@Override
|
|
public void tick() {
|
|
+ setStepHeight(world.purpurConfig.armorstandStepHeight); // Purpur
|
|
// Paper start
|
|
if (!this.canTick) {
|
|
if (this.noTickPoseDirty) {
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 46bf6bcd8..4ab4c4cd6 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -63,6 +63,11 @@ public class PurpurWorldConfig {
|
|
return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path));
|
|
}
|
|
|
|
+ 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;
|
|
--
|
|
2.26.2
|
|
|