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

15 lines
946 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
2024-04-24 01:15:00 +10:00
@@ -47,6 +47,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);
2024-04-24 01:15:00 +10:00
world.gameEvent((Entity) itemactioncontext.getPlayer(), (Holder) GameEvent.ENTITY_PLACE, blockposition1);
2023-06-08 01:30:00 +10:00
EnderDragonBattle enderdragonbattle = ((WorldServer) world).getDragonFight();