Commit Graph
5291 Commits
Author SHA1 Message Date
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
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 b0f535832e Save a newly created world before spawn preparation
A crash before the first autosave otherwise loses the world's seed.

Upstream: 9339c0869
2026-11-10 01:02:17 +01:00
piexel 36fcff7caf Drop unwired 2D noise kernels
Nothing in production selected the 2D noise kernels, and the vector one measured 0.07x scalar on 2-lane NEON. Remove them with their SimdSupport plumbing, their parity test and the jar check entry, and note in the simd-bench README that they are a candidate Iris does not ship.

Upstream: 45b9ff8e1
2026-11-10 01:01:52 +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 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 39e4015b44 Fail with column and generator details on non-finite terrain heights
A NaN or infinite generator bound or noise value otherwise spreads into height caches and interpolation. Averaging now throws at the first bad sample.
Upstream: 5a5e8a8dc
2026-11-10 00:59:59 +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