Items stack to integer height

I ran into an odd effect in my mod development: items stack in the Y direction to integer world units (grid spacing). What I expected: define item 1’s region, allow vertical adjacent, stack item 2 onto item 1, item 2 sits with the bottom of its region flush with the top of item 1’s region. What actually happens: OK if item 1 is integer units high (like small crate dY = 1, large crate dY = 2, etc.), all other cases result in item 2 floating at next integer Y above item 1.

Just as a sanity check, here’s a screen shot from a very simple test: I took the large crate and squashed it so the qb file and region were both 1.5 high instead of 2, then added to my mod with no other changes (to verify it had nothing to do with my custom items):

Just wondering if this is something that could be corrected or if item placement is tied to integer Y layers. Perhaps it may just be coincidence of object design that most items one would want to stack in the game are not fractional unit heights. At least searching the discourse didn’t seem like anyone else was bothered by this.

What is the collision box for those crates?

I also had this problem. For example, my tiki torch is 4.5 tall, anything on top will be at height 5 instead. (there are other fraction height, but this is the only I remember right now)

Hmmm… I thought I had the box showing on the bottom crate, maybe screenshots don’t grab that overlay. Anyway, the collision region was shortened to match the model squish: 2 x 2 x 1.5. The 2nd and 3rd crate in my image are sitting on exactly Y=2 and Y=4 above the ground.

This is probably because the game still handles voxel placement in whole block intervals because having anything positioned “one and a half block up/sideways” will be a nightmare for pathing, building ect

1 Like