Through some testing alchemy magic I have found some interesting things.
This is my custom bunk bed. Or, rather, an attempt to do it. The bed consists of 2 parts:
- Bed module (below)
- Columns module (above)
Bed module has a collision height of 1 block in center and rendering scale 0.2 (meaning every voxel has a height of 0.2 in-game block). Center of the bed is 5 voxels high = 1 block high, matching the collision box.
There is a layer added on top of the bed (seen as a brown “plaque”). It’s part of the bed model. Considering things I’ve written above it’s situated above collision box, in the 2nd block from the ground.
If I remove this “plaque” the top “columns” module will not be placeable directly on top of the bed any more. But it still can be placed on top of one of the bed poles.
Suspicion: models stack NOT based on collision boxes and NOT based on their geometry. Models stack if the in-game block below the origin of the “top” model contains at least 1 voxel of the “bottom” model. In my case origins of both top and bottom parts are their centers, so that means the bed should have at least 1 voxel directly below the origin of the top part.
Could anyone prove that? Not exactly the most obvious behaviour, but still quite interesting.
PS. Funny thing: I can place top part on the bed but the ghost is shown incorrectly (lower than expected). The model itself, however, is placed as expected.
PPS. Another bed can NOT be placed on top of the “columns” part straight away. It should be placed on the ground, then “moved” on top. Another strange thing, but I’ve heard about it.