For modpack developers
Tinfoil needs nothing but NeoForge 1.21.1. Everything below can be changed with a datapack, the config file or KubeJS; nothing needs a code change.
Blocks, recipes and tags
- Recipes. Every family has one crafting recipe from vanilla materials (
data/tinfoil/recipe/), and every other member of the family comes from the stonecutter (slabs ×2). Decor pieces are cut from the material they're carved or cast from. Override any of them by recipe id in a datapack, or remove/replace them with KubeJS (recipes.js). - Tags. Blocks join the vanilla tags their shape implies:
minecraft:slabs,stairs,walls,fences,buttons,stone_buttons,wool,climbableand themineable/*tool tags (same for the item tags). Tinfoil has notinfoil:orc:tags of its own yet; add the ones your pack needs (e.g. ac:stonesor a pack-wide "marble" tag) with a datapack ortags.js. - Loot. Every block drops itself (slabs: two when doubled). Loot tables are in
data/tinfoil/loot_table/blocks/.
Data-driven content (datapack)
| what | where | format |
|---|---|---|
| Statue schemes (Founders' colossi) | data/<ns>/tinfoil/statue_schemes/<name>.json | shades (block ids, light → dark), core, ornament, glow, moss, plinth, plinth_trim |
| Ruin schemes (ruin and anomaly pieces) | data/<ns>/tinfoil/ruin_schemes/<name>.json | the statue-scheme keys plus optional metal, metal_dark, , mark |
| Patterns (crop circles, geoglyphs) | data/<ns>/tinfoil/patterns/<name>.json | `{"kind": "crop_circle" \ |
| Ancient Islands | data/tinfoil/worldgen/structure/ancient_island.json, structure_set/ancient_islands.json | vanilla structure + structure set (spacing, salt) |
| Where islands spawn | biome tag tinfoil:has_structure/ancient_island | default #minecraft:is_overworld |
A scheme in your own namespace sits next to Tinfoil's; one with the same id (data/tinfoil/...) replaces it. Example scheme: examples/datapack/statue_scheme_obsidian.json, used as /tinfoil statue place <player> pristine standing mypack:obsidian.
Crop circles and geoglyphs only press into natural ground (dirt, grass, sand, farmland, terracotta, gravel) and never cut into builds or water, so custom patterns are safe on populated servers.
Config
config/tinfoil-common.toml, see CONFIG. The Founders are [statues] players: the defaults are the players of the server Tinfoil was made for, so a pack should put in its own list (or an empty one for the bundled default skin).
Relic artifacts and relic caches
When a world is ported, block entities and items the porter can't map aren't thrown away:
carries the data component
tinfoil:relic_artifacttinfoil:relic_origin{id, state, data, data_version}: the original item id, its full 1.20.1 NBT and the data version it came from. The tooltip names the original.is a block whose block entity stores the same origin for a whole container; breaking it releases the contents (upgraded by Minecraft's data fixers where the item still exists, artifacts otherwise).
tinfoil:relic_cache
To hand players a fair replacement, read the origin with /tinfoil relic inspect (held item or the cache you look at) or script it: relic_exchange.js swaps known artifacts for a replacement when a player uses them.
Legacy ids
tinfoil/legacy_ids.json inside the jar maps old ids (from the mods the old world used) to their replacements and becomes registry aliases: a chunk or item with an old id loads as the replacement instead of air. It is written by the porter (porter legacy), read once at startup and only applies to ids that aren't registered, so it never shadows a mod that is actually installed. It is not a datapack file. To check or switch it off:
/tinfoil diagnoseshows how many aliases are active.-Dtinfoil.legacyRemap.disabled=true(JVM flag) turns it off, once/tinfoil scanis clean and every imported chunk has been re-saved.
KubeJS examples
Plain scripts under docs/examples/kubejs/, written against KubeJS 2101 (NeoForge 1.21.1). Copy them into your instance's kubejs/ folder and adapt.
| file | what it shows |
|---|---|
server_scripts/recipes.js | extra stonecutter routes, replacing a family's crafting recipe |
server_scripts/tags.js | putting Tinfoil blocks into c: and pack tags |
server_scripts/relic_exchange.js | swapping relic artifacts for replacements by their original id |
client_scripts/tooltips.js | a pack-specific tooltip line on Tinfoil blocks |
The examples are not run by the mod's game tests; check them against the KubeJS version of your pack.