Commit Graph
191 Commits
Author SHA1 Message Date
piexel fc3ea69d74 Reload Zed schemas after they are regenerated
Zed's JSON server caches schema files until its configuration changes and never reports schema file edits. Schema files are now written through one writer that hands back the text, and a hash of those texts goes into the Zed settings as irisSchemaHash, so regenerated schemas reach the editor.

v3: f31d41a9f
2026-11-10 11:11:14 +01:00
piexel 23bed57728 Let the server's placement rules reset on reload and stop post from removing foliage
The remembered "plant survives on ground" answers went stale when the server or CraftEngine reloaded resources, so they are now cleared on both events. The post-stage foliage removal second-guessed the server rule and deleted foliage that is not a decoration, so it is gone.

Pins: none moved; the only changed test is SurfaceSmoothingTest, which now expects the fern to stay.

v3: af333cc93
2026-11-10 10:49:00 +01:00
piexel 0b5aa54df7 Skip hotloads while a touched pack JSON does not parse
A bad save still hotloaded: the loaders return null for unparseable files, so the pack lost those biomes or regions. The new PackHotloadGuard keeps files that fail to parse until they parse, skips the hotload, logs it and sends a failed studio hotload message. Both the Bukkit generator and the modded studio hotload service gate on it, and the callback returns normally so the watcher does not retry.

v3: fe825040a
2026-11-10 10:43:34 +01:00
piexel 5efffcd0b2 Keep the .zed editor settings folder out of pack hotload watchers
ZedProjectSettings writes <pack>/.zed/settings.json, a .json file inside the watched pack, so hand edits reloaded the studio engine. Both watchers now share one PackHotloadFolder factory that ignores the folder. The chunk/hotload exclusion is already covered by the engine transition seal.

v3: 28968673a
2026-11-10 10:39:20 +01:00
piexel 88ee0e89f7 Close Iris GUI windows on the Swing thread when the plugin shuts down
Windows otherwise outlive the plugin and keep drawing with threads its shutdown has stopped. GuiHost.closeWindows disposes every managed frame on the Swing thread and waits at most 5 s, in case that thread is itself waiting on the server. The Bukkit plugin runs it with its post-shutdown cleanup and the modded stop sequence runs it before clearing the GUI host.

v3: 6793e34d8
2026-11-10 10:28:12 +01:00
piexel 5d7d4f9648 Fix what the combined gate found in the upstream ports
The NMS adapter compiles against GenerationSessionException, which now carries the API's EngineFailure marker, so it needs the API on its compile path. moddedTest reads sources the NMS convert task rewrites and has to be ordered after it. The lifecycle contract test follows the generateNoise body into generateNoiseChunk.
2026-11-10 01:36:48 +01:00
piexel 4b1d85177f Merge upstream port lane d
NativeStructureWorldgenAccess keeps both sides: writes are still recorded for the stale deferred-record check, and they go through the POI reconciler when one is bound.
2026-11-10 01:32:04 +01:00
piexel 55786d6297 Merge upstream port lane c 2026-11-10 01:31:37 +01:00
piexel c448da1155 Merge upstream port lane b 2026-11-10 01:31:37 +01:00
piexel b731ab7c02 Treat ZIPs in datapacks/imports and file: URLs as datapack sources
Pack authors can drop a datapack ZIP into Iris/datapacks/imports or list a
file: URL in datapackImports; dropped ZIPs apply to every dimension. Local
sources are copied without following symlinks and their bytes feed the
startup validation fingerprint so the cache invalidates when a ZIP changes.

Upstream: 333b766d2
2026-11-10 01:30:00 +01:00
piexel ae60b14402 Pump native chunk tasks while server stop waits for pregen
On Paper only the server thread advances chunk tasks, so a stop that blocks on a running pregen can wait forever. Stop now polls the native chunk queue while joining the pregen worker, and pregen skips eviction and flush scheduling once the server is stopping.

Upstream: 083e68986
2026-11-10 01:27:07 +01:00
piexel 742080c6f2 Keep latched tree-felling runs going after sneak is released
Runs whose hooks opt out of sneaking were still halted when the player released sneak, and the run-control check required sneaking regardless.
Upstream: 241260a76
2026-11-10 01:25:48 +01:00
piexel af72e33a1b Stop Iris commands from reading WorldEdit selections
Iris commands acted on whatever WorldEdit selection a player had when no Iris wand was held. Only Iris wands count now, and the worldEditWandCUI setting is gone. The dedicated /object we command still grabs a WorldEdit selection.

Upstream: c53e9f826
2026-11-10 01:23:58 +01:00
piexel 3558a09a1f Restore the JVM SIGQUIT handler when the Spigot console replaces it
The Spigot terminal console resets SIGQUIT, which stops the Iris agent from attaching. Copy the SIGTERM handler back onto SIGQUIT after SlimJar loads when they differ.

Upstream: 21ab5baf2
2026-11-10 01:23:22 +01:00
piexel a578e90ecf Accept unsuffixed release versions in getIrisVersion
getIrisVersion returned -1 for releases like 4.3.4 and threw NumberFormatException on non-numeric versions. It now parses the release number and returns -1 when the version is malformed or overflows.

Upstream: 4b44bcb12
2026-11-10 01:22:13 +01:00
piexel 128e90ea9b Release the plugin instance and runtime statics on disable
A disabled Iris stayed reachable through statics and a re-enable in the same JVM answered from the previous boot's caches. Disable now releases the instance, services, capability singletons and host bindings, and reaching Iris afterwards fails with "Iris is disabled" instead of a NullPointerException.

Upstream: 6c6dba023
2026-11-10 01:21:22 +01:00
piexel 898148fade Show each Iris world's own seed and persisted chunk count in the modded listing
/iris worlds, /iris info and /iris seed printed the server level seed and a per-session chunk counter. They now read the engine's world seed and persisted chunk total, and each row is labeled by its own dimension id.
Upstream: 0c9ae9ed4 9a241b85c
2026-11-10 01:20:34 +01:00
piexel 149a257a4c Give modded teleports a 120 s first-chunk deadline and report their real failure
A cold dimension loads the pack and binds the engine on its first chunk, so the 10 s deadline failed teleports that would have worked. /iris tp, primary world routing and Iris Vision now share one 120 s deadline, and /iris tp reports a failed teleport, an unloaded dimension, an offline player or a refused teleport separately instead of always claiming the dimension is not loaded.

Upstream: 82fa69611 2d5af3b61 f55fde17d
2026-11-10 01:18:33 +01:00
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 92ab8b6d01 Reconcile POI records for natively placed structures
Native structure placement skipped POI updates, leaving beds and job sites without records. Dirty sections are now marked while the structure is placed and reconciled on chunk load on the owning thread.
The NMS adapter test classpath gains the mockito-core version core already uses, for the new tests.

Upstream: a28614c04
2026-11-10 01:14:54 +01:00
piexel 0f0760e7f4 Fill Iris loot in copper chests on the modded host
The modded storage set left out the copper chest variants, so loot was never filled in them and they were skipped by post-load updates.

Upstream: 56178b0e0
2026-11-10 01:14:06 +01:00
piexel 8d5b605afd Isolate chunk update failures in the modded update pass
One chunk throwing in a level's update pass skipped every chunk after it, and a
retry re-ran the loot of updates that had already been applied. A failed chunk
now stays unetched and is retried on a later pass while the rest of the level
carries on; only a closed engine or mantle ends the pass. Completed updates are
forgotten before a failure propagates so a retry never refills a chest.

Upstream: 5cadd9b8c dd4633ad3
2026-11-10 01:13:17 +01:00
piexel 9b86b34187 Spawn water and lava entities only inside matching fluid
Fluid entities were placed above the sea and checked against the block below and for air, so they could not spawn where they live. They now take a Y inside the fluid, are always surface-checked (marker spawns too), and both hosts test the block itself and require the fluid across the entity's volume.

Upstream: e33e6a632
2026-11-10 01:10:16 +01:00
piexel bed98c417d Close modded engines per level at unload and in a stopped phase
Server stopping used to close engines, mantle and the generation pools while the loader was still draining chunk generation. Stopping now tears down the services only; the engines and pools close at server stopped, a failed level unload is logged instead of aborting the loader's close loop, and a sweep at the next server start or JVM exit covers a loader that skips the stopped event.

Upstream: 259f88523 782a85c26
2026-11-10 01:07:00 +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 0f2272299e Start mantle-bypass maintenance only after players have left the world
Maintenance that bypasses mantle stages refuses every chunk request, so entering it while players are still being evacuated makes their chunk requests fail. It now begins after evacuation in studio close, studio disable, world remove, world unload and create rollback, and ends only if it was entered.

Upstream: b1fbede36
2026-11-10 01:01:44 +01:00
piexel 8c489e4a26 Skip the boundary field for plain floating-island parent lookups
Parent lookups built the whole boundary field per column even where no floating child needs edge distances, and the noise biome cache bound was checked on every insert. Parent lookups now read the biome source directly, and the cache bound is checked only at quart y multiples of 64.

Upstream: f2236a848 8b5c109d5
2026-11-10 01:01:09 +01:00
piexel 4db1853bea Wait for the server shutdown boundary and for replacement staging before runtime cleanup
The post-stop finisher joined the server thread, which breaks Folia ordering, and
server-stop quiescence bypassed mantle stages for queued generation. Cleanup now waits
for the shutdown boundary (a missing boundary retains the runtime), queued generation
keeps its mantle stages, and plugin disable waits for a replacement that is staging and
refuses new ones.

Upstream: 8c0b37c0b 2690e0878
2026-11-10 00:58:56 +01:00
piexel fc5c6ce0ab Refuse chunk generation while world maintenance forbids mantle stages
Folia maintenance used to generate chunks with the mantle stages skipped and then persist them without objects, caves or deposits. The engine now refuses the chunk with an expected-teardown session exception and warns at most every 5 seconds, so the chunk stays ungenerated. The REAL flag is set unconditionally.

Upstream: ea516b4a5
2026-11-10 00:58:51 +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 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 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 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 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 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 d5e75114ab Let the server decide where decorators fit
Ported from v3e (af333cc93). Whether a plant stands on a ground block is
now the server's own canSurvive rule, asked in a two-block level, so
custom ground (CraftEngine and others) grows plants too. Plants that
fail on every ground, like wall and ceiling blocks, keep fitting as
before. Dead bushes stay off grass, as packs expect. Without the NMS
binding Iris's own table answers.

Test server, world v3eports (seed 1337, radius 500): 4,225 chunks,
0 failed, no errors; plants 70,161 vs 68,905 in iriswave6 over the same
961 sampled chunks, every plant type present.
2026-11-05 21:38:27 +01:00
piexel 6522174c83 Keep child biomes when a biome is focused; goto honours focus region
Ported from v3e (af1fe9808, 05eed1f6a, eb1a24411). A focused biome now
implodes into its children instead of painting the parent everywhere,
and region goto checks what the engine actually generates, so a focused
region is reachable and the others are not. Locating already covered
child biomes and focus.
2026-11-05 21:15:00 +01:00
piexel 40436352bf Let the object model stand on the api: turn, scale, paste, records
Core turns objects with ObjectTurn and BlockTurn and scales with ScaleMethod, so
the object model no longer reads the modules' ObjectRotation and
ScaleInterpolation; /iris object paste writes the turned blocks with
IrisObject.paste instead of running a placement. IrisObject takes no
ObjectPlacement; the structure placers call ModuleObjectPlacement directly.
IrisPlacements reads the run's name and JSON, the placement type comes from the
module, placements are stored as PlacementMarkers texts and read back as
PlacementRecords, the marker ids are Iris's own, the loot shuffle seed and the
protected floor come from the modules, entity knobs are EntitySpec fields, and
entity key completion is one handler by kind id. The entity pin is retaken with
the old print proven to hash to the old number.
2026-10-28 04:05:02 +01:00
piexel 3022c54a43 Cut dead and duplicate tooling found by the tooling audit
Map modes OBJECT_LOAD, DECORATOR_LOAD and LAYER_LOAD with BiomeMaxes and the
runtime and hotloader code that fed them; the placement scans in
Engine.getObjectPlacement and the PlacedObject.placement field nobody read;
Engine.hasObjectPlacement (find uses ModuleServices.objectPlacers); the object
section of /iris studio objects and the layer lines of /iris studio profile;
the package obfuscation, which wrote object names the exported JSON never used;
the modded packager and its command; the removed-field nags for fluidBodies,
surfaceOpeningClearance and caveProfile water fields; the IrisMod resource
family and the Gson reader only it needed; the test-only ObjectPlacements
helpers; WorldObjectPlacer; Interpolated.CAVE_RESULTS; DeserializationProbe.
2026-10-28 03:29:56 +01:00
piexel 3e8c22422f Put IrisApi on the modded adapters' classpath
The fabric, forge and neoforge builds resolved neither core's dependencies on
IrisApi nor the IrisApi types the adapters read (ResourceId, BlockTurn), so
none of them compiled. They apply the IrisApi source resolution like the root
build and compile against iris-api. NativeStructureReferenceRepairTest drops
the placement identity argument that NativeStructureStartPlan lost in batch 6.
2026-10-28 03:29:45 +01:00
piexel c0ed5ed81e Batch 7 stage 3: host the api object model and placement service
IrisPlacements runs the pack's placement graph for PlacementRun over a
PlacerTerrain (an IObjectPlacer seen as an api PlacementTerrain) through
TerrainEdit; ModuleObjectPlacement uses it for Iris's own placements. Iris
offers IrisPackObjects, IrisLegacyStreams and the api block operations
(rotate, merge, withProperty, matches), and IrisObject is an api
PlaceableObject. IrisObjectHost, IrisObjectChunk, IrisObjectBuilder, the
placement facades, the placers they used (heightmap, sink, decay, island,
golden debug, cave and floating transactions) and IrisDimension.debugSmartBore
are gone. Tests follow; EdgeSimplexPinTest pins the module's simplex copy.
2026-10-28 01:25:49 +01:00
piexel e47acc847d Place with iris:objects placement settings
IrisObjectPlacement, IrisObjectTranslate and IPostBlockAccess are gone;
Iris places with the module's ObjectPlacement. IrisPlacementForm keeps
what Iris makes of a placement (its module settings decoded from the
placement's JSON, its noise as Iris generators, the surface warp cache)
on the placement's host slot. The placement reader decodes through the
module decoder. IrisObjectRotation becomes BlockStateRotation (state
turning only) and IrisObjectScale becomes ScaledObjects. Studio adds
placement-level module settings to the module's ObjectPlacement schema.

The procedural golden digests change only because the hashed options
JSON no longer carries the Iris-only warp cacheSize; a probe on the
previous commit and this one gave identical block digests and identical
option values otherwise.
2026-10-27 01:43:56 +01:00
piexel 74b129e105 Batch 7 stage 1: jigsaw definitions from the module build
The jigsaw definitions, StructureResources and IrisDirection now come from IrisModule. Iris
registers iris:structure (StructureModule) with its own modules; iris:structure-model keeps the
validator and the locator and vanilla structure services. StructureResources lookups take the
pack's PackResources, so callers pass data.getPackResources(); the Bukkit plugin compiles against
the API for that. IrisRegistrant extends the module's KeyedResource, which holds the load key.
A structure's loot placement is StructurePlacing.lootPlacement. Studio maps an API object
reference (GeneratedObject) to Iris's object loader.
2026-10-27 00:59:48 +01:00
piexel 711fdd078a Batch 6 part 3: host side of structure locating and the decoding contract
Structure locating goes through StructureLocator. Ownership records hold
one memo text and no placement identity (schema 3; older records fail
closed). NativeStructureStartsTest drops the identity column of its golden;
the other columns are unchanged.

ModuleSettingsDecoder applies the decoding contract (DecodingContract: null
members are left out, unknown enum names are errors). NoiseStyle no longer
carries cacheSize, a cache knob only. PlacementRequest has no id. Dimension
settings reach LinkedBiomes as PackSettings.
2026-10-24 09:24:18 +02:00
piexel dc0d61ce63 Apply IrisApi's typed keys, grouped values and @Ref(kind)
Batch 6, findings 41 and 42.

- Bukkit items, attributes, ambient effects and entities read ResourceIds,
  ContentKeys and the grouped ItemDrop and EntitySpec; Iris-only entity
  knobs come from the IrisEntityExtras extension.
- Iris serves the host kinds EXPRESSIONS and IMAGE_MAPS; noise styles map
  their ids back to the exact pack keys of the snapshot.
- Studio completes @Ref(kind = ...) of host kinds through Iris's loaders
  and @IrisStructureRef with the structure-model keys.
- Markers, sapling species, upper dimensions and jigsaw start pools are ids.
- Modded attribute lookup strips the minecraft namespace before the legacy
  generic prefixes, now that keys arrive namespaced.
- Loot and entity pins retaken: printed the old way, the new values still
  hash to the old numbers (recorded in the tests).
2026-10-24 06:06:59 +02:00