Railcraft

Railcraft

34M Downloads

Issue with BlockPlacer and slabs/stairs

skyboy opened this issue ยท 0 comments

commented

When MFR's BlockPlacer places slabs, they become invisible insta-break blocks with no drops; stairs become sandy brick stairs. However, nothing crashes, just some items are lost.

Stairs can be fixed by using data from the ItemStack in Block.onBlockPlacedBy.

Slabs are more complicated, but could return true from Block.canPlaceBlockOnSide if the ItemStack is a slab and stacking can occur (angle/not full), saving the state of the existing slab (if any) in Block.onBlockPlaced, then restoring the saved slab and stacking the additional slab in Block.onBlockPlacedBy. Or the stacking can remain in the ItemBlock code and the same fix for Stairs applied here.
These methods are called in this order both by the vanilla ItemBlock code and the BlockPlacer.