Sable Assembly Fix fixes an item duplication bug that occurs during Sable assembly/disassembly for block entities that do not implement the Clearable interface.
Sable's SubLevelAssemblyHelper.moveBlocks() calls Clearable.tryClear() on every block entity during the assembly process. The issue is:
simply toggle the ship between physics mode and block mode (or vice versa) — each transition triggers assembly/disassembly, which duplicates the contents of any non-Clearable block entity on the ship. No expensive resources or complex setup required.
A single @Redirect mixin intercepts the Clearable.tryClear() call inside SubLevelAssemblyHelper.moveBlocks() :
| Block Entity | Items per dupe |
|---|---|
| TableCloth | up to 4 |
| Mechanical Arm | entire held stack (e.g. 64 items at once) |
Plus any modded BE with inventory that doesn't implement Clearable.
Note: The Mechanical Arm is especially severe — it duplicates the entire held stack in one operation. If the arm is holding a full stack of 64 items, you get 64 duplicated items per assembly/disassembly cycle. Any modded block entity with an inventory that doesn't implement Clearable is also affected.
A whitelist system is included. The config file config/sableassemblyfix/whitelist.json is automatically created on first launch.
Add block entity IDs to the whitelist to skip the fix (e.g. if a mod handles Clearable on its own). Requires a game restart to reload.
MIT