aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/item/ItemEndCrystal.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/world/item/ItemEndCrystal.patch')
-rw-r--r--patch-remap/og/net/minecraft/world/item/ItemEndCrystal.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/item/ItemEndCrystal.patch b/patch-remap/og/net/minecraft/world/item/ItemEndCrystal.patch
new file mode 100644
index 0000000000..9ca1d4f105
--- /dev/null
+++ b/patch-remap/og/net/minecraft/world/item/ItemEndCrystal.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/item/ItemEndCrystal.java
++++ b/net/minecraft/world/item/ItemEndCrystal.java
+@@ -46,6 +46,11 @@
+ EntityEnderCrystal entityendercrystal = new EntityEnderCrystal(world, d0 + 0.5D, d1, d2 + 0.5D);
+
+ entityendercrystal.setShowBottom(false);
++ // CraftBukkit start
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityendercrystal).isCancelled()) {
++ return EnumInteractionResult.FAIL;
++ }
++ // CraftBukkit end
+ world.addFreshEntity(entityendercrystal);
+ world.gameEvent((Entity) itemactioncontext.getPlayer(), GameEvent.ENTITY_PLACE, blockposition1);
+ EnderDragonBattle enderdragonbattle = ((WorldServer) world).getDragonFight();