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

16 lines
753 B
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/world/item/ItemEnderEye.java
+++ b/net/minecraft/world/item/ItemEnderEye.java
@@ -85,7 +85,11 @@
entityendersignal.setItem(itemstack);
entityendersignal.a(blockposition);
- world.addEntity(entityendersignal);
+ // CraftBukkit start
+ if (!world.addEntity(entityendersignal)) {
+ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack);
+ }
+ // CraftBukkit end
if (entityhuman instanceof EntityPlayer) {
CriterionTriggers.USED_ENDER_EYE.a((EntityPlayer) entityhuman, blockposition);
}