Repackage NMS

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-03-16 09:00:00 +11:00
parent 18496e998f
commit 9da047989c
968 changed files with 5448 additions and 5050 deletions

View File

@@ -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);
+ }