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

15 lines
934 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);
2021-11-22 09:00:00 +11:00
entityendercrystal.setShowBottom(false);
2018-10-23 06:00:00 +11:00
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityendercrystal).isCancelled()) {
+ return EnumInteractionResult.FAIL;
+ }
+ // CraftBukkit end
2021-11-22 09:00:00 +11:00
world.addFreshEntity(entityendercrystal);
2022-06-08 02:00:00 +10:00
world.gameEvent((Entity) itemactioncontext.getPlayer(), GameEvent.ENTITY_PLACE, blockposition1);
2021-11-22 09:00:00 +11:00
EnderDragonBattle enderdragonbattle = ((WorldServer) world).dragonFight();