Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
c9fd745840
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: ff0672ca SPIGOT-5211: Add Raid API CraftBukkit Changes:96bc85f0
SPIGOT-5298: Remove unexplained 0.1 drop chance offset6ed8a189
SPIGOT-5290: Invulnerable and/or Marker armor stand triggers EntityDamageEvent631eaeb0
SPIGOT-5297: PlayerBedLeaveEvent.getBed() returns player location8d4bc541
SPIGOT-5293: Sponge behaviour differs from Vanillae91fd75e
SPIGOT-5291: Missing event for ravagers trampling cropscbdd7139
SPIGOT-5211: Add Raid APIedd8fdfb
SPIGOT-5287: Fix rare CME generating new chunks3fc97f08
SPIGOT-5265: FireworkExplodeEvent only fired when rockets explode in air Spigot Changes: 065a3734 Rebuild patches a5961826 SPIGOT-5286: tick-inactive-villagers invokes the AI for NoAI villagers
57 Zeilen
1.9 KiB
Diff
57 Zeilen
1.9 KiB
Diff
From acb6a2a74f23b56bdaa44797acc636ebfec78049 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 2e7d966c2..3e78b152f 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);
|
|
@@ -801,4 +802,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 2b66a08ad..124c3185b 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.23.0
|
|
|