PaperMC/paper-server/patches/sources/net/minecraft/world/item/ItemEnderEye.patch

16 lines
782 B
Diff
Raw Normal View History

2021-03-16 09:00:00 +11:00
--- a/net/minecraft/world/item/ItemEnderEye.java
+++ b/net/minecraft/world/item/ItemEnderEye.java
@@ -99,7 +99,11 @@
entityendersignal.setItem(itemstack);
entityendersignal.signalTo(blockposition);
world.gameEvent((Holder) GameEvent.PROJECTILE_SHOOT, entityendersignal.position(), GameEvent.a.of((Entity) entityhuman));
- world.addFreshEntity(entityendersignal);
+ // CraftBukkit start
+ if (!world.addFreshEntity(entityendersignal)) {
+ return EnumInteractionResult.FAIL;
+ }
+ // CraftBukkit end
if (entityhuman instanceof EntityPlayer) {
EntityPlayer entityplayer = (EntityPlayer) entityhuman;