forked from LogBlock/LogBlock
These commits replace all checks of the form type == someInventoryBlockId || type = anotherOne with a call to getContainerBlocks().contains(Material.getMaterial(type)) This was done by searching the code for 54 which is the chest ID. Remaining explicit mentions of id 54 are in regards to special-casing for double chests - the code there has been expanded to also consider id 146, the trapped chest. I didn't think it worth making a collection for double-block inventories, but if more are added it should be considered - looking forward, this might be necessary when the mod API comes in, assuming we have a way of figuring out what double inventories are anyway. This fixes many blocks not having inventories logged when destroyed due to explosions, or not being rollbackable, and tools not querying both sides of double trapped chests. Rolling back e.g. a furnace is glitchy - the fuel, raw material and product do not get placed in the correct slots. - Update list of container blocks - Make tool treat trapped chests as potential double chests - Replace explicit id checks with a call to getContainerBlocks()