Commit Graph
5246 Commits
Author SHA1 Message Date
piexel ccdfad8ba5 Clear deferred custom block and tile records under native structure writes
Native structures overwrite blocks that still have deferred records in the mantle,
so the later materialization pass replayed them onto the structure. Record the
positions each structure placement wrote and drop the records there.

Upstream: ff537f4ab
2026-11-10 01:18:03 +01:00
piexel 443ed9af65 Skip deferred custom block and tile records whose live block is no longer the carrier
A custom block record replayed onto a block that was flattened or replaced writes
a ghost block, and a tile record onto a different block fails with a warning.
Resolve each carrier once per chunk pass and skip stale records on Bukkit and modded.

Upstream: dbc9d9537
2026-11-10 01:18:03 +01:00
piexel 867851366d Reach slope-tilted objects as far as a vertical rotation
A placement that turns towards the slope can tilt a tall object even when its configured rotation is disabled, so its reach counted only the horizontal footprint and the write and read windows cut it off at chunk seams. Count it like a vertical rotation: the tallest dimension as footprint and the full translation vector.

Upstream: 7aaf346ce b34e5e767
2026-11-10 01:10:32 +01:00
piexel 971cad0463 Let modded worlds bind and generate with generate-structures=false
Binding and native structure placement used to throw when the world had structures disabled; native families are already off in that case, so the guards only crashed the world.

Upstream: ee5aaec87
2026-11-10 01:06:18 +01:00
piexel c3c137a33c Drop blocks with no valid orientation when an object is rotated
A wall-mounted block that cannot face the new way put a null into the rotated object, and its tile was copied anyway. Rotation now omits the block and its tile, the module placement skips blocks that turn into air, and scaling reads geometry and volume under one read lock.

Upstream: 606aa2e70
2026-11-10 01:03:41 +01:00
piexel 8e0e6d7d45 Check native structures against the real transformed object bounds
The native-structure veto used a square envelope of half the largest object side, so rotated or off-centre objects reaching past it were never checked. It now uses the prepared transformed bounds, with Y widened by the warp margin. IrisObject.copy() now reads under the read lock instead of the object monitor.

Upstream: d55c77572
2026-11-10 01:00:40 +01:00
piexel a81a3abb9f Add a license per folder
api is MIT; module and studio are GPLv3 (module carries Iris code).
2026-11-06 16:54:29 +01:00
piexel b3b0c64b55 Point the build at the api, module and studio folders
The Iris and module builds used to find IrisApi and IrisModule as siblings; they now use the folders in this repo.
2026-11-06 16:54:29 +01:00
piexel 4e226b93f4 Merge IrisStudio into studio/ with its history
git-subtree-dir: studio
git-subtree-mainline: 68ae3c8d3a
git-subtree-split: 1c50eaf776
2026-11-06 16:52:58 +01:00
piexel 68ae3c8d3a Merge IrisModule into module/ with its history
git-subtree-dir: module
git-subtree-mainline: 925c942764
git-subtree-split: 27b0036450
2026-11-06 16:52:56 +01:00
piexel 925c942764 Merge IrisApi into api/ with its history
git-subtree-dir: api
git-subtree-mainline: cff15f93c5
git-subtree-split: dac8baa3ab
2026-11-06 16:52:54 +01:00
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 27b0036450 Stop skipping the cave_ceiling marker in entity spawning
No stage writes that marker any more; only cave_floor is left.
2026-11-06 14:34:26 +01:00
piexel 6d18d51076 Drop @MinItems from the options whose empty list means none
70 options carried @MinItems(1) but default to an empty list, and packs write
[] for them, such as the cave profile's modules or a decorator's blacklist.
Only the three palettes that default to a block keep it: PaletteSpec.palette,
PaletteLayer.palette and Decorator.palette. The loader enforces @MinItems now.
2026-11-06 14:34:26 +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 d4704817a5 Point the structure key list at /iris module structure list 2026-11-06 14:28:49 +01:00
piexel dac8baa3ab Name the module branch in the command docs
Module commands mount under /iris module <root> <command...>, so the
registerCommand docs and the README example name that path.
2026-11-06 14:28:48 +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 616e50e605 Move the host side of the README to HOST.md, fix the stale host example
README is for module authors; the 190 lines about loading packs and
running stages are in HOST.md, linked from README. The host example uses
the packages Iris exposes today and no longer shows the deprecated
describingHostTypesIn. DESIGN records that Sender.extension is a
deliberate platform-tooling door that stays.
2026-11-06 13:03:08 +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 131f1575ae Document that only the host makes PlaceableObjects
PlaceableObject was described as immutable and implementable. The host
rejects foreign implementations, and smartBored now returns a copy
instead of changing the shared object. The javadoc and README say so.
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 cd03fb0c0a Ask the carved layer instead of Mantle.isCarved
DepositPlacer tests carved().get(x, y, z) for null, as the api no longer
has Mantle.isCarved.
2026-11-06 12:55:46 +01:00
piexel 0691753d21 Remove Mantle.isCarved, carved().get(x, y, z) != null asks the same
The mantle had two ways to ask whether a position holds a carved void.
The layer is the one way now.
2026-11-06 12:55:41 +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 769a29ce83 Register the spawn cooldown book as a saved key
SpawnModule registers SpawnCooldownBook.SAVED in setup, as the api now
requires, and the key uses ResourceId and StorageCodec.
2026-11-06 12:54:19 +01:00
piexel 307b89c5fe Register saved keys per module, key mantle and saved ids by ResourceId
SavedKey moves to com.volmit.data and Codec becomes StorageCodec, which
ends the clash with JsonForms.Codec. SavedKey.id and MantleKey.id are
ResourceIds, so the copied id regex is gone. Modules register saved keys
in setup with FeatureRegistry.registerSaved, owned like mantle keys, and
RunningWorld.saved rejects a key that is not the registered one.
2026-11-06 12:50:42 +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 62e33edfe3 Plan caves in Mantle.carved, drop MatterMantle
The carver, its fluid-support and orphan passes, CaveApplying and CarvedSpace
read and write IrisApi's carved-void layer instead of VolmLib matter slices.
Cave floors for the spawners are marked by the carve mantle stage through
PlacementTerrain.mark, from the planned voids; cave ceiling markers, which
nothing read, are gone. CaveApplying reads the 16 blocks around its chunk
through the chunk stage's mantle view, not only the neighbours already in
memory. MatterMantle and the module's Cavern are deleted.
2026-11-06 12:22:59 +01:00
piexel 6c8fa31a7b Add Mantle.carved, the host-owned layer of carved voids
CarvedVoid says what fills a carved block (open, fluid, lava or air) and
optionally the biome it shows; the plain fills are shared constants so a carver
allocates nothing per block. A mantle stage writes the layer, a chunk stage
reads it and its writes throw. Placements and edits see it read-only.
2026-11-06 12:19:51 +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 fa7c3a0abf Draw object chunk random, density and heightmap from API types
The chunk random is seeded from a purpose seed and the chunk, the density from
StyledRange over the API noise factory, and VirtualHeightmap builds the virtual
heightmap from NoiseSampler. LegacyStreams and ObjectPlacement.hostForm, which
only served Iris's placement form, are removed. The chunk random and density
noise now differ from the old streams; heightmaps are unchanged.
2026-11-06 11:39:35 +01:00
piexel 1e0a8d2bd6 Keep spawner cooldowns in the module, on RunningWorld.saved
SpawnCooldownBook holds when each spawner last fired in the world and in each
chunk and is saved with the world through a SavedKey. The SpawnCooldowns facade,
which only existed because API state was memory only, is gone.
2026-11-06 11:39:35 +01:00
piexel cf0e49e34d Reject saved ids whose namespace or path could leave the world's storage
The id names the stored file, so a namespace of .. must be rejected as well as a path segment.
2026-11-06 11:29:26 +01:00
piexel a0fcb74365 Add RunningWorld.saved, state a module keeps with the world across restarts
A world's state store is memory only, so Iris offered spawner cooldowns through a
facade to persist them. SavedKey names a value with its codec and initial value;
the host reads it on first ask and writes it when it saves and stops the world.
2026-11-06 11:22:29 +01:00
piexel 7cc3302c32 Move MantleCodec to com.volmit.data.Codec
Saved world state stores values with the same contract, so the codec no longer
belongs to the mantle package or says mantle in its doc.
2026-11-06 11:22:29 +01:00
piexel c61865b9f2 Document the command api of com.volmit.tooling 2026-11-06 10:51:21 +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