OvercastNetwork / SportBukkit

CraftBukkit and Bukkit modifications that improve stability and add new features
99 stars 84 forks source link

Fix addItem method in CraftInventory #239

Open cswhite2000 opened 7 years ago

cswhite2000 commented 7 years ago

In the CraftInventory class the firstEmpty method, called by addItem, wasn't working correctly. This caused the addItem method to only add items to stacks that already had the item. This fixes //wand not working in worldedit and /give not working in commandbook.

Pablete1234 commented 7 years ago

You should take a look at https://github.com/OvercastNetwork/SportBukkit/blob/master/CraftBukkit/Reduce-ItemStack-copying.patch#L258 ,we don't want a new patch to fix an older one, just edit the older one instead

cswhite2000 commented 7 years ago

I moved the fix to the Reduce-ItemStack-copying patch

Pablete1234 commented 7 years ago

Did you run this thru the scripts? shouldn't it also edit the CB snapshot?

cswhite2000 commented 7 years ago

I guess I forgot to run rake snapshot. It should be fixed now.

cswhite2000 commented 7 years ago

And yes, I did run it through the scripts.