diff options
Diffstat (limited to 'patch-remap/og/net/minecraft/world/item/ItemArmorStand.patch')
-rw-r--r-- | patch-remap/og/net/minecraft/world/item/ItemArmorStand.patch | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/item/ItemArmorStand.patch b/patch-remap/og/net/minecraft/world/item/ItemArmorStand.patch new file mode 100644 index 0000000000..6069029c14 --- /dev/null +++ b/patch-remap/og/net/minecraft/world/item/ItemArmorStand.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/world/item/ItemArmorStand.java ++++ b/net/minecraft/world/item/ItemArmorStand.java +@@ -53,6 +53,11 @@ + float f = (float) MathHelper.floor((MathHelper.wrapDegrees(itemactioncontext.getRotation() - 180.0F) + 22.5F) / 45.0F) * 45.0F; + + entityarmorstand.moveTo(entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), f, 0.0F); ++ // CraftBukkit start ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityarmorstand).isCancelled()) { ++ return EnumInteractionResult.FAIL; ++ } ++ // CraftBukkit end + worldserver.addFreshEntityWithPassengers(entityarmorstand); + world.playSound((EntityHuman) null, entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), SoundEffects.ARMOR_STAND_PLACE, SoundCategory.BLOCKS, 0.75F, 0.8F); + entityarmorstand.gameEvent(GameEvent.ENTITY_PLACE, itemactioncontext.getPlayer()); |