Commit Graph
1287 Commits
Author SHA1 Message Date
piexel 3c6dc52b8e Refresh pack listings before building workspace schemas
IrisData.get hands back a shared instance whose file listings outlive edits, so a
studio update or datapack ingest regenerated schemas that still offered removed keys
and missed new ones.
2026-11-10 16:32:55 +01:00
piexel aaa5e05cf0 Give the surface biome where a region lists no cave biomes
The cave biome stream answers such a region with a placeholder biome that has no pack key. It reached the cave depth lookup and the terrain sampler, which both key by the pack name, and every chunk failed with a NullPointerException.
2026-11-10 16:03:55 +01:00
piexel cb9103c4d9 Expose the platform's Gson to pack modules in the Bukkit jar
The Bukkit jar relocates Iris's own Gson, and the relocation rewrote the package name in the exposed list, so modules were shown Iris's copy and every reference to com.google.gson failed the pack load. The name is now assembled at run time.
2026-11-10 15:35:26 +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 6b2b0ec7f0 Carry the editor dimension default into the Spanish and French strings 2026-11-10 13:57:59 +01:00
piexel 1dea1b098d Move the pack weight converter's command line out of production code
Core production code may not write to the process streams; the entry point now lives in the test sources.
2026-11-10 13:57:59 +01:00
piexel 1e44f45a34 Merge branch 'v3/lane-engine' into v3/lane-studio 2026-11-10 13:51:55 +01:00
piexel bcbabc8f60 Look up and colour plugin blocks in saved worlds by the state they borrow
Plugins such as CraftEngine save their blocks as the vanilla state players see, so saved worlds showed a tripwire where a custom block stands. A saved block now maps back to its plugin name through the providers' looks, counts as ground by the shape of the block it borrows, and its models and textures come from the plugin's resource pack.

No terrain, pin, golden or digest moved; saved worlds are only read.

v3: 002aab06e
2026-11-10 13:51:37 +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 7eb45cebf6 Edit node values as curves, folded sections and suggestions in the studio
Nested settings fold into sections and lists of objects into items. Curve
values show a sparkline and open a points or shape editor, and a number or
range can be made a curve. Blocks, resources and roles are suggested while
typing, and string lists are typed as a, b. The studio asks the bridge for
the platform and pack lists (suggestions endpoint).

No terrain, pin, golden or digest moved; the files written are the same JSON.

v3: db53f834a
2026-11-10 13:34:32 +01:00
piexel e2ebc7fe8a Show reading progress for saved worlds and read a region's chunks in parallel
The saved-world view only said "Reading" with no sense of how far along it was, and the first look at a region read its 1024 chunks one after another. The status bar now shows a bar measured against the most tiles pending since the last idle, and the region's start read uses all cores.

v3: 3b899b8d1
2026-11-10 13:02:17 +01:00
piexel 80ecd143da Sample terrain height noise tiles on a world-fixed lattice
Asking the world's height at every pixel of a noise tile is too slow for the 3D view. Tiles of
the terrain height source now sample a power-of-two lattice fixed in the world and fill in between
along a Catmull-Rom curve, so tiles meet without a seam. Other noise sources are still sampled at
every pixel, and no pins moved.

v3: 1622f6dee 58382a46d bdea50e75
2026-11-10 12:54:37 +01:00
piexel 2366c87659 Add a terrain height source to the noise view
The noise view could not show the terrain the world generates. It now lists
"Terrain height", in blocks above the fluid with the world's seed, so the 2D
colours and the 3D water line match the world. The native map Height view is
kept as it is.

v3: adb9de089
2026-11-10 12:48:48 +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 eb2113b835 Preview pack expressions in the Noise view with the world's seed
The Noise view evaluated every pack expression with its seed field, so a preview did not line up with the terrain the expression shapes. Expressions reached from the region style and the land, sea, shore and cave biome styles now keep the random the world samples them with.

v3: c60f244ca
2026-11-10 12:24:45 +01:00
piexel d33d29be51 Open the editor on the open studio
The editor command now opens the open studio's pack when no dimension is given, else the default world type, and reports a missing pack instead of creating an empty one.

v3: 3d5042f0d
2026-11-10 12:19:22 +01:00
piexel 7b907cfdc9 Say weight in the map's pick inspection titles
Regions, biomes and children are picked by weight now, and the three inspection titles still said rarity.
2026-11-10 11:49:47 +01:00
piexel 08f4bffca9 Add a pack converter from rarity to weighted entries
A pack written with rarity needs its dimension regions, region biome lists, biome children and carving children rewritten to weighted entries. Lists that picked by 1 / rarity get the integer weights proportional to it (the least common multiple of the rarities over each, reduced by the greatest common divisor) and a list that would need a weight above 1000 stops the conversion; children keep their old rounded slots as half-slot weights with the parent listed among them. Files are edited as text so comments and formatting stay, and the conversion is all or nothing per pack. Next to the other pack tooling in core, run as PackWeightConverter [--dry-run] <pack folder>.

The converter's test checks the fixture packs are already what it would write.

v3: 96beb86e0
2026-11-10 11:46:25 +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 723764a782 Show server CPU and heap use in the studio status bar
The bridge sends a usage event every second and when a studio connects: CPU with 100 per busy thread, like top, and the Java heap in use. The status bar shows both beside the cursor and turns each warning-coloured at 80%.

v3: e1e158364 11e4ba0b1 268e72b9c 275b5965b
2026-11-10 11:31:27 +01:00
piexel d28b9d13cc Draw players as facing arrows on the map
The studio map showed players as plain dots. A blue arrow with a white edge and dark outline now points where the player looks, with the name in a pill above, readable on any terrain. Markers carry a yaw (rounded to 5 degrees so head turns do not flood the players event); entities keep their dot.

v3: 3914c4667
2026-11-10 11:26:49 +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 f3bf0aea4b Zoom continents like regions and biomes
continentZoom rescaled the baked style noise instead of zooming its input, so fractures kept their unzoomed size. No pins moved: none use a fractured continent style with continentZoom other than 1.

v3: 98bc84fc5
2026-11-10 11:14:16 +01:00
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 ffbd0db03a Let snippets hold several entries
A list that references a snippet file holding a JSON array now takes all of its entries in place, in both the pack Gson and the module settings decoder. A single-value reference to such a file logs an error and loads null in the pack Gson, and is a settings error in the module decoder. Snippet-file schemas accept one entry or a list, and the decorator-snippet validator checks each entry of an array file. No pins or goldens moved.

v3: 8ba8c7b2d
2026-11-10 11:04:18 +01:00
piexel 3eb8566ef9 Drive overlay noise from generators
overlayNoise now links generator files with a min and max, like biome generators, so overlays get composites, exponent, cliffs and cells. Heights come from link.getHeight with seed heightSeed + 571093, in the main and upper dimensions; exported packs now include overlay generators. Inline styles are no longer read, and the unused IrisShapedGeneratorStyle is removed.

No pin, golden or digest moved: no test pack uses overlayNoise, and worlds without it generate identically. Worlds with overlay noise change, since the noise now comes from a different seed.

v3: ef77fc5a8
2026-11-10 10:59:05 +01:00
piexel c2183bc470 Add a combined-value exponent curve to generators
Lets a pack curve the combined composite value of an IrisGenerator before opacity, so the final height can be shaped instead of each layer. Defaults to 1, which leaves existing generators and pinned values untouched.

v3: 1fe588837
2026-11-10 10:55:04 +01:00
piexel 843dcf702f Stop pack loading from looping on bad list entries
The snippet-type adapter fell back to defaults without consuming the broken value, so a list retried the same entry forever. Read the whole JSON value first, then convert it, and name the type, path and exception message in the error.

v3: 4b437207c
2026-11-10 10:52:22 +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 7053224ba5 Keep 2D expression samples 2D
Expression noise always received three coordinates from CNG, so a 2D sample read z as 0 instead of the 2D form. CNG now passes the dimension count through noiseOf and noiseSignedOf, and ExpressionNoise evaluates 2D samples with the 2-argument expression. Other generators use the defaults and are unchanged, so no pin moved.

v3: a38d7e5d7
2026-11-10 10:31:32 +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 7e4c159039 Restore the Spigot and Paper timeouts Iris raised when auto-configuration is off
Iris rewrote spigot.yml timeout-time and paper-global.yml early-warning-delay without keeping the old values, so turning the setting off never undid it. The originals are now recorded in server-timeouts.json before the raise and restored on later starts unless the operator has changed the value since. Writes are atomic and go through symbolic links to the real file. The recovery bookkeeping reads server YAML through a small interface that ServerConfigurator implements, so the new class carries no Bukkit coupling.

Upstream: b357eee18
2026-11-10 10:10:58 +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 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 ba8429952a Edit and create jigsaw studio objects through the object codec
The studio's project creator and graph editor hold objects as a declared size plus blocks and block entities, and read and
write them through the pack's object codec. The five entry points that touch object files take the codec.
2026-11-10 03:07:34 +01:00
piexel 2961ed6b7d Write imported structure objects through the object codec
The structure importers build GeneratedObject and encode it with the pack's object codec instead of writing IrisObject
files. The codec test now round-trips a block entity and refuses markers, and validation has a test that a pool below
its minimum weight is reported by its field.
2026-11-10 03:01:42 +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 5ab99210b2 Keep the declared size when the object codec decodes a file 2026-11-10 02:10:23 +01:00
piexel ff23e2fb7b Let the structure model and the assembler speak the api 2026-11-10 02:02:47 +01:00
piexel 2bdc3cdc93 Revert "Restore the Spigot and Paper timeouts Iris raised when auto-configuration is off"
ServerTimeoutConfiguration is a new core file that imports org.bukkit, which the purity ratchet rejects. Whether it is allowlisted or moved into the Bukkit adapter is the maintainer's call; this reverts b18cc310d until then.
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 f78600be70 Count pregen chunks from the bounds instead of walking them
Totalling by iterating every chunk delays the start of a large pregen. The bounds already give the count in constant time.

Upstream: 73d640943
2026-11-10 01:30:07 +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 19129c2eb8 Report silent pregen failures instead of swallowing them
Empty catch (Throwable ignored) blocks in pregen hid failed capability probes, a stranded plugin chunk ticket and failed mantle cleanup. Probes now log their name and cause at debug through PregenDiagnostics, and real losses go through IrisLogging.reportError. The chunk load failure trace is emitted before the metrics snapshot so a failing snapshot cannot silence it.

Upstream: e030ac3be
2026-11-10 01:29:00 +01:00