@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ItemEgg.java
|
||||
+++ b/net/minecraft/server/ItemEgg.java
|
||||
@@ -10,14 +10,22 @@
|
||||
--- a/net/minecraft/world/item/ItemEgg.java
|
||||
+++ b/net/minecraft/world/item/ItemEgg.java
|
||||
@@ -19,14 +19,22 @@
|
||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
- world.addEntity(entityegg);
|
||||
+ // CraftBukkit start
|
||||
+ if (!world.addEntity(entityegg)) {
|
||||
+ if (entityhuman instanceof EntityPlayer) {
|
||||
+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
|
||||
+ if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) {
|
||||
+ ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
|
||||
+ }
|
||||
+ return InteractionResultWrapper.fail(itemstack);
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user