craftbukkit/nms-patches/net/minecraft/world/item/ItemEndCrystal.patch

15 lines
928 B
Diff
Raw Normal View History

2021-03-16 09:00:00 +11:00
--- a/net/minecraft/world/item/ItemEndCrystal.java
+++ b/net/minecraft/world/item/ItemEndCrystal.java
2021-06-11 15:00:00 +10:00
@@ -46,6 +46,11 @@
2018-10-23 06:00:00 +11:00
EntityEnderCrystal entityendercrystal = new EntityEnderCrystal(world, d0 + 0.5D, d1, d2 + 0.5D);
entityendercrystal.setShowingBottom(false);
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityendercrystal).isCancelled()) {
+ return EnumInteractionResult.FAIL;
+ }
+ // CraftBukkit end
world.addEntity(entityendercrystal);
2021-06-11 15:00:00 +10:00
world.a((Entity) itemactioncontext.getEntity(), GameEvent.ENTITY_PLACE, blockposition1);
2020-06-25 10:00:00 +10:00
EnderDragonBattle enderdragonbattle = ((WorldServer) world).getDragonBattle();