Furniture registry
Multi-block furniture
A bed spans six blocks, a door four. One is the anchor; the rest are fillers that store the offset back to it.
BlockMountAPI.mountOnBlock measures the sleeping position from the anchor, so mounting on a filler
offsets the pose by exactly that filler's distance.
int filler = section.getFiller(x, y, z);
int dx = FillerBlockUtil.unpackX(filler);
The sign of the offset is undocumented, so FurnitureAnchorHelper.anchorOf tries both
directions and validates the one landing on a block with the same id and filler == 0. This is the
same data the game's /inspectfiller reads.
Neighbourhood heuristics were tried first and are wrong: the anchor does not reliably sit in any particular direction.
The registries
| Registry | Holds | Key |
|---|---|---|
BedRegistry.BEDS | BedPos (position + lying-axis yaw) | anchor |
ChestRegistry.CHESTS | HouseBlockPos | anchor |
Both are static and global, with no world scope — known debt.