Commit Graph
36 Commits
Author SHA1 Message Date
piexel e9b80420de Make native structure imports opt-in and mark them experimental
A dimension without importedStructures no longer gets vanilla, mod or
datapack structures in new chunks. Declaring the setting imports them,
and disabled/disabledExact still narrow it down. Iris placements that
place a vanilla structure themselves work without it.

The feature is named "Structures (experimental)" and its description
says so. The locate message for a blocked structure now says it is not
imported by importedStructures or is disabled by a pack module.
2026-11-11 18:05:46 +01:00
piexel f98b6dc548 Let /iris std update force=true give a pack the built-in modules back
A pack without modules.json could not use the update command, and a pack that
dropped a built-in had no way to get it back but writing the file by hand. With
force=true the command adds every module Iris ships that modules.json does not
list, at the version Iris ships, writes the file for a pack without one, and then
updates as usual. What the file already lists and pins stays.

The plain command and the console warning for a pack without modules.json now
point at the flag. On modded it is the same words: /iris std update <pack> force=true.
2026-11-11 14:06:40 +01:00
piexel 9cc45b41d0 Tell the pack's author about kept module updates when they open a studio
A server that only runs a pack logged every module update the pack kept back, along
with a hint to run the update command, for a person who should not run it. The
console now logs only the patches Iris took and packs that need a newer Iris.
/iris std open lists what the pack kept back and how to take it, on Bukkit and
modded alike, so the notice reaches the pack's author.
2026-11-11 13:41:45 +01:00
piexel 0d18637128 Take only patches on their own and leave bigger module updates to the update commands
A pack used to take every newer module on load, and a major update can change the
blocks it places or stop its settings from loading. Now a load takes patches only.
A module with a new minor or major version stays as it is, and Iris warns that it is
out of date and names the new version.

/iris std update <pack> now only updates the pack's module jars, for its author to
run before checking the settings against the new versions. It no longer writes the
VSCode workspace; studio hotload picks up the new jars and refreshes the workspace.
/iris pack update does the same for a running world, which loads the new jars at
the next server start.
2026-11-11 13:31:24 +01:00
piexel 6e96c6b71e Ship each built-in module as its own jar and let a pack's modules.json decide which update on their own
The built-ins no longer travel as one iris-builtins.jar that a pack has to
copy by hand. IrisModule builds one jar per module (the eight placement
stages share one) with an index of the id and version each module reports,
and Iris bundles that folder.

A pack lists the modules it uses in modules.json, with the version it was
built with and an optional pinned list. Before a pack loads, Iris installs
the jars of listed modules and replaces a jar that differs from the one it
ships. It keeps a jar when the module is pinned, when the pack holds a newer
version than Iris ships, and, in a world's copy of a pack, when the major
version changed, because new chunks would not match the old ones. A jar that
shares classes with a kept jar stays with it, since the two were compiled
against each other. /iris pack update takes the kept terrain changes for a
world. What is installed is recorded in modules.lock.json.

Module versions are now major.minor.patch per module, starting at 1.0.0,
with major meaning "places different blocks or stops loading settings".
2026-11-11 12:51:53 +01:00
piexel e7d1ed24cb Load built-in modules only from the pack's own jar so an Iris update never changes a pack's modules
Iris no longer loads a bundled iris-builtins.jar with every pack. It carries the jar only to copy into new packs (/iris std create), so a pack and a world's copy of it keep the module versions they were made with. Built-in modules report Iris's version instead of "built-in", and /iris std modules lists every module with version, id and jar and takes the pack positionally.
2026-11-11 08:28:12 +01:00
piexel 2889274291 Merge feat/structure-jigsaw-modules into port/v3-features
Structure placement and jigsaw now live in the built-in modules jar, on top of the port's weighted picking, studio tooling
and procedural object work.

api/CONTRACTS.md keeps both sides' rows: the weighted entries and the studio bake and scene creation types from the port,
and VanillaStructureContext.world, Argument.reading, PlatformStructures, tool worlds and the services lookup from the
structure move.

PackModuleResourceKindTest installs the built-in modules jar into its castle pack, as the structure move requires, and
writes the dimension and region lists as weighted entries, as the port requires.

StructurePlacing takes the structure move's version. Its int sentinel for a sampled height is replaced by an explicit
sampledHeight flag that calls ObjectRun.automatic, and explicit pieces pass their world Y minus the world's minimum, so an
explicit world Y below zero stays a height (e3dd61c17).

StructureOutputPinTest.everyScenarioPlacesThePinnedStructures is re-baselined for the underground scenario's writes hash
only (9176f55f60410c117cdd9d5e to 1025f82c04539d4881a0e92b): pieces at world Y -1 are now placed there instead of on the
surface. The start count, the piece hash and every other scenario are unchanged.
2026-11-10 14:33:49 +01:00
piexel 1e44f45a34 Merge branch 'v3/lane-engine' into v3/lane-studio 2026-11-10 13:51:55 +01:00
piexel 3c03bba7e7 Create and delete procedural objects from the studio's entry list
A view's entries can now be created from a starter tree in a chosen folder and deleted from the browser. Deleting lists the pack files that still name the entry, then moves it to the desktop trash, or the pack's .iris/trash where there is none. An EditableSceneView opts in with SceneCreation; the host does the writing.

v3: d6e6fc3ef
2026-11-10 13:42:30 +01:00
piexel 8136fa857f Pick procedural parts by clicking blocks in the studio scene view
Authors could not tell which part of a procedural object placed a block. A click on a block in the Procedural view now finds its part and chooses the node that draws it; choosing a node lights up its blocks and draws everything else faintly. SceneView gains hasParts and parts (BlockParts), served as scene-parts, aligned with the scene's blocks. No pins moved: the trace bakes with its own builder and generation is untouched, ProceduralObjectsGoldenTest digests are unchanged.

v3: ff0190384
2026-11-10 12:44:27 +01:00
piexel 4950cf1969 Show far leaves in the studio scene view
The engine makes leaves with no wood in reach persistent, but the studio
gave no sign of which ones they are. The block list of a scene now counts
the leaves too far from wood and can draw only them. The rule is kept in
step with IrisProceduralBlocks.isLeafTooFarFromWood by a comment on both.

v3: eb3bae72d
2026-11-10 12:15:21 +01:00
piexel 3d55236f97 Pick regions, biomes and children by weight
Rarity gave every list entry a share of 1 / rarity and children rounded slots; a weight on the list entry says what a pack author means. Dimension regions, region biome lists, biome children and carving children are now entries with a weight (1 to 1000), picked along the list in the order written, region and biome lists giving the edge to the earlier entry and children to the later. A biome keeps itself among its children only where it lists itself. PackBiome and PackRegion carry the weighted lists, and the carving module picks with the API's Weighted.pick. Rarity is gone from biomes and regions, and the three fixture packs are rewritten to the entry format.

No pin or golden moved: the changed generator seed only touches biomes of rarity other than 1, and no pinned world reads one. The fixture packs now have weights where their regions had rarities: pack-before-the-port forests 15, magnetics 1; pack-before-loot-and-spawn hot 10, terralost 6, mushroom 2, swamp 15, the rest 1.

v3: 0fbce6ba2 a598b4323 96beb86e0
2026-11-10 11:46:19 +01:00
piexel 76dcab175b Time procedural bakes in the studio with a median-of-five meter
Authors could not see what a procedural object costs generation. The Procedural view now bakes the chosen entry five times in the background, keeps the median run, and rates it Light, Moderate or Heavy against a server tick, with each stage's time in the tooltip. SceneView gains isBaked and timeBake (one run, a BakeRun); the studio asks five times so a newer choice stops the rest. No pins moved: generation bakes with BakeProfile.NONE and nothing in packs changed.

v3: 9e30508e3 7d240ddf8
2026-11-10 11:22:51 +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 7b2a232a42 Give cave ceiling layers their own thickness noise
Ceiling layers borrowed the thickness noise of the surface layer at the same index, so ceiling layers beyond the surface layer count were dropped and the validator rejected such packs. Each ceiling layer now has its own cached noise, seeded as before, every declared layer is generated, and the validator accepts any count.

TerrainLayersPinTest re-baselined (length 143112 -> 147047, hash 149645537 -> 216639495). Only the MEADOW ceiling output changed, in both the plain and the exploded runs; surface, sea and smoothing output of every biome is identical, and the biomes without ceiling layers are untouched:
- MEADOW ceiling, plain: 5724 -> 7400 characters. Its fourth layer (basalt) is now emitted instead of cut off at the three surface layers.
- MEADOW ceiling, exploded: 13788 -> 16047 characters. Same fourth layer, plus the barrier separators around it.
- Layers 0 to 2 of MEADOW's ceiling now take thickness from their own style and zoom instead of the surface layers' (SIMPLEX zoom 0.3 against the default style for layer 0, the default style against CELLULAR zoom 0.25 for layer 1), so their block counts change at most columns, e.g. column -400,-400 went from "clay tuff deepslate calcite" to "clay clay tuff deepslate tuff calcite basalt".

Upstream: 23bad0e1a
2026-11-10 10:07:29 +01:00
piexel 5a2c5b2592 Repeat locked strata across columns above the reference height
Above y=512 the locked-layer offset went negative and every block clamped to the first stratum; floorMod keeps the strata cycling.
Upstream: 23bad0e1a
2026-11-10 10:02:32 +01:00
piexel cf07610a0c Document the tool world, import and service api the structure move added 2026-11-10 06:33:24 +01:00
piexel 48523f84c2 Drop the importer messages nothing uses any more
The bulk and capture importers report through the tooling sender since they moved, so their keys have no user left in
the catalog, the English text or any of the translations.
2026-11-10 04:14:26 +01:00
piexel 543e8c615e Move structure placement and jigsaw into the built-in modules jar
iris:structure places and locates structures and owns the structure commands; iris:jigsaw owns the model, the
assembler, the importers, the studio and the jigsaw commands. Both load from the jar, and the studio now lives with
its tool world: it is created by the first jigsaw command and closes with the world. The host's structure host,
model module, assemblies seam and studio host are gone. A datapack's structures are imported through the new
DatapackStructureImport service.
2026-11-10 04:04:57 +01:00
piexel 3d209b393c Place and locate structures through the api instead of the engine
Structure placement, its locator, the cave anchor resolver and the native start planner now take the pack world and its
running world, and StructurePlacing writes through the mantle stage context and the placement graph. Terrain carving
draws its noise from the pack's noise factory. The api gains clearBlock/clearAttached on PlacementTerrain,
RunningWorld.carvedAt and VanillaStructureContext.world; modules get the host's seed purposes through their world view.
2026-11-10 02:54:54 +01:00
piexel ff23e2fb7b Let the structure model and the assembler speak the api 2026-11-10 02:02:47 +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 e3dd61c177 Read an explicit world Y below zero as a height, not as automatic
An object or structure piece placed at world Y -1, or at any Y that lands below zero, was treated as "sample the height" because every stage tested requestedY < 0. Automatic height is now an explicit flag on the placement run, set by the automatic entry points, and explicit heights of any sign are placed where asked. Automatic placements keep their seeds and heights.

Upstream: 9f0615a97
2026-11-10 01:22:46 +01:00
piexel 0d9ea26cc9 Keep a clipped sea-surface stack ending on its top palette block
A stack cut short by the height limit stopped on a body block because the top threshold was computed from the unclipped length. Clamp the stack to the room under the ceiling before placing, and treat a single-block stack as the top block.

Upstream: 75353d43c 5baea8dd5
2026-11-10 01:12:49 +01:00
piexel fd936f4dd8 Skip floating object work for packs with no floating objects
The floating object stage widened the mantle window by at least 16 blocks and sampled every column of each chunk even when no floating biome places an object. Reach is now 0 unless a placement list has entries, with 16 as the fallback when the scan fails, and placing returns early when the reach is 0.

Upstream: 875735517
2026-11-10 01:12:11 +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 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 73863e8219 Keep a pack's side faces on hanging vines where a block or vine above holds them
Decorated vines had every face cleared and reattached to sturdy neighbours, so ceiling decorators that stack vines downward made flat sheets instead of curtains. Authored side faces now stay where a sturdy block or the vine above holds them, a sturdy ceiling holds them and adds the up face, and glow lichen is still not held by lichen above.

Upstream: 6d6bd4f05 c2eb8b5f4 067fffe06
2026-11-10 01:05:43 +01:00
piexel de1c6e887f Contain failed placements and let engine failures end the chunk
Placement code caught Throwable and logged it, so a closed session, a stopping executor or an OOM inside a placement left a half-built chunk that was then persisted. A classifier in the api separates those failures from content failures: the first are rethrown, the second are skipped with one rate-limited warning per kind, subject and failure type.

Upstream: 54f3595ba ebe4aa1e4 7b38f7584 f4f7e92a4 8cf9e01d9
2026-11-10 01:04:37 +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 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 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 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