mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 16:18:02 +01:00
b62dfa0bf9
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
56 lines
1.9 KiB
Diff
56 lines
1.9 KiB
Diff
From d041c357b3b534885061522f9ee31e5637d718dc Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 5485c4bff3..00a46129b8 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
@@ -44,6 +44,7 @@ public class EntityArmorStand extends EntityLiving {
|
|
public Vector3f rightArmPose;
|
|
public Vector3f leftLegPose;
|
|
public Vector3f rightLegPose;
|
|
+ public boolean canMove = true; // Paper
|
|
|
|
public EntityArmorStand(World world) {
|
|
super(EntityTypes.ARMOR_STAND, world);
|
|
@@ -757,4 +758,13 @@ public class EntityArmorStand extends EntityLiving {
|
|
public boolean df() {
|
|
return false;
|
|
}
|
|
+
|
|
+ // 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
|
|
index 2b66a08ade..124c3185bc 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
|
@@ -211,4 +211,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
|
public void setMarker(boolean marker) {
|
|
getHandle().setMarker(marker);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public boolean canMove() {
|
|
+ return getHandle().canMove;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setCanMove(boolean move) {
|
|
+ getHandle().canMove = move;
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
--
|
|
2.19.0
|
|
|