Sable Dupe Fix
Fixes a duplication bug in Sable when assembling non‑Clearable containers (e.g. Create’s Table Cloth, Depot, Belt).
In SubLevelAssemblyHelper.moveBlocks, Sable checks:
if (blockEntity instanceof Clearable clearable) { clearable.clearContent(); // standard containers: clear items at the old position }
Some third‑party containers (like Create’s Table Cloth, Depot, Belt) do not implement Clearable.
As a result, the items in the old position are not cleared, while the new position loads a duplicate copy via loadWithComponents(tag, ...).
This causes the item count to double.
A lightweight Mixin is injected into SubLevelAssemblyHelper.moveBlocks:
When the blockEntity is not an instance of Clearable,
the tag is reset to contain only the id field plus coordinate fields.
Then loadWithComponents(tag, ...) loads the container at the new position in a factory‑fresh state – with no items.
Minecraft 1.21.1
NeoForge 21.1.219+
Sable 1.2.2+