2018-12-08 11:09:55 +01:00
|
|
|
From ebeb314b54e8b23b554ebfa4befb22e8191e0a88 Mon Sep 17 00:00:00 2001
|
2016-12-21 18:53:41 +01:00
|
|
|
From: kashike <kashike@vq.lc>
|
|
|
|
Date: Wed, 21 Dec 2016 11:47:25 -0600
|
|
|
|
Subject: [PATCH] Add API methods to control if armour stands can move
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
2018-12-08 11:09:55 +01:00
|
|
|
index d19d24683..5945e37a5 100644
|
2016-12-21 18:53:41 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
2018-07-17 22:32:05 +02:00
|
|
|
@@ -44,6 +44,7 @@ public class EntityArmorStand extends EntityLiving {
|
2016-12-21 18:53:41 +01:00
|
|
|
public Vector3f rightArmPose;
|
|
|
|
public Vector3f leftLegPose;
|
|
|
|
public Vector3f rightLegPose;
|
|
|
|
+ public boolean canMove = true; // Paper
|
|
|
|
|
|
|
|
public EntityArmorStand(World world) {
|
2018-07-17 22:32:05 +02:00
|
|
|
super(EntityTypes.ARMOR_STAND, world);
|
2018-12-08 11:09:55 +01:00
|
|
|
@@ -754,4 +755,13 @@ public class EntityArmorStand extends EntityLiving {
|
2018-07-22 07:27:46 +02:00
|
|
|
public boolean df() {
|
2017-11-08 17:13:57 +01:00
|
|
|
return false;
|
2016-12-21 18:53:41 +01:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public void move(EnumMoveType moveType, double x, double y, double z) {
|
|
|
|
+ if (this.canMove) {
|
|
|
|
+ super.move(moveType, x, y, z);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
2018-12-08 11:09:55 +01:00
|
|
|
index 2b66a08ad..124c3185b 100644
|
2016-12-21 18:53:41 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
2018-07-26 04:49:43 +02:00
|
|
|
@@ -211,4 +211,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
2016-12-21 18:53:41 +01:00
|
|
|
public void setMarker(boolean marker) {
|
|
|
|
getHandle().setMarker(marker);
|
|
|
|
}
|
|
|
|
+
|
2018-07-26 04:49:43 +02:00
|
|
|
+ // Paper start
|
2016-12-21 18:53:41 +01:00
|
|
|
+ @Override
|
|
|
|
+ public boolean canMove() {
|
|
|
|
+ return getHandle().canMove;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setCanMove(boolean move) {
|
|
|
|
+ getHandle().canMove = move;
|
|
|
|
+ }
|
2018-07-26 04:49:43 +02:00
|
|
|
+ // Paper end
|
2016-12-21 18:53:41 +01:00
|
|
|
}
|
|
|
|
--
|
2018-12-08 11:09:55 +01:00
|
|
|
2.19.2
|
2016-12-21 18:53:41 +01:00
|
|
|
|