Commit Graph
1237 Commits
Author SHA1 Message Date
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 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 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
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 b18cc310d7 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.

Upstream: b357eee18
2026-11-10 01:26:10 +01:00
piexel e87e6d9fae Fail a running pregen when chunk generation throws
A throw inside chunk generation left the server's chunk futures unsettled, so the async pregen waited on requests that never completed. Generation failures now reach the running job for the same world, which fails every outstanding request with the failing chunk as cause, and close gives up on stragglers after a 60 second drain deadline.

Upstream: 6c7796f12
2026-11-10 01:24:18 +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 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 de31f75797 Key the Bukkit biome wrapper cache by the native biome
The wrapper cache was keyed by string and never evicted, so a registry replacement could return wrappers around the old Biome. It now uses weak native keys with a 4096 entry cap and reads the canonical key once on insertion.

Upstream: cb85a09c0
2026-11-10 01:21:25 +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 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 c77a9fb012 Use a primitive long set for MantleWriter hollowing and mask lookups
Hollowing allocated six IrisPosition probes per voxel and mask expansion one per candidate voxel. Both now look membership up in an origin-relative long key set, falling back to position equality for sets too wide to pack.

Upstream: 79af11c43
2026-11-10 01:18:10 +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 8748d85e37 Reuse VolmLib's hunk, interpolation and face types and drop the dead util wrappers
Iris carried copies of VolmLib's storage hunks, interpolation statics and HunkFace, plus wrappers nothing used. The storage hunks and IrisInterpolation now extend VolmLib's, Hunk uses VolmLib's HunkFace, and the Iris rangeScale stays so interpolation output does not change. The newly shipped VolmLib classes leave the Bukkit jar's left-out list.

Upstream: 355d7f413 355161408 114cc68a0
2026-11-10 01:16:52 +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 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 e004ae1775 Stop blocking the main thread when a rise-out-of-ground entity spawns
Ambient spawning calls the spawner on the main thread, where a next-tick future
can never complete. Run the below-ground check through the region future, which
runs inline on the owning thread.

Upstream: 0c760d925
2026-11-10 01:11:19 +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