Repository navigation
Editor Container Variants
A container variant fills a chest, barrel, hopper, dispenser, shulker, vase, or furnace with rolled loot when the carriage spawns. You set up the pool of possible items with weights; the spawner rolls actual contents at spawn.
Use this for treasure rooms, supply caches, decorative shelves with surprise items — anywhere you want a container to feel hand-stocked but different on every car.
Tap C while looking at any container block:
- Chest, trapped chest, barrel
- Dispenser, dropper, hopper
- Shulker box
- Furnace, blast furnace, smoker (3-slot cookers — see "Furnace family" below)
- Brewing stand
- Vase (decorated pot) — single virtual slot, drops on break
Same plot rule as everything else: works inside any editor plot.
The panel anchors flat against the block's face. The header shows the container's position. Below, each entry in the pool is listed: item icon, name, count, weight, slot pin, and (per item) durability / enchantment toggles.
Toolbar buttons:
| Button | What it does |
|---|---|
| Add | Append the item in your hand. Count comes from the held stack; weight starts at 1. |
| Save | Save the current pool as a named loot prefab so other containers can link to it. |
| min | Click +1, shift-click -1. The minimum number of slots filled at spawn. |
| max | Click cycles forward through 0, 1, 2 … 64, all. Shift-click reverses. Shown as N / containerSize. |
| Clear | Drop the entire pool. The container in the world stays as it is. |
| X | Close the menu. |
Per-entry main-row cells (right to left): × remove, slot pin, w weight, x count, item name.
| Cell | What it does |
|---|---|
| x N (count) | Click +1, shift-click -1. The largest stack size this entry can roll — the actual size lands between 1 and this number. |
| w N (weight) | Click +1, shift-click -1. Proportional weight when picking which entry fills a slot. |
| slot pin | Cycles auto → in → fuel → out → auto. Only meaningful in furnace family — see below. Default: auto. |
| × | Remove this entry. |
Per-entry sub-row cells (for damageable / enchantable items):
| Cell | What it does |
|---|---|
| Dur ✓/✗ | Toggle whether the rolled stack gets random durability damage. |
| Dur N% | Click +5%, shift-click -5%. Chance per spawn that durability damage is actually applied (0–100). |
| Ench ✓/✗ | Toggle whether the rolled stack gets a random enchantment. |
| Ench N% | Click +5%, shift-click -5%. Chance per spawn that an enchantment is actually applied. |
When a container spawns, the roller picks entries and slots deterministically
off (worldSeed, carriageIndex, localPos) — same world + same carriage = same
contents, every time.
Generic containers (chest, barrel, hopper, dispenser, …)
-
How many slots fill — a random number
Kbetweenminandmax(capped at the container's real slot count). -
Which slots fill —
Krandom positions inside the container. -
What goes in each slot — pick an entry from the pool weighted by
w, then roll a stack size between 1 and the entry'sx.
Vase (decorated pot) — virtual single slot. max collapses to 0 or 1 so
the pot either has a hidden item or doesn't. The item materialises when the
pot breaks.
Furnace family — see below.
These three blocks have semantic slots — input, fuel, output — so the roller treats them differently.
Pinned vs auto: every entry's slot pin decides where it goes.
-
auto— the roller decides based on the item's function:- Cookable (matches a smelting / blasting / smoking recipe for this block) → input slot.
- Fuel that isn't also cookable (positive burn time, e.g. coal) → fuel slot.
- Everything else (smelt-results like iron ingot, neutral items like diamond) → output slot.
- Priority cascade: cookable wins over fuel wins over output, so a wood log (cookable AND fuel) lands in the input slot.
-
in/fuel/out— pin the entry to that exact slot regardless of its function. Useful for "always put a wooden sword in the fuel slot" or "put iron ingots in the input slot" tricks.
How K applies: the standard min/max roll still controls how many of
the three slots get filled. Slots are tried in order input → fuel → output;
an empty bucket is skipped without consuming K, so a fuel-only pool with K=1
still puts the fuel in slot 1 rather than leaving the furnace empty.
Two ways to get empty slots:
- Lower max — set max to a small number so most slots stay empty.
-
Add air as an entry —
Addwith an empty hand, then crank that entry's weight high. A pool ofdiamond × 1 + air × 5rolls air five times more often than diamond, so a few slots glint among lots of empty.
The Save toolbar button stores the current pool as a named loot prefab
(prefabs/loot/<name>.json). Other containers — in carriages, contents, or
anywhere a content sidecar has links — read through to that prefab, so
editing the prefab's pool propagates to every linked container instantly.
When you bump fillMax (or any other field) on a linked container's menu,
the edit routes straight to the template instead of writing a local pool.
Existing linked containers in editor plots are re-rolled live. Containers
already spawned in the world keep their stale items until you break + replace
them or run /dt debug reroll <prefabId> — see below.
In dev mode (editor running from a source checkout), every menu edit also writes to the source tree so changes commit through git.
A template you save to My Builds takes the loot prefabs its containers link to along with it — only the ones you authored (bundled prefabs are on every install already). The relay files them in a per-builder library, and they come back with the build: load it on another machine, or load someone else's build from Find a Builder, and the chests roll what the author set up rather than an unlinked default.
If a prefab arrives under a name you already have with different contents, nothing is written until you answer. A screen lays the two versions side by side — container, fill range, every entry, with changed lines in yellow, entries only in their version in green and entries only in yours in red — and you pick per prefab:
| Choice | Effect |
|---|---|
| Click Yours (default) | your prefab stays; the build's chests use your version |
| Click Theirs | their version overwrites yours — every local template linked to that name changes too |
| Rename theirs… | their version is saved under a new name, and only the loaded build's chests point at it |
Identical prefabs (as parsed — whitespace and key order don't count) are left alone silently; prefabs you don't have are installed silently. Cancel leaves the install untouched — the download is a read until you confirm.
A build's container setups (per-chest pools and prefab links) travel together
with its block variants and weights. Until v0.965.0 that whole bundle was
dropped when it came to more than 200,000 characters, which most large
dimensional carriage rooms do: the build uploaded, but downloads arrived with
an empty C menu and chests holding only the one roll captured in the blocks.
Oversized bundles are now compressed, which makes them 60–100× smaller. If a build is still too big, the largest file is dropped first and the container setups last, and the builder gets a yellow chat message naming what was left out. Builds uploaded before v0.965.0 need to be saved again by their author to pick up their container setups.
OP-only. Scans every loaded train ship's plot chunks, finds block entities whose state matches the prefab's source block, and re-rolls them with the current pool. One-shot fix for already-spawned carriages whose contents were rolled before a template edit landed.
Example: after lowering fuelfurn's fillMax to 1, run
/dt debug reroll fuelfurn and every furnace on every loaded smelt carriage
re-rolls down to at most one item.
Pair with the in-world Debug menu's "Log Loot Rolls" toggle (or
/dt debug loot-rolls on) to see per-roll diagnostics in the log:
K, fill bounds, pinned-slot counts, and what each slot picked.
Container variants work inside any editor plot — carriages, parts, contents,
tracks, pillars, tunnels. Same C key, same menu, same rolls.
A book you write and sign while standing in an editor plot stays an ordinary written book: it does not upload to the community pool, it does not fire the Death Note / Love Note or lectern-letter mechanics, and — unlike a book signed out in the world — it does not catch fire when you read or drop it. Write it, proof-read it, drop it, re-shelve it; it stays put while you build.
Place it in a container and save the template, and it ships with the carriage as
ordinary block-entity NBT. The first player to take it out of that chest on the
live train arms it, after which it burns after being read, exactly like a
random book or a discovered
community book. Internally this is
EditorAuthoredBookTag — the same held-gated shape as RandomBookTag, with the
held marker suppressed while the holder is inside an editor plot.
Put authored books in a container with no configured variant. A container whose cell resolves a pool has its whole
Itemslist replaced at spawn by the roll, and pool entries are item IDs carrying no NBT — so a signed book can never come out of a pool, and one sitting in a pooled chest is discarded. Plain chests and barrels with noCvariant are the safe home. Note chiseled bookshelves have a block-type default pool (1-in-5), so avoid those too.
- The count is a maximum, not a range. You can't say "between 16 and 64" for one entry — only "up to 64."
- Random enchantment rolls from the standard enchanting-table pool (non-treasure). It can't be locked to a specific enchantment or level.
- Modded furnace-likes fall through to the generic-container path — only vanilla furnace, blast furnace, and smoker get slot-aware rolls.
- A container variant and hand-placed contents are mutually exclusive. The roll is authoritative — see the lore-books note above.
| Goal | Steps |
|---|---|
| A treasure chest with 1–3 valuable items | Place a chest. Tap C. Add with each treasure held. Set min = 1, max = 3. |
| A cluttered cargo barrel that's mostly empty | Tap C. Add crates, bottles, etc. Add with an empty hand and crank that entry's weight to 10. Set max = all. |
| A barrel always full of wheat | Place a barrel. Tap C. Add wheat. Set min = all and max = all. |
| A dispenser that fires random arrows or fire charges | Place a dispenser. Tap C. Add arrows. Add fire charges. min = 1, max = all. |
| A furnace that always has fuel | Place a furnace. Tap C. Add coal, charcoal, sticks. Set min = 1, max = 1. Leave slot pins on auto. |
| A blast furnace mid-smelting | Tap C. Add iron ore, Add coal, Add iron ingot. Set min = 3, max = 3. The auto cascade puts each in its right slot. |
| A smoker pinned to drop a sword in the fuel slot | Tap C. Add a wooden sword. Cycle its slot pin to fuel. The sword now always lands in slot 1, not slot 0. |
- Templates — the saved geometry container variants live inside.
- Block variants — the same idea, but for blocks instead of items.
- Commands — every slash command, in one place.