Commit Graph
4897 Commits
Author SHA1 Message Date
piexel cff15f93c5 Expect no minItems on the options that default to an empty list
The schema tests pinned minItems on options whose @MinItems is gone. Only the
decorator palette is asserted to keep it.
2026-11-06 14:39:55 +01:00
piexel 7bef5dbfd4 Remove the dead cave_ceiling marker references
The carve stage writes only cave_floor markers. The marker skips in the block
drop router, the marker spawn scanner and the modded block break and spawn
handlers, and the modded /iris what markers suggestion, no longer name
cave_ceiling.

/iris what markers' parameter help says "Marker name such as cave_floor". The
key is renamed to match, in the catalog and all 18 message files.
StructureAnchorMode.CAVE_CEILING is a different thing and stays.
2026-11-06 14:34:31 +01:00
piexel 67d5128942 Enforce @MinItems on the options a pack writes
DeclaredBounds checks it with @MinNumber and @MaxNumber, so pack load,
validation and every resource decode refuse an option written with fewer items
than it declares, naming the option: decorators[1].palette has 0 items; it must
have at least 1. An option the pack does not write is the module's default and
is not checked.
2026-11-06 14:34:31 +01:00
piexel ce7f782561 Say where a missing snippet reference is read from
A reference is snippet/<name>, a file below snippet/<snippet folder>/. A
pack still written as snippet/decorator/bush, in the layout from before the
folder was iris/decorant/decorator, was reported as having no file
snippet/iris/decorant/decorator/decorator/bush.json, which reads like a
doubled path in the lookup. The lookup is right; the message now names the
folder the name is relative to.
2026-11-06 14:30:27 +01:00
piexel 28d9c34dd2 Make the modded help list only what the tree has
- /iris help structure no longer lists the cut place, nor list, info and
  verify, which live under /iris module now. The group text names import and
  capture.
- /iris help lists the module command.
- Rendering the goto and find sections threw "Unknown message key" because
  the unregistered entry's text was never in the catalog. It is now.
- A test checks every documented word of every section against the
  Brigadier tree, and that every section renders.
- 4 localisation keys lost their last user and were removed from the
  catalog and all 18 files.
2026-11-06 14:29:10 +01:00
piexel f7aaed79a6 Move module commands under /iris module <root> <command...>
Module commands get their own branch, with the alias /iris m. <root> is the
root a module registers through ToolingRegistry.registerCommand, so
/iris module structure list|info|verify replaces /iris structure list.

- Bukkit: the branch word is taken before the Director runs; the Director
  first, then dispatcher fallback and the merged completions are gone. The
  first word completes "module".
- Modded: the greedy-string tails at the /iris root and inside the
  structure literal are gone. The module and m literals take one greedy
  string, because the roots belong to the modules of the pack the sender
  resolves to when the line runs, so they cannot be Brigadier nodes when the
  tree is built.
- /iris module alone lists the mounted roots and their commands; an unknown
  root is an error that points to that list.
- Permissions are unchanged: iris.all, and commands opened to everyone.
- /iris structure import and capture stay Director commands.
2026-11-06 14:29:05 +01:00
piexel 88fe8c8bcd Register the spawn module in the spawner tests
The spawner tests ask the running world for saved state, which now needs
the key to be registered, so their pack serves SpawnModule.
2026-11-06 13:10:58 +01:00
piexel 0b5b0190f5 Make smartBored return a bored copy instead of changing the pack's object
Boring an object mutated the shared IrisObject, so what a placement saw
depended on which placement bored it first. IrisObject now keeps one bored
copy, made on the first ask and dropped when its blocks change, so later
asks cost a field read. The bore runs under the read lock without
changing the original.
2026-11-06 12:59:35 +01:00
piexel 699ad3f6fe Drop Mantle.isCarved and MantleCaverns
The module mantles no longer answer isCarved, so MantleCaverns, which
only served it, goes. Tests read the carved layer.
2026-11-06 12:56:05 +01:00
piexel db4972b42a Serve saved state only for keys the pack's modules registered
The running world's saved state checks each key against the pack
catalog's registered saved keys and refuses an unregistered key or
another key with a registered id. Mantle and saved keys follow the api's
ResourceId ids and StorageCodec.
2026-11-06 12:54:22 +01:00
piexel 96532f9a22 Make an Iris world's running world and structure host once
running() and the structure host were created lazily without
synchronisation, so two first callers got two instances. Two running
worlds mean two SavedWorldStates and one of them is never saved. Both are
now final fields built with the world. A concurrency test reproduces the
split on the old code.
2026-11-06 12:46:29 +01:00
piexel 4f772e2b48 Remember the cavern slices of a 4 by 4 window of chunks
A chunk and its eight neighbours no longer share a place, so the apply stage reading
across a border does not rebuild a chunk's slices on every block.
2026-11-06 12:29:55 +01:00
piexel 36f5b7e8b8 Pin the carved voids and final blocks of a fixed cave pipeline run
Carves and applies a fixed block of chunks of one seed, every chunk carved
before any is applied, and pins a digest of the planned cavern cells and of the
final blocks. Set IRIS_CARVE_BENCH to time the passes.
2026-11-06 12:23:06 +01:00
piexel a3cbb0e053 Serve Mantle.carved over the cavern slice, delete the MatterMantle offers
CarvedVoids is IrisApi's carved-void layer over the mantle's MatterCavern slice,
which stays the storage form every other reader uses: the liquid byte is the
fill and a custom biome key is a pack biome id. It remembers the slices it
touched last, writes the shared constants and reads an area in order from a flat
grid, so the carver's per-block writes and the apply stage's visit stay cheap.
Placements and edits see it read-only. MatterMantle, OwnChunkMatter and the
loaded-chunk reads behind them are gone.
2026-11-06 12:23:06 +01:00
piexel a6f1ccd1e7 Drop the LegacyStreams offer and IrisPlacementForm
The module now draws the chunk random, density and heightmap from the API, so
IrisLegacyStreams, the ToolWorld extension and the placement form that cached
Iris's noise for them have no reader left.
2026-11-06 11:39:57 +01:00
piexel 97410afad9 Persist RunningWorld.saved under the world's module-data folder
SavedWorldState reads a value when first asked for and writes it, framed with
the codec version, when the engine saves its data and when the world stops, so a
hotload hands the new world what the old one wrote. A rejected payload is logged
and replaced by the key's initial value. Spawner cooldowns leave IrisEngineData
and the EngineSpawnCooldowns facade; old cooldowns in engine data are not migrated.
2026-11-06 11:39:57 +01:00
piexel 7c90040924 Follow the API's move of MantleCodec to com.volmit.data.Codec 2026-11-06 11:39:54 +01:00
piexel a905dc24e7 Remove the messages of the structure commands that moved to the module
28 keys lost their last user: the Director and modded texts of structure list, info and
verify. They are gone from the catalog and from en_US and all 17 other locales.
2026-11-06 10:51:16 +01:00
piexel 2a68f41bef Mount the tooling commands on the modded /iris root
A greedy-string tail with a suggestion provider sits next to the literals of the /iris
root and inside the structure literals, so literal commands keep winning. The modded
list, info and verify trees and ModdedLocateCommands.verifyStructures are deleted;
the import and capture notices stay.
2026-11-06 10:51:15 +01:00
piexel 6a3c51e4fe Mount the tooling commands on the Bukkit /iris root
CommandSVC hands a line to the dispatcher when Director does not handle it, merges its
completions, and lets a sender without iris.all run only commands opened to everyone.
The old Director list, info and verify of CommandStructure are deleted; import and
capture stay.
2026-11-06 10:51:13 +01:00
piexel a5d0229417 Register structure list, info and verify through the tooling api
StructureModelModule mounts /iris structure list|info|verify as a module Command:
list writes the structure index through ToolPack.edit, info takes the structure as a
pack resource, and verify reads the world the sender stands in and reports in plain
text. The tests run list, info and verify through the dispatcher and pin that no other
module can take the structure root name or its aliases.
2026-11-06 10:51:12 +01:00
piexel bcec8e474d Add the tooling command dispatcher and the ToolPack over Iris's pack data
ToolingCommands resolves the pack of a line (pack=<name>, the sender's world, the
sender's open studio), walks the registering module's Command tree, parses the typed
arguments and runs the action on a worker thread. It also completes, and gates
commands to operators unless they are open to everyone. IrisToolPack holds the
pack's IrisData for each edit, so no hotload or second edit runs inside it, then
reloads the resources once; outputFolder is the workspace exports folder of the pack
and IrisObjectCodec reads and writes .iob.
2026-11-06 10:51:10 +01:00
piexel f7d2ce86a7 Pin that the export writes the structure graph's references 2026-11-06 10:08:10 +01:00
piexel 5979e3d49d Export structures and objects through the generic resource closure
The packager no longer runs StructurePackageClosure: ModuleResourceClosure
already follows the structure, pool, piece and loot references the model
annotates, and now also collects the object keys everything it follows names.
Pack validation runs first and reports broken structure graphs.

ExportClosureComparisonTest is the gate. On the overworld pack, following every
structure gives the same 210 pools, 1169 pieces and 1169 objects as before. The
export now also carries 10 objects that floating child biome object overrides
place, which the old export left out.

PackExportClosure had no callers and is removed.
2026-11-06 10:07:32 +01:00
piexel 4e7a46fb2d Drop the legacy structure index cleanup
structures/structure-index.json is no longer removed or skipped by validation.
Nothing is released, so an old pack that still has the file sees it reported as
a structure without a start pool.
2026-11-06 10:07:32 +01:00
piexel ab32568550 Check structure placements and references as typed settings
The 800-line JSON placement validator is gone. StructurePlacementValidation
checks what the placement types cannot state (one backend, separation below
spacing, the height band, the ring radius, placement ids and anonymous grids,
editable structures that exist and avoid VACUUM/ENCASE, registered native
sources and start pools). StructureReferenceValidation checks the structure,
pool, piece and object references of every file, placed or not. Shapes, enum
names and bounds are the decoder's.

Validators read the platform's registries through ValidationContext.platform(),
empty in a build and at datapack bootstrap.

The live jigsaw metadata, start-element span and terrain-envelope checks are
cut (design call 3.7).

Object and matter loaders no longer read the runtime settings outside a runtime
pack, so a pack validates without a platform. A number option written as text
now names its path: "structures[0].terrain.lobeStrength must be a number".
2026-11-06 10:07:19 +01:00
piexel 1bcd846fb5 Enforce declared bounds and make importedStructures a typed check
The settings decoder now enforces @MinNumber/@MaxNumber on every option
a pack writes, nested ones included, naming the full path. Module
resource files get the same check. Pack validation reports every
dimension, region and biome whose settings fail to decode as a blocking
error; before, the failure only logged and the pack passed.

With that in place, batch 9 S15 replaces 120 lines of hand-written JSON
checks of importedStructures with a typed check beside StructureValidator
for what types cannot say: blank keys and a structure set without a
namespace. @MinItems stays unenforced for now (OPEN_QUESTIONS 57).
2026-11-06 07:53:57 +01:00
piexel d1a9c2c68b Cut structure place commands, importvanilla structures and transform nags
Batch 9 stage 1 cuts S9, S10, S11 and S14:
- /iris structure place (Bukkit and modded) is gone; placing an Iris
  structure in-world is studio tooling that moves with the module.
- /iris studio importvanilla no longer takes structures; the structure
  import commands are the one entry point.
- The rotation/translate/scale nag on structure placements is gone. A
  parse-only pass keeps reporting dimension, region and biome files that
  are not JSON.
- Their message keys leave the catalog and every locale.
2026-11-06 07:41:37 +01:00
piexel 949157fd26 Drop Iris's compatibility seeds, reserved stage flags and noise fallbacks
- Iris answers every purpose seed by the API's rule; IrisWorldSeeds and
  its legacy map are gone.
- Every mantle stage gets an assigned flag; disabledComponents names
  stages by id, and a name that matches no stage fails the world.
- An unknown noise style or a missing expression throws.
2026-11-06 07:31:11 +01:00
piexel 6e1a206013 Follow @ResourceRef in the export closure and schema 2026-11-06 07:16:27 +01:00
piexel 4acc1ee2b9 Test how PlacerTerrain keeps each marker kind
Replaces MantleMarkerTypesTest, which only kept two id copies equal.
2026-11-06 06:42:25 +01:00
piexel 7bc9f21f50 Write typed markers with an exhaustive switch; drop MantleMarkerTypes
The marker ids no longer need a copy in core or a test keeping it equal
to the module's.
2026-11-06 06:37:34 +01:00
piexel 0c2aefef20 BiomeModule and CustomModule own their stage constants
Core modules no longer take their stage ids from the built-ins jar's
IrisStages.
2026-11-06 06:30:50 +01:00
piexel b961a5d3b2 Follow the API's renamed highest, get and withPropertyIfAccepted 2026-11-06 06:18:37 +01:00
piexel f98d78a87b Splice studio edits in core instead of the API
JsonSplicer holds the text edits JsonText used to carry; GraphEdit works on
it with typed path steps. The bridge maps the API's Optionals to the wire the
studio already reads (-1 for no part or block, a blank group), so the studio
is unchanged.
2026-11-06 06:09:16 +01:00
piexel c0ac9d7f4e Follow the API's removed object transformer and placement blocks
IrisObjectTransformer and TerrainBlockView served only
PlacementContext.objects() and blocks(), now gone from the API. The
settings decoder no longer reads object generator keys, and the schema
drops the platform biome reference. The entity pin moves because
EntitySpec no longer prints its empty extensions list (verified: the new
print with ", extensions=[]" put back in its three places is the old one).
2026-11-06 05:55:51 +01:00
piexel eb2ac206b1 Choose the studio editor: VSCode, Zed or none
Port v3e's studio.editor setting. StudioEditorLauncher opens packs and pack
files in the chosen editor: VSCode through the desktop, Zed as its own
process on the pack folder. ZedProjectSettings keeps the pack's
.zed/settings.json schema mappings in step with the code workspace.
studio.editor replaces studio.openVSCode, with no legacy bridge.

`iris studio editor` (aliases vscode, vsc), `iris edit`, the modded edit
and workspace commands and the studio app's "Open biome file" all go
through the launcher. The bridge now says which editor opened the file,
or why none could.
2026-11-06 05:31:17 +01:00
piexel 9c39c564be Remove the Swing vision map and noise explorer
The studio app's map and noise views replace them. Gone: VisionGUI,
NoiseExplorerGUI, their render controllers, viewports and palette, their
tests, the iris studio noise command on Bukkit and modded, and the 73
message keys only they used, from the Java constants and every catalog.
The overlays the studio bridge uses for player markers and teleports stay.
2026-11-06 05:15:02 +01:00
piexel db2962a25e Edit procedural objects from the studio bridge
New routes scene-file, scene-edit and scene-write read an editable
entry's file as nodes with the schema types its forms need, apply graph
edits (set, unset, append, add item, delete, duplicate, move) keeping the
file's formatting, and write whole texts back for undo. An edit made on
an older revision is refused with 409. Edits are refused with 403
outside a studio world, which alone hotloads its pack. Files are
written beside themselves and moved over, so the pack watcher never
reads one half written.
2026-11-06 05:06:25 +01:00
piexel 7eff4d0754 Serve module pattern views over the studio bridge
ModuleViews finds a pack's studio views of one kind; StudioScenes and the
new StudioPatterns sit on it. The bridge lists pattern views, their
entries, and lays out one tile of an entry at a depth (PatternEncoding:
JSON header with the block keys, then an i16 pick per column).
2026-11-06 02:39:45 +01:00
piexel 5dd753c589 Studio bridge: noise sources and noise tiles
The noise view's catalogue (overlay noise, pack generators and expressions,
every noise style, in v3e's categories) and float tiles of any source at a
seed and scale.
2026-11-06 02:15:24 +01:00
piexel 7d06fb50c3 Studio bridge: read saved worlds from their region files
The bridge lists the dimension folders under the level folder that hold
region files, finds where a saved world's view opens (the middle of the
region nearest the origin, with its sea level) and serves square tiles
of saved columns: the ground under trees, plants and water, the water
surface over it, and its block and biome. Biomes the open pack saves
under its own keys get the pack's map colours.

Chunks are read with VolmLib's NBT reader in the 1.18 and later layout,
lazily, a chunk at a time; a region whose file changed is read again.
Snow and other thin blocks count as ground only where they lie on
ground, so snowy treetops are looked past.
2026-11-06 01:58:21 +01:00
piexel c753a1a7fe Studio bridge: scene views and Minecraft assets
The bridge lists the scene views the pack's modules registered, their
entries, and encodes a scene as a palette of block states and their
positions from the anchor. Assets come from the Minecraft client jar of
the server's version, fetched from Mojang the first time the studio asks,
checked against Mojang's SHA-1 and cached; until then the route answers
503 with Retry-After.
2026-11-06 01:18:52 +01:00
piexel 13c0705d44 Studio map: inspect noise picks and preview one region
The picks route measures, for the area in view, how each region or biome
noise spreads over the bands that pick its options, against how much
ground each option gets. Tiles can carry the noise that settled each
spot's pick, and the regions view can preview one region across the
whole map with the surface biomes it would place there.

Preview tiles take their heights from the shading lattice, so they draw
as fast as biome tiles. Only coastline pixels can then disagree with the
hover's exact biome: 0.25% of spots at 1-2 blocks/px, 2.3% at 8.

The bridge serialises nulls so the studio can tell "none" from "not sent".
2026-11-06 01:10:17 +01:00
piexel 467d42abea Studio map: explain how each spot got its region and biome
The hover now carries the pick path: the region pick, the biome list
pick and every child level, each with its noise value and the share of
the noise every option owns. IrisComplex exposes the pick noise, the
pickable biomes and the child slots it already used, so the explanation
reads the same inputs the generator does; generation is unchanged
(probe signatures match before and after). Hover takes the view, since
the path depends on it.
2026-11-06 00:40:27 +01:00
piexel 4de21dace7 Studio bridge: smaller tiles, quiet hang-ups, files removed on stop
- 128-pixel tiles by default and scales up to 4096 blocks per pixel, so
  the studio fills the screen in smaller steps and can zoom out further
- A client that drops a tile it no longer needs closes the exchange
  instead of logging a broken-pipe stack trace
- The bridge keeps its port after closing, and Paper's server-stop
  quiesce closes the bridges, so their connection files are removed
  even when the deferred service teardown never runs
2026-11-06 00:22:15 +01:00
piexel a375d3b2f0 Serve the studio map over a local bridge
/iris studio map now starts a bridge for the world instead of the Swing
map: HTTP on 127.0.0.1, a free port and a per-bridge token, with the
world, tiles, hover, entities, teleport and open-in-editor, and server-sent
events for players and hotloads. A connection file under
~/.iris/studio/bridges lets a studio app on the same machine find it.
Works on headless servers. Bridges close with the plugin or mod.
2026-11-05 23:26:38 +01:00
piexel 60ba7e644c Add the studio map's core views: tiles, labels and hover
The 2D views of the coming studio app (biomes, regions, height, land, sea
and cave biomes) as core code. A tile says what each pixel shows (its biome
and region, and heights for shading) with a ring of neighbour pixels, so the
app styles it without asking again; the hover describes one column.
2026-11-05 23:13:22 +01:00
piexel 8be0597a36 Place v3e's parts-based procedural objects like any object
Procedural objects are now definitions of parts in the pack's procedural/ folder (module resource
kind iris:objects/procedural) that bake into variants; an object placement names them as
procedural/<path>, or procedural/<path>#<index> for one variant. The v4-era proceduralObjects
settings and their tests are gone.

- TreeDefinitionIndex knows trees/ and the ids modules report as trees; ModuleServices merges
  only those.
- Golden test: the 72 definitions of the overworld pack (fixture procedural-parts) bake as when
  the digests were taken, on a game-like block platform (GameLikeBlocks).
- Fixtures pack-before-the-port, pack-terrain and pack-before-loot-and-spawn converted: their
  proceduralObjects became object placements, sets became placement snippets.
- Tests follow: tree index, warm-up, placement reach, surface support.
2026-11-05 23:00:13 +01:00
piexel d0ca502a56 Read @JsonForms values through their codec; keep a state whose block rejects a value
JsonFormsCodecs reads and writes IrisApi @JsonForms classes as the plain values Gson reads into an
Object, for the module settings decoder (and so every module resource file) and for tests'
TestSettings. IrisBlockRegistry.withProperty returns the state unchanged when the platform does
not accept the value, as IrisApi now defines it.
2026-11-05 23:00:13 +01:00