geforkt von Mirrors/Paper
a73ed9572e
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: b76ceb4f5 PR-1235: Move EntityType return to base Entity class e795d7490 SPIGOT-7458: Exception when Entity CommandSender executes Vanilla command 46c7fc3b1 SPIGOT-7452: Player#openSign cannot edit d91e5aa0b SPIGOT-7447: Rewrite --forceUpgrade to minimise diff and properly handle CraftBukkit world layout 921ae06d6 Revert "SPIGOT-7447: Fix --forceUpgrade" Spigot Changes: 94e187b5 Rebuild patches 3bce7935 SPIGOT-7091: Update bungeecord-chat
53 Zeilen
2.2 KiB
Diff
53 Zeilen
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 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/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
index af6a2e8c4ce41aaf55b645c37f809c2de7ea780a..be7ed906b4a5a8ffda87ecf66f967061b58f8034 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
@@ -92,6 +92,7 @@ public class ArmorStand extends LivingEntity {
|
|
public Rotations rightArmPose;
|
|
public Rotations leftLegPose;
|
|
public Rotations rightLegPose;
|
|
+ public boolean canMove = true; // Paper
|
|
|
|
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
|
|
super(type, world);
|
|
@@ -942,4 +943,13 @@ public class ArmorStand extends LivingEntity {
|
|
public boolean canBeSeenByAnyone() {
|
|
return !this.isInvisible() && !this.isMarker();
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public void move(net.minecraft.world.entity.MoverType type, Vec3 movement) {
|
|
+ if (this.canMove) {
|
|
+ super.move(type, movement);
|
|
+ }
|
|
+ }
|
|
+ // 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 76536f0d700fb4b120ffef066588e305013a5a66..fc3b98746a558b3ad6c89543170225bdae1e63ba 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
|
@@ -222,4 +222,15 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
|
public boolean hasEquipmentLock(EquipmentSlot equipmentSlot, LockType lockType) {
|
|
return (this.getHandle().disabledSlots & (1 << CraftEquipmentSlot.getNMS(equipmentSlot).getFilterFlag() + lockType.ordinal() * 8)) != 0;
|
|
}
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public boolean canMove() {
|
|
+ return getHandle().canMove;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setCanMove(boolean move) {
|
|
+ getHandle().canMove = move;
|
|
+ }
|
|
+ // Paper end
|
|
}
|