Commit Graph
5300 Commits
Author SHA1 Message Date
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 041e11f4a9 Gate mavenLocal behind -PuseMavenLocal and resolve ItemsAdder remotely
A stale ~/.m2 artifact could shadow the composite VolmLib or published artifacts, and ItemsAdder only resolved through mavenLocal. mavenLocal() is now added only with -PuseMavenLocal=true or when the composite VolmLib is off, and ItemsAdder uses beer.devs:itemsadder-api 4.0.17 from maven.devs.beer.

Upstream: c83d6964f
2026-11-10 10:08:31 +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 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 11f45a4077 Merge upstream port lane a 2026-11-10 01:31:27 +01:00
piexel 5cab50b5df Stop forcing the loader jar tasks stale and declare every input they read
The loader jar and modded test tasks were always rerun because their input list was incomplete. They now list the api, agent, lombok and resolution files the nested builds read, hash sources by relative path, and pass the local VolmLib checkout through the environment so its absolute path is no longer an input. They still always run when VolmLib resolves from the published snapshot.

Upstream: 0bdacc6fe 15826162b 7986698c1
2026-11-10 01:30:12 +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 df0186c564 Run modded-common and buildSrc tests as part of check
The modded-common tests only ran when a loader wrapper was built by hand, and the buildSrc tests never ran because Gradle only asks for the buildSrc jar. A root moddedTest task now runs the modded-common suite through the Fabric build and check depends on it; the buildSrc jar depends on the buildSrc tests.

Upstream: 7841efed5
2026-11-10 01:28:02 +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 a02911040d Verify entry size and CRC and write seekable ZIPs when compacting jars
The compactor streamed through ZipInputStream and ZipOutputStream, so it never checked entry integrity and silently accepted duplicate entries. It now reads with ZipFile, fails the build on a size or CRC mismatch or a duplicate name, and writes a seekable ZIP without data descriptors.

Upstream: c1bcdd0a9
2026-11-10 01:26:48 +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 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 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 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 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 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 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 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 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 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 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
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 887daac844 Stop taking the plugin manager monitor in the scheduler enabled check
A pregen worker dispatching a saving event could hold the plugin manager monitor while plugin disable waited to join it. The scheduler now reads the hosted plugin's own enabled state instead.

Upstream: be621c007
2026-11-10 01:05:44 +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