mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
Add option to set armorstand step height
This commit is contained in:
@@ -121,6 +121,12 @@ logger
|
|||||||
- **default**: true
|
- **default**: true
|
||||||
- **description**:: Controls if warnings about unknown attributes are shown in console/logs
|
- **description**:: Controls if warnings about unknown attributes are shown in console/logs
|
||||||
|
|
||||||
|
armorstand
|
||||||
|
~~~~~~~~~~
|
||||||
|
* step-height
|
||||||
|
- **default**: 0.0
|
||||||
|
- **description**:: Set the default step height of armorstands. Useful for plugins that utilize armorstands as vehicles to be able to drive over blocks without jumping, etc.
|
||||||
|
|
||||||
mobs
|
mobs
|
||||||
~~~~
|
~~~~
|
||||||
* require-shift-to-mount
|
* require-shift-to-mount
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
From 02e613a8dde4ae32890b8ba2eedc9d99596680a2 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 | 2 +-
|
||||||
|
src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
||||||
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||||
|
index f7b9c1aa5..bd4a80132 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||||
|
@@ -62,7 +62,7 @@ public class EntityArmorStand extends EntityLiving {
|
||||||
|
this.leftLegPose = EntityArmorStand.by;
|
||||||
|
this.rightLegPose = EntityArmorStand.bz;
|
||||||
|
if (world != null) this.canTick = world.paperConfig.armorStandTick; // Paper - armour stand ticking
|
||||||
|
- this.K = 0.0F;
|
||||||
|
+ this.K = net.pl3x.purpur.PurpurConfig.armorstandStepHeight; // Purpur
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityArmorStand(World world, double d0, double d1, double d2) {
|
||||||
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
index 04a58a8da..f2f61f997 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
@@ -188,6 +188,11 @@ public class PurpurConfig {
|
||||||
|
requireShiftToMount = getBoolean("settings.mobs.require-shift-to-mount", requireShiftToMount);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public static float armorstandStepHeight = 0.0F;
|
||||||
|
+ private static void armorstandSettings() {
|
||||||
|
+ armorstandStepHeight = (float) getDouble("settings.armorstand.step-height", armorstandStepHeight);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public static int feedMushroomsToCows = 0;
|
||||||
|
private static void cowsSettings() {
|
||||||
|
feedMushroomsToCows = getInt("settings.mobs.cow.feed-mushrooms-for-mooshroom", feedMushroomsToCows);
|
||||||
|
--
|
||||||
|
2.23.0.rc1
|
||||||
|
|
||||||
Reference in New Issue
Block a user