Commit Graph
5247 Commits
Author SHA1 Message Date
piexel 5dd753c589 Studio bridge: noise sources and noise tiles
The noise view's catalogue (overlay noise, pack generators and expressions,
every noise style, in v3e's categories) and float tiles of any source at a
seed and scale.
2026-11-06 02:15:24 +01:00
piexel 3fde8c420f Add the saved world view
A world the server saved, read from its region files, in 3D: the
1,024 blocks square around the region nearest its origin, coloured by
biome, block (each block's top texture, tinted) or height, with lakes
and rivers at their own levels. The saved worlds are listed by
namespace, the studio's own world first, and can be read again.

The terrain mesh now takes any surface with ground, water and colour per
vertex, holes where nothing is known; the 3D world is one such surface.
Framing uses the surface's own bounds, so vertices left out of the mesh
do not move the camera.
2026-11-06 01:58:23 +01:00
piexel 7d06fb50c3 Studio bridge: read saved worlds from their region files
The bridge lists the dimension folders under the level folder that hold
region files, finds where a saved world's view opens (the middle of the
region nearest the origin, with its sea level) and serves square tiles
of saved columns: the ground under trees, plants and water, the water
surface over it, and its block and biome. Biomes the open pack saves
under its own keys get the pack's map colours.

Chunks are read with VolmLib's NBT reader in the 1.18 and later layout,
lazily, a chunk at a time; a region whose file changed is read again.
Snow and other thin blocks count as ground only where they lie on
ground, so snowy treetops are looked past.
2026-11-06 01:58:21 +01:00
piexel 874cb4fe16 Add the 3D world view
The terrain around where the map last looked, 1,024 blocks square, in
3D: one vertex per map pixel from the biome tiles with heights, coloured
by biome, region or height, lit by slope. Walls round the rim and a
see-through sea at fluid height make the square read as a solid block.

The viewport now takes content with its own bounds and frames again when
told to, so the scene views and the 3D world share it. The near clip
follows the orbit distance, so surfaces a block apart no longer flicker
when the camera is far away.
2026-11-06 01:36:59 +01:00
piexel cb3859b40f Show every procedural object variant in the studio
iris:objects registers the Procedural scene view: each procedural
definition with as many variants as it asks for, baked the way the
world bakes them.
2026-11-06 01:28:44 +01:00
piexel 0732f5a9b8 Scene views: step through an entry's variants 2026-11-06 01:28:44 +01:00
piexel e0812cca66 Objects view: the pack's block scenes in 3D
Scene views the pack's modules show join the view list under Blocks.
Choosing one lists its entries under their folders, with a search, and
draws the chosen one with three.js: block states resolve to the client's
models (variants, multipart, parents, element and variant turns), their
textures go into one atlas, faces against solid blocks are left out, and
each side gets Minecraft's flat light and its block's tint. The blocks it
is made of are listed with their counts. Models the client draws without
elements stand in as cubes of their break texture.
2026-11-06 01:26:06 +01:00
piexel c753a1a7fe Studio bridge: scene views and Minecraft assets
The bridge lists the scene views the pack's modules registered, their
entries, and encodes a scene as a palette of block states and their
positions from the anchor. Assets come from the Minecraft client jar of
the server's version, fetched from Mojang the first time the studio asks,
checked against Mojang's SHA-1 and cached; until then the route answers
503 with Retry-After.
2026-11-06 01:18:52 +01:00
piexel f70b8a8abc Show the pack's objects in the studio
iris:objects registers the Objects scene view: every object of the pack,
listed under the folders of its file, one scene each.
2026-11-06 01:18:48 +01:00
piexel a658cd2446 Let modules show block scenes in the studio
ModuleSetup.tooling() gives a ToolingRegistry, where a module registers
SceneViews: a catalogue of entries, each with variants the studio draws
in 3D, built from the pack for a world. View ids follow the module's id
and are unique; the frozen catalogue lists them by id.
2026-11-06 01:18:45 +01:00
piexel 674f9756e3 Map: pick inspector, noise display and region preview
A right-hand panel shows how the noise picks the regions or biomes in
view: a histogram per noise over its pick bands, and each option's weight
against its share of the view. The map can draw the picks, the settling
noise, or both, and any prepared region can be previewed across the map.
2026-11-06 01:10:21 +01:00
piexel 13c0705d44 Studio map: inspect noise picks and preview one region
The picks route measures, for the area in view, how each region or biome
noise spreads over the bands that pick its options, against how much
ground each option gets. Tiles can carry the noise that settled each
spot's pick, and the regions view can preview one region across the
whole map with the surface biomes it would place there.

Preview tiles take their heights from the shading lattice, so they draw
as fast as biome tiles. Only coastline pixels can then disagree with the
hover's exact biome: 0.25% of spots at 1-2 blocks/px, 2.3% at 8.

The bridge serialises nulls so the studio can tell "none" from "not sent".
2026-11-06 01:10:17 +01:00
piexel e20bf1dd57 Hover card: show how the spot was picked
One row per pick under the card's title: region, biome list and each
child level, with the options' shares of the noise as a segmented bar,
the picked one in its colour and a marker at the noise value. A child
names the parent it replaced on its own line. The card is a little
wider so long biome names keep their region beside them.
2026-11-06 00:40:36 +01:00
piexel 467d42abea Studio map: explain how each spot got its region and biome
The hover now carries the pick path: the region pick, the biome list
pick and every child level, each with its noise value and the share of
the noise every option owns. IrisComplex exposes the pick noise, the
pickable biomes and the child slots it already used, so the explanation
reads the same inputs the generator does; generation is unchanged
(probe signatures match before and after). Hover takes the view, since
the path depends on it.
2026-11-06 00:40:27 +01:00
piexel 4de21dace7 Studio bridge: smaller tiles, quiet hang-ups, files removed on stop
- 128-pixel tiles by default and scales up to 4096 blocks per pixel, so
  the studio fills the screen in smaller steps and can zoom out further
- A client that drops a tile it no longer needs closes the exchange
  instead of logging a broken-pipe stack trace
- The bridge keeps its port after closing, and Paper's server-stop
  quiesce closes the bridges, so their connection files are removed
  even when the deferred service teardown never runs
2026-11-06 00:22:15 +01:00
piexel f1171307cd Studio map app: Electron studio for the Iris bridge
A standalone Electron + React + Tailwind + shadcn/ui app that connects to
the localhost bridge `/iris studio map` opens and draws the world map with
the v3e studio's views, shortcuts, hover card, legend and styling.

- Finds running bridges from ~/.iris/studio/bridges and iris-studio:// links
- Biome, region, height and biome layer views from 128-pixel tiles
- Coarser previews first, so the screen fills sooner, then sharpens
- Hover card with Shift details, legend census with click to highlight
- Ctrl+click teleport, Alt+click open file, right-click menu
- Light, dark and system themes from the v3e studio palette
2026-11-06 00:19:18 +01:00
piexel a375d3b2f0 Serve the studio map over a local bridge
/iris studio map now starts a bridge for the world instead of the Swing
map: HTTP on 127.0.0.1, a free port and a per-bridge token, with the
world, tiles, hover, entities, teleport and open-in-editor, and server-sent
events for players and hotloads. A connection file under
~/.iris/studio/bridges lets a studio app on the same machine find it.
Works on headless servers. Bridges close with the plugin or mod.
2026-11-05 23:26:38 +01:00
piexel 60ba7e644c Add the studio map's core views: tiles, labels and hover
The 2D views of the coming studio app (biomes, regions, height, land, sea
and cave biomes) as core code. A tile says what each pixel shows (its biome
and region, and heights for shading) with a ring of neighbour pixels, so the
app styles it without asking again; the hover describes one column.
2026-11-05 23:13:22 +01:00
piexel d2ce5f4a05 Port v3e's parts-based procedural objects
The 37 part classes from v3e (dev) now live in engine/procedural, outside the host's own type
package, so the built-ins jar may register them as a resource kind. ProceduralObjectCatalog reads
iris:objects/procedural definitions from the pack's procedural/ folder and bakes their variants
per world (or detached, for reach); ObjectPool places procedural/<path> and procedural/<path>#<n>
keys like any object and warms them, and ObjectChunk keeps their baked leaves.

ProceduralValue reads its forms (number, range, keyframes, curve shape) through IrisApi's
@JsonForms codec instead of Gson. Trees: procedural/trees/ counts as a tree folder and
TreeGrowing reports every variant it places as a tree.

The v4-era kinds (tree, ruin, formation, coral, fungi, crystal), ProceduralPlacement,
ProceduralObjectSettings and PlacementSource are removed; ObjectPlacement is the one placement.
2026-11-05 23:00:20 +01:00
piexel 8be0597a36 Place v3e's parts-based procedural objects like any object
Procedural objects are now definitions of parts in the pack's procedural/ folder (module resource
kind iris:objects/procedural) that bake into variants; an object placement names them as
procedural/<path>, or procedural/<path>#<index> for one variant. The v4-era proceduralObjects
settings and their tests are gone.

- TreeDefinitionIndex knows trees/ and the ids modules report as trees; ModuleServices merges
  only those.
- Golden test: the 72 definitions of the overworld pack (fixture procedural-parts) bake as when
  the digests were taken, on a game-like block platform (GameLikeBlocks).
- Fixtures pack-before-the-port, pack-terrain and pack-before-loot-and-spawn converted: their
  proceduralObjects became object placements, sets became placement snippets.
- Tests follow: tree index, warm-up, placement reach, surface support.
2026-11-05 23:00:13 +01:00
piexel d0ca502a56 Read @JsonForms values through their codec; keep a state whose block rejects a value
JsonFormsCodecs reads and writes IrisApi @JsonForms classes as the plain values Gson reads into an
Object, for the module settings decoder (and so every module resource file) and for tests'
TestSettings. IrisBlockRegistry.withProperty returns the state unchanged when the platform does
not accept the value, as IrisApi now defines it.
2026-11-05 23:00:13 +01:00
piexel f57c2ce92c Define withProperty for a value the block does not accept
BlockRegistry.withProperty returns the state unchanged when the block has no such property or does
not accept the value, such as facing=up for a block that only faces sideways. Platforms threw.
2026-11-05 23:00:05 +01:00
piexel 321ab5b486 Let a settings value read its own JSON forms
@JsonForms(Codec) marks a value packs write in more than one shape, such as a number, a [min, max]
range or a curve object. The host hands its JSON to the codec as plain values and writes it back
through it; it never creates the class or reads its fields, and the schema describes it as any
JSON value. It is the one exception to the decoding contract, so module jars no longer need Gson
(which the plugin relocates) for such values.
2026-11-05 23:00:05 +01:00
piexel 5e85e1e3b8 Report tree objects as one set of ids
TreeObjects no longer has a separate procedural list: a module reports the ids of every object it
places as a tree, procedural variants included, and the host only matches those ids.
2026-11-05 23:00:05 +01:00
piexel 8ca183d0c2 Save custom blocks in the mantle under their custom id
A custom state's key is its base block, so a provider block (Nexo,
ItemsAdder) held in a mantle section that was written to disk before
its chunk generated read back as the vanilla base block. The mantle now
saves it under its custom id, which reads back through its provider.
2026-11-05 21:44:32 +01:00
piexel d5e75114ab Let the server decide where decorators fit
Ported from v3e (af333cc93). Whether a plant stands on a ground block is
now the server's own canSurvive rule, asked in a two-block level, so
custom ground (CraftEngine and others) grows plants too. Plants that
fail on every ground, like wall and ceiling blocks, keep fitting as
before. Dead bushes stay off grass, as packs expect. Without the NMS
binding Iris's own table answers.

Test server, world v3eports (seed 1337, radius 500): 4,225 chunks,
0 failed, no errors; plants 70,161 vs 68,905 in iriswave6 over the same
961 sampled chunks, every plant type present.
2026-11-05 21:38:27 +01:00
piexel 6429b6ea5e Generate CraftEngine blocks in place, keep their leaves and tags
Ported from v3e (31615dc05, ee7f54429, 92b02db15, 3ba277aa4).
CraftEngine blocks now resolve to their own block data and generate with
the chunk, warning once about properties the block does not have, so
only furniture is placed after generation. A deferred block with a state
finds its provider by its id alone. Where leaf decay is prevented,
CraftEngine leaves are made persistent too, and logs and leaves include
CraftEngine blocks with those tags, for IrisModule 501862b.
2026-11-05 21:28:16 +01:00
piexel 501862b9ea Keep leaves from cutting logs
Ported from v3e (3ba277aa4). Overlapping objects wrote over each other
block by block, so one tree's leaves could cut another tree's trunk and
leave the top floating. Leaves now keep a log already placed there, as
in vanilla trees.
2026-11-05 21:28:12 +01:00
piexel 6522174c83 Keep child biomes when a biome is focused; goto honours focus region
Ported from v3e (af1fe9808, 05eed1f6a, eb1a24411). A focused biome now
implodes into its children instead of painting the parent everywhere,
and region goto checks what the engine actually generates, so a focused
region is reachable and the others are not. Locating already covered
child biomes and focus.
2026-11-05 21:15:00 +01:00
piexel eb7a6e1044 Give pack expressions clamp, linearstep, smoothstep and ridge
Ported from v3e (f1d7f92f5).
2026-11-05 21:15:00 +01:00
piexel a1d043b3c0 Test object separation, retake procedural digests
Tests for IrisModule d65da98: separated objects keep their distance over
24x24 chunks and come out the same in any chunk order. The procedural
golden digests serialize the effective placement, which now writes
"separation":0; with that text stripped the old digests still match, so
the bakes are unchanged.
2026-11-05 21:15:00 +01:00
piexel d65da98624 Space surface objects apart and vary their chance with noise
Ported from v3e (4be4f9774, 92a1fa645). An object placement can set a
separation in blocks: each chunk rolls one candidate spot, and it stands
only when no lower ranked candidate of a placement with the same objects
lies closer. Spots and ranks come from the world seed, the chunk and the
objects, so spacing holds across chunk, biome and region borders in any
generation order. A chanceStyle multiplies the chance by noise.
2026-11-05 21:14:53 +01:00
piexel 9852f730a7 Read seeded noise styles flat in blocks
Palette layers, the decorator chance gate and carving child biomes
divide by their zoom or shrink factor only for a style without a seed;
a seeded style is read in plain blocks, so its own zoom is its only
scale and it lines up with every other reader of the same seed.

Ported from v3e a1bd24186. IrisApi 2914ed1, Iris 3b9012535.
2026-11-05 21:02:19 +01:00
piexel 3b9012535f Roll seeded noise styles from the world seed, read them flat
IrisGeneratorStyle gets the seed field the IrisApi style has. A seeded
style is built from splitMix(worldSeed ^ splitMix(seed)) instead of the
caller's random, so every style with the same seed and shape shares one
noise per world. Material palettes and child biomes read a seeded style
in plain blocks (no palette zoom, no childShrinkFactor).

Tests: the factory ignores the asked seed and follows the world seed;
the decorator chance gate and palette layers read seeded styles flat
(module code, tested here as the other module tests are).

Ported from v3e a1bd24186 and 1be1795e6. IrisApi 2914ed1.
2026-11-05 21:02:12 +01:00
piexel 2914ed168c Give noise styles an optional seed of their own
A style with a seed is rolled from that number and the world seed and
ignores the seed it is asked for, so every reader of the same seeded
style gets one shared noise. Readers that scale coordinates before
sampling read it flat in blocks. NoiseStyle.seed(), isSeeded(),
withSeed(); the NoiseFactory contract says what a seeded style does.

Ported from v3e a1bd24186.
2026-11-05 21:02:06 +01:00
piexel ee5f3d90eb Stop fractured noise from mirroring across x = z
Each axis read the fracture at swapped coordinates, so the warp of z at
(a, b) was the warp of x at (b, a) and fractured styles were mirror
images of themselves across the diagonal. Each axis now samples its own
far, uncorrelated part of the fracture noise, on every path (generic,
fast 2D/3D, signed 2D/3D). The 3D fast paths also read the second axis
in 3D instead of 2D. Same number of samples as before.

Ported from v3e 855ab90be. Its second half (axialFracturing for built-in
fractures) does not apply: V5 has no shared-value fracture mode.

Fractured terrain changes. Retaken: TerrainLayersPinTest and the three
fractured values of IrisMathNoiseHotPathParityTest. CNGFractureMirrorTest
fails on the old code (780 of 780 samples mirrored).
2026-11-05 20:55:54 +01:00
piexel bcc5a1abb9 Move English message text into messages/en_US.json
Message classes now declare only ids; the English text, line lists and
plural forms load from one bundled JSON resource, which IrisMessages
turns into the catalog. A constant whose id is missing or has the wrong
shape fails at class load.

EnglishMessageCatalogTest guards that every English id has exactly one
constant. A round-trip dump of the new catalog is byte-identical to the
generated resource.

Java: -4711 lines; net -3185 including the JSON.
2026-11-05 19:17:30 +01:00
piexel 3ba62e0c47 Say in the Loot javadoc that the container is shuffled with the module's seed 2026-10-28 04:16:48 +01:00
piexel 3ac971c0d9 Name the pack table an item came from by its id 2026-10-28 04:16:10 +01:00
piexel 5e2eaba07e Follow the loot source id and the explicit jigsaw overrides
Debug lore names the table by its path. The native structure start plan keeps
SOURCE for an option the pack left out, as before.
2026-10-28 04:16:10 +01:00
piexel 56bd2badab Type the loot source's table as an id and leave jigsaw overrides out explicitly
ItemDrop.Source names its pack table by ResourceId. JigsawOverrides drops the
SOURCE constants of Heightmap and Liquids and the blank-text defaults: an option
the pack left out is null inside and empty in its getter.
2026-10-28 04:13:22 +01:00
piexel e0dda1699c Move the vocabulary only Iris core uses back into Iris core
37 types of the object, value, image, world and runtime packages (the image map
enums and exceptions, the registry list annotations, the engine data, the world
boundary and environment, the custom biome enums, IrisRange) are read by Iris
core alone. They keep their packages. The 11 that the module's structure model
or ObjectRotation also reads stay.
2026-10-28 04:09:40 +01:00
piexel b48192d355 Take in the vocabulary only Iris core uses from IrisModule
37 types that IrisModule held for Iris core alone live in core now, in the same
packages, so no import changes.
2026-10-28 04:09:40 +01:00
piexel 40436352bf Let the object model stand on the api: turn, scale, paste, records
Core turns objects with ObjectTurn and BlockTurn and scales with ScaleMethod, so
the object model no longer reads the modules' ObjectRotation and
ScaleInterpolation; /iris object paste writes the turned blocks with
IrisObject.paste instead of running a placement. IrisObject takes no
ObjectPlacement; the structure placers call ModuleObjectPlacement directly.
IrisPlacements reads the run's name and JSON, the placement type comes from the
module, placements are stored as PlacementMarkers texts and read back as
PlacementRecords, the marker ids are Iris's own, the loot shuffle seed and the
protected floor come from the modules, entity knobs are EntitySpec fields, and
entity key completion is one handler by kind id. The entity pin is retaken with
the old print proven to hash to the old number.
2026-10-28 04:05:02 +01:00
piexel 83bc859b31 Hand Iris the placement, its record, the shuffle seed and the floor
ObjectRun gives the placement's name and JSON to the run, iris:objects declares
the placement type with its JSON names, and placements are recorded as typed
PlacementRecords instead of key@id texts (Iris keeps the text form, so
StructurePlacementMarker moves to Iris). iris:loot gives the seed a container is
shuffled with and iris:terrain says it protects the floor. The five Iris-only
entity knobs are fields of the EntitySpec, so IrisEntityExtras is gone.
2026-10-28 04:02:52 +01:00
piexel a9e3cbaa93 Close the object-placement couplings of the tooling audit
PlacementRun carries the placement's display name and its JSON, from which the
host reads the settings other modules declare at the placement level.
FeatureRegistry.registerPlacementType lets the module that owns placements
declare the type and its JSON names for the placement level. RunningWorld and
PlacementTerrain keep a typed PlacementRecord (object id, placement id,
optional structure id) instead of a text. Loot gives the seed a container is
shuffled with, the ProtectedFloor service says whether the lowest layer belongs
to the terrain module, and EntitySpec holds the spawn reason, rising out of the
ground, panda genes and applying to a provided mob.
2026-10-28 04:02:32 +01:00
piexel 3022c54a43 Cut dead and duplicate tooling found by the tooling audit
Map modes OBJECT_LOAD, DECORATOR_LOAD and LAYER_LOAD with BiomeMaxes and the
runtime and hotloader code that fed them; the placement scans in
Engine.getObjectPlacement and the PlacedObject.placement field nobody read;
Engine.hasObjectPlacement (find uses ModuleServices.objectPlacers); the object
section of /iris studio objects and the layer lines of /iris studio profile;
the package obfuscation, which wrote object names the exported JSON never used;
the modded packager and its command; the removed-field nags for fluidBodies,
surfaceOpeningClearance and caveProfile water fields; the IrisMod resource
family and the Gson reader only it needed; the test-only ObjectPlacements
helpers; WorldObjectPlacer; Interpolated.CAVE_RESULTS; DeserializationProbe.
2026-10-28 03:29:56 +01:00
piexel 98c3c96881 Drop DecoratorLoad and LayerLoad
They sat in the exposed package only so Iris could colour the decorator and
layer map modes, which are cut.
2026-10-28 03:29:50 +01:00
piexel 3e8c22422f Put IrisApi on the modded adapters' classpath
The fabric, forge and neoforge builds resolved neither core's dependencies on
IrisApi nor the IrisApi types the adapters read (ResourceId, BlockTurn), so
none of them compiled. They apply the IrisApi source resolution like the root
build and compile against iris-api. NativeStructureReferenceRepairTest drops
the placement identity argument that NativeStructureStartPlan lost in batch 6.
2026-10-28 03:29:45 +01:00
piexel fe730fc8bd Drop ObjectPlacements.treeGrowth and IrisMod.blockReplacers
treeGrowth had no caller outside its own test; the jar's TreeGrowing
reads the settings itself. IrisMod.blockReplacers was never read and no
pack sets it.
2026-10-28 02:26:07 +01:00