2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/item/ItemArmorStand.java
|
|
|
|
+++ b/net/minecraft/world/item/ItemArmorStand.java
|
2023-03-14 17:30:00 +01:00
|
|
|
@@ -53,6 +53,11 @@
|
|
|
|
float f = (float) MathHelper.floor((MathHelper.wrapDegrees(itemactioncontext.getRotation() - 180.0F) + 22.5F) / 45.0F) * 45.0F;
|
2020-06-25 02:00:00 +02:00
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
entityarmorstand.moveTo(entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), f, 0.0F);
|
2020-06-25 02:00:00 +02:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityarmorstand).isCancelled()) {
|
|
|
|
+ return EnumInteractionResult.FAIL;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2021-11-21 23:00:00 +01:00
|
|
|
worldserver.addFreshEntityWithPassengers(entityarmorstand);
|
|
|
|
world.playSound((EntityHuman) null, entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), SoundEffects.ARMOR_STAND_PLACE, SoundCategory.BLOCKS, 0.75F, 0.8F);
|
2022-06-07 18:00:00 +02:00
|
|
|
entityarmorstand.gameEvent(GameEvent.ENTITY_PLACE, itemactioncontext.getPlayer());
|