Question on how you check chest contents
Dockter opened this issue ยท 2 comments
Hello,
We are using Sign Shop on our 1.7.10 Cauldron server. We have injected additional storage containers into the bukkit material manager enum via FML. Your plugin handles the ability to add additional storage via this option in the config.yml:
linkableMaterials:
CHEST: chest
ALMURA_STORAGEDOCK_CHEST: chest
ALMURA_STORAGEQUANTUM_CHEST: chest
We added the additional example chests to our server. When we left-click on the chest with redstone the player is given the message "Stored location of Almura Storagedock Chest containing nothing".
I was curious if you could point me to where in your code it does the lookup to detect whether or not the current x/y/z location contains NBTdata containing the ItemStack information within our chest.
Many Thanks
~AlmuraDev Team
Hello there,
When a user punches something and no valid operation is known, it will attempt to "register" the block that is being punched for use in a shop setup. It does that with the following call:
https://github.com/wargamer/SignShop/blob/master/org/wargamer2010/signshop/util/signshopUtil.java#L444
Which makes a subsequent call to this method:
https://github.com/wargamer/SignShop/blob/master/org/wargamer2010/signshop/util/itemUtil.java#L66
To retrieve all the itemstacks from the containables the user is punching.
I hope that's what you're looking for. If not, feel free to let us know.
It turns out that Cauldron does some black magic with retrieving chest contents across its bukkit/craftbukkit bridge. We added a "getContents" method to our new TileEntity and now sign shop accepted our new chest without any further issues.
Your assistance with troubleshooting this is greatly appreciated. Thank you for forwarding thinking your linkableMaterials setup, without it this would have never worked.