geforkt von Mirrors/Paper
e4d10a6d67
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: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
57 Zeilen
1.9 KiB
Diff
57 Zeilen
1.9 KiB
Diff
From 085f39ca706bdfb003624eb6c180cf934a8a9405 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 ed6092f65a..176af6c889 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
@@ -43,6 +43,7 @@ public class EntityArmorStand extends EntityLiving {
|
|
public Vector3f rightArmPose;
|
|
public Vector3f leftLegPose;
|
|
public Vector3f rightLegPose;
|
|
+ public boolean canMove = true; // Paper
|
|
|
|
public EntityArmorStand(EntityTypes<? extends EntityArmorStand> entitytypes, World world) {
|
|
super(entitytypes, world);
|
|
@@ -817,4 +818,13 @@ public class EntityArmorStand extends EntityLiving {
|
|
|
|
return this.getEntityType().k().a(f);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public void move(EnumMoveType moveType, Vec3D vec3d) {
|
|
+ if (this.canMove) {
|
|
+ super.move(moveType, vec3d);
|
|
+ }
|
|
+ }
|
|
+ // 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.25.1
|
|
|