Better Copper Golem Sorting
Vanilla copper golems will only drop an item into a chest that is empty or already holds the same item. Anything else and they just stand there, holding your diamonds forever. This mod replaces that single rule with a strategy table: rules say what kind of item something is, and a chest's own contents decide which strategy it serves.
What changes
- Rules classify, containers decide. A rule never names a block type. The golem reads a container's contents instead: if everything inside fits one rule, that chest "belongs" to the rule and only accepts items from it. Empty chests and mixed chests are unclassified and accept anything, so a golem practically never ends up stuck holding an item.
- Copper chests are never destinations, so the golem cannot shuffle items back into the chest it just took them from.
- Merge first. Stacks are topped up before an empty slot is used, so chests stay tidy.
- Falls back gracefully. If nothing accepts the item, the rule decides whether the golem keeps it, drops it, or carries it back to the copper chest it came from.
Default rules
Works out of the box: the mod ships rules derived from the vanilla creative tabs, so a chest that starts with blocks only receives blocks, a chest of food only receives food, and so on — building blocks, colored blocks, natural blocks, functional blocks, redstone, tools & utilities, combat, food & drinks, ingredients, spawn eggs.
Items outside all of those (command block, barrier, …) fall back to vanilla behaviour by default, and creative tabs added by other mods are picked up automatically — no extra configuration. Any of it can be overridden with your own datapack.
Rules are data
Drop JSON into data/<namespace>/copper_golem_sorting/rules/*.json (a single object or an array) and
run /reload.
| field | required | meaning |
|---|---|---|
priority |
no | Higher matches first; ties are broken by rule id. Default 0. |
match.item / match.items |
one of | Item id, or a list of ids. |
match.tag |
one of | Item tag, e.g. c:gems. |
match.creative_tab |
one of | Creative tab id, e.g. minecraft:building_blocks. |
slots.from / slots.to |
no | Slot range a container is allowed to use. |
max_per_slot |
no | Cap per slot for placed stacks (default 64). |
fallback |
no | keep (default), drop, or return_to_source. |
[
{ "priority": 50, "match": { "tag": "minecraft:logs" }, "slots": { "from": 0, "to": 8 } },
{ "priority": 20, "match": { "item": "minecraft:emerald" }, "fallback": "return_to_source" }
]