DrManganese / TOPAddons

A Minecraft mod which adds mod support to The One Probe by McJty
https://www.curseforge.com/minecraft/mc-mods/top-addons
GNU General Public License v3.0
7 stars 11 forks source link

Fix locked+empty drawers losing their item reservations #35

Closed codewarrior0 closed 7 years ago

codewarrior0 commented 7 years ago

Changing the stack size of the item prototype to zero causes it to become empty, making the drawer think it is no longer locked to an item. Instead of changing the size of a stack owned by the drawer, make a copy.

Furthermore, the ItemStack returned by getStoredItemPrototype() should not be modified for any reason.

This was a pain to debug.

DrManganese commented 7 years ago

This issue hadn't come to my attention yet, so thank you kindly for fixing it at the same time!