You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds the ore/material ids that smelting (#3) and tool tiers (#4) will depend on. Independent of crafting, but should land before those so they have materials to consume.
Context
Worldgen currently emits only three ores — coal, iron, copper — defined in src/game/gen/Ores.ts:30-34 and src/game/gen/BlockIds.ts:22-24 (COAL_ORE=16, IRON_ORE=17, COPPER_ORE=18). No gold, diamond, redstone, lapis or emerald exist yet.
Scope
src/game/gen/BlockIds.ts — append new ore ids to BLOCKS (never reorder — chunk data stores raw ids, per AGENTS.md). Add: GOLD_ORE, DIAMOND_ORE, REDSTONE_ORE (redstone-equivalent), LAPIS_ORE, EMERALD_ORE. Also add their deepslate variants if Graphics & performance pass: presets, perf overlay, water, debug tooling #3's deepslate layer lands here.
src/engine/Textures.ts — add tile painters for each new ore in the 8x8 atlas (speckled-on-stone pattern, consistent with existing ore painters). flipY = false UV math must be preserved.
src/game/Items.ts — add raw-ore drops to DROP_TABLE (line 114) and creative palette entries (line 84).
src/game/Blocks.ts — add BlockDef entries with appropriate hardness and miningTier (diamond should require iron-tier or higher to mine).
Gotchas
Noise thresholds must be measured, not guessed.AGENTS.md warns that Perlin's real range is ~[-0.9, 0.93] and that thresholds that "feel right" often never fire. Measure percentile distribution of existing ore noise before setting spawn thresholds, or veins will be absent (or everywhere).
Adding a block = coordinated edit across BlockIds.ts, Blocks.ts, Textures.ts.
Acceptance criteria
Each new ore generates deterministically from the seed at sensible depths and rarity.
Adds the ore/material ids that smelting (#3) and tool tiers (#4) will depend on. Independent of crafting, but should land before those so they have materials to consume.
Context
Worldgen currently emits only three ores — coal, iron, copper — defined in
src/game/gen/Ores.ts:30-34andsrc/game/gen/BlockIds.ts:22-24(COAL_ORE=16,IRON_ORE=17,COPPER_ORE=18). No gold, diamond, redstone, lapis or emerald exist yet.Scope
src/game/gen/BlockIds.ts— append new ore ids toBLOCKS(never reorder — chunk data stores raw ids, perAGENTS.md). Add:GOLD_ORE,DIAMOND_ORE,REDSTONE_ORE(redstone-equivalent),LAPIS_ORE,EMERALD_ORE. Also add their deepslate variants if Graphics & performance pass: presets, perf overlay, water, debug tooling #3's deepslate layer lands here.src/engine/Textures.ts— add tile painters for each new ore in the 8x8 atlas (speckled-on-stone pattern, consistent with existing ore painters).flipY = falseUV math must be preserved.src/game/gen/Ores.ts— add depth-gated veins: gold (deep), diamond (very deep, rare), redstone/lapis/emerald (mid-deep).src/game/Items.ts— add raw-ore drops toDROP_TABLE(line 114) and creative palette entries (line 84).src/game/Blocks.ts— addBlockDefentries with appropriatehardnessandminingTier(diamond should require iron-tier or higher to mine).Gotchas
AGENTS.mdwarns that Perlin's real range is ~[-0.9, 0.93] and that thresholds that "feel right" often never fire. Measure percentile distribution of existing ore noise before setting spawn thresholds, or veins will be absent (or everywhere).BlockIds.ts,Blocks.ts,Textures.ts.Acceptance criteria
Roadmap reference
Phase 2 — "More ores & materials".