I'm writing a plugin with a focus on hoppers and chests, and it seems to me that the normal chest code does not seem to work appropriately for trapped chests.
This (heavily reduced) example always prints out "Chest is of size 27" for double trapped chests, but 54 for normal ones:
TileEntity target = hopperBlock.getWorld().getBlockAt(x, y, z).getTileEntity();
if (target instanceof Chest) {
Chest chest = (Chest)target;
Canary.log.info(String.format("Chest is of size %s", chest.getSize()));
}
Trying to explicitly grab the double chest (via getDoubleChest) sometimes throws an exception. I don't have a record of it, so I'll post it if I come across it again.
I'm writing a plugin with a focus on hoppers and chests, and it seems to me that the normal chest code does not seem to work appropriately for trapped chests.
This (heavily reduced) example always prints out "Chest is of size 27" for double trapped chests, but 54 for normal ones:
Trying to explicitly grab the double chest (via
getDoubleChest) sometimes throws an exception. I don't have a record of it, so I'll post it if I come across it again.