Commit Graph
1300 Commits
Author SHA1 Message Date
piexel 263f5baa3c Show caves as a form with area sizes, and in the 3D world
The Caves view drops its node graph. Each cave file is one form beside
the scene, with a section for the cave, its tunnel, its cavern and the
pillars. A section the file lacks says "(unset)" and typing a value
writes it. EditableSceneView.showsNodes() lets a view ask for this.

Scenes can now be built at a size the studio picks. SceneView.sizes()
lists them, and scene() and parts() take a SceneRequest with the key,
variant and size. Caves offer 64 to 512 blocks across. The preview sends
only the carved blocks on the outside of the space, so 512 stays light.

The 3D world gets a Caves toggle. It generates the chunks of a 128, 256
or 512 square around the middle of the view and draws every air block
under the terrain top, coloured by height band, with a legend.
2026-11-13 09:12:53 +01:00
piexel e862a80615 Add a Caves view to the studio
The carve module registers a scene view that lists every file of the
pack's caves/ folder and draws each one carved over 128 by 128 blocks
under a flat surface at Y 96, with the seed generation uses. Carved
space is drawn as blocks, tunnels light blue and caverns orange, so the
shape of the cave shows instead of the rock around it. Four variants
show the same cave in four places. Each file opens as Cave, Tunnel,
Cavern and Pillars nodes, and new caves can be created from the view.

BlockParts copied its map with Map.copyOf, whose open addressing takes
quadratic time on the colliding hash codes of a dense block grid; one
cave scene took 538 seconds. It now copies into a HashMap.

A studio that connected after the bridge's first poll got no world
event of its own, took the first hotload for its starting state and did
not redraw. Each joining studio is now sent the world state on its own.
2026-11-12 22:15:59 +01:00
piexel 7d166df70f Replace the noise cave profile with listed caves
Packs now describe caves as files in caves/ and list them under "caves"
on the dimension, regions and biomes. The lists of a column add up.

A cave has tunnels, caverns or both. Tunnels are the lines where two of
three smooth fields meet, so they run long and join into one network.
Caverns are rooms where one slow field rises over a threshold; pillars
are columns where a second, 2D field peaks. Sizes are written in blocks.

Every shape reads its fields on a 4-block lattice and decides per block
from the interpolated values, so thin tunnels survive between lattice
points. The adaptive sampler and the 2,268-line carver are gone.

Removed with the profile: cave water pockets and their support check,
profile defaults for cave objects, and profile carving of floating
islands. Floating islands still carve with carveStyle.

Pack validation read module settings before the pack had resources; a
module that turns keys into ids then failed the pack. Linked biomes are
now skipped there and checked when the pack loads.
2026-11-12 21:21:40 +01:00
piexel 573e631bb8 Show the biome that placed a structure in dust
Structures start from their origin chunk's biome, cave biome, region or
dimension, then reach into neighbouring biomes. Dust on a structure piece
now names that owner, found from the structure plan, so it works on chunks
generated before this change too. Chest markers that structures record
carry the owner as well, and a placement can now be owned by the dimension.
2026-11-12 17:29:31 +01:00
piexel ecc08197e8 Show the biome that placed an object in dust
An object reaches past the chunk whose centre biome placed it, so dust on a
block near a biome edge named the neighbouring biome. Placements now record
their owning biome or region, and dust shows it as "Placed from biome: ...".
Chunks generated before this change carry no owner and show no such line.
2026-11-12 17:14:46 +01:00
piexel d4da60a253 Light the 3D world as Minecraft's smooth lighting does
The server works out the sky's light in each cell of a chunk, full under the open sky and a level less through each
leaf, block of water or step aside, and for each visible face the light of the cell it faces and how many opaque cells
stand around each of its corners. The studio darkens the faces' corners by them, splitting each face along its brighter
corners, so terrace steps, cliff feet and the ground under trees and overhangs read in depth. Far runs carry the mean
light and corner shade of the block tops they stand for, so far ground darkens as the near ground does.
2026-11-12 13:01:27 +01:00
piexel 87b088787b Reach hollows whose only way to the sky crosses a chunk's edge
A chunk traces the sky's open air within itself, so a pit dug under an overhang whose opening lay in the chunk beside it
seemed closed off, and its walls left a hole in the 3D world. Each chunk keeps the open cells along its sides the sky
did not reach; where one touches the open air of the chunk beside it, the chunk is traced again from there, until none
is left.
2026-11-12 12:17:45 +01:00
piexel 541419285d Show block faces against holes dug across a chunk's edge
A chunk judged what lies beside it by the terrain's height there, which knows nothing dug out of the ground, so a
structure set into a hill or a cave mouth across a chunk's edge left the faces against it out, and the 3D world showed
holes through to the background. Each chunk now keeps the open air and the left-out faces along its sides, and a tile
shows those faces where the chunk beside it is open. Tiles of blocks one by one also generate the chunks around them,
so a tile is the same whichever neighbour came first.
2026-11-12 11:50:50 +01:00
piexel ebd31db06f Draw the 3D world on the discrete GPU, off the main thread
The studio drew on the integrated GPU of a hybrid laptop, where a view
of the near ground block by block ran at a few frames a second. On
Linux it now starts again, once, with NVIDIA's EGL driver and PRIME
offload, its window's buffers made on the NVIDIA render node, unless
the environment already names an EGL driver.

Tiles are built on worker threads and sent back packed small:
positions in sixteenths of a block, colours a byte a channel. A frame
hands the GPU at most 16 MB of new meshes, and a tile keeps its old
mesh until the finer ones filling its holes are drawn.

The ground is drawn block by block until a block is a quarter of a
pixel, with up to 256 tiles in sight. Runs now record the plants on
their tops, which tint them as the near ground's plants do, and faces
of neighbouring columns in one plane over the same heights merge.
2026-11-12 09:20:20 +01:00
piexel 428f9cfb0e Draw the 3D world's far ground as runs of blocks
Far tiles showed one height and one block per column, sampled from a
single column, so trees became pillars of leaves or vanished.

For each generated chunk the server now finds, in areas 2 to 16 blocks
across, the runs of heights that are solid in at least a quarter of
the area, split where the main block changes and ending at the ground,
as Distant Horizons draws far terrain. Coarser tiles carry these runs
when asked for the ground's shape, and the studio draws each as a box
with its top, its underside where it floats, and the sides its
neighbours leave open, in the average colours of its block's pictures,
which near textures fade to.
2026-11-12 08:41:05 +01:00
piexel dccdd8c09d Draw the 3D world's near ground block by block
The near ground was drawn from the top of each column, with the blocks
raised above it, so overhangs, the wood under leaves and anything
beside a trunk were lost.

The server now finds, for each chunk it generates, every block the open
air reaches: from the top of the chunk and from beside it above the
terrain around, through leaves and water too, so caves closed to the
sky stay out. Each block comes with the sides that face that air.
Tiles a block a column carry these blocks when asked, and the studio
draws each from its model, leaving out a face its model lets a
neighbour hide unless that side faces the air. Blocks without a model
are cubes of their look or colour; water shows the sides that face the
air, and none against plants that grow in it.
2026-11-12 08:20:01 +01:00
piexel 93d6ffe70e Keep the studio responsive while block tiles generate
Block tiles held the bridge's few request threads while their chunks
generated, and coarse tiles pushed their own chunks out of the cache
before reading them. Each tile now reads its columns as its chunks
generate and coarse tiles keep none; block tiles wait on threads of
their own; the studio gives quick and slow tiles separate request
slots.

The planner now keeps any stored tile with blocks in sight, not only
drawn ones, and draws columns no finer than a pixel again: at half a
pixel a forest view held twelve million triangles. The atlas gets
mipmaps down to a pixel a picture, so far textures fade to the flat
colour of coarser ground.
2026-11-12 08:00:33 +01:00
piexel e759edadfe Show generated blocks in the 3D world out to the horizon
Blocks came only on tiles of one block a column, so most of the view
showed biome colours, and zooming out swapped the blocks already seen
for them.

Every tile now carries blocks. The server generates a tile's chunks on
a pool of their own, finer tiles first, keeps up to 512 MB of chunk
tops, and stops a tile the studio cancels. A tile's quick biome version
is drawn only where no tile with blocks of any level is known, so
ground once sampled stays in sight until its replacement has blocks
too. Wider columns take their highest raised block as their top. The
planner now splits columns down to half a pixel and draws up to 192
tiles.
2026-11-12 07:34:49 +01:00
piexel 4e46eb4a6a Draw trees in the studio's 3D world as whole blocks
Each column carried only its highest solid block, so a tree's leaves
stood as a pillar down to the ground. The ground is now the terrain's
top, and the solid blocks above it go to the studio as a list per
column. The 3D world draws them as cubes and leaves out the faces that
touch the ground or each other. The 2D map still colours and shades a
column by its highest block.
2026-11-12 07:02:17 +01:00
piexel 55f6a06f9f Show decorators, snippets and ground cover in the studio
Decorators get their own pattern view from the decorant module: each
biome's decorators from above, placed where their own noise allows.

The Palettes and Decorators views list the pack's snippet files in a
Snippets group, with the biomes that use each one, and mark entries
read from a snippet. PackResources gains snippetOf and snippets so a
module can tell where a settings value came from.

The 3D world draws what stands on the ground, such as grass and
flowers, as the block's own model. A plugin block that is solid on the
server but shown to players as a plant no longer counts as ground.
2026-11-12 04:09:20 +01:00
piexel 67063b02d7 Fix the studio's 3D terrain: blank views, grey blocks, pale colours
The 3D views looked for tiles across the world's whole build height. In a
pack with a tall sky most of a tile's box is air, so once the camera came
close to the ground the planner drew sixteen far tiles and none under the
camera. Tiles are now looked for between the lowest and highest ground
drawn so far, and ranked by how far they lie from the ground in the middle
of the view instead of by their centre point.

Saved tiles named blocks without their properties, which matched no model
variant, so grass and every plugin block drew as flat grey. Saved and
generated tiles now carry the state players see, which for a plugin block
is the vanilla state it borrows.

Colours went through three.js colour management as if they were linear
light and came out pale with flat shading. They are drawn as given now, as
v3e does. Gaps in cut-out textures such as leaves take the texture's own
colour instead of black.

Also in the studio:
- Right click or Ctrl+click on 3D terrain teleports there, as on the map.
- The land, sea and cave biome layer views are gone.
- New icons for the views and the map tools that shared one or said
  something else.
- A saved world with nothing finished says so instead of reading forever.
2026-11-12 01:11:31 +01:00
piexel 6a86ad4b3f Hotload while chunks generate and keep regen off the server thread
The studio hotloader skipped its folder check whenever a chunk had generated
in the last two seconds, then slept four. Flying around while saving kept
postponing the hotload, which v3 never did. The generation stage gate already
makes a hotload wait for chunks in flight, so the holdoff is gone. Each
hotload now logs its pack and duration.

Regen called World#getChunkAt on the server thread, which loads or generates
the chunk synchronously. Past the loaded area that stalled the tick until the
watchdog killed the server. Regen now loads chunks asynchronously and skips
chunks that were never generated, since their mantle is reset and they
generate fresh when visited.

Regen also generated outside the stage gate, so a hotload sealed the engine
under it and the chunks in flight failed. It takes a stage permit now, like
any chunk the server generates.
2026-11-11 19:50:51 +01:00
piexel 547edabfdf Import native structures only when importedStructures sets enabled
Declaring importedStructures used to opt in by itself, so a block that
only set datapackOverrides to false turned vanilla structures on. The
new enabled option, false by default, is now the only switch; the other
options shape the import once it is on.
2026-11-11 18:15:57 +01:00
piexel f4821f7b0d Show which structure piece a dust-inspected block belongs to
Jigsaw pieces record a placement marker only on storage blocks, so the
dust called every other piece block "decoration/object/stilt". Where no
marker exists, the dust now asks the modules: ObjectsAt.placementAt is
a new default API method, and the structure module answers it by
assembling the starts within structure reach again and returning the
piece whose box holds the block. A lone surface piece takes its height
from the terrain when placed, so only its column has to match.

The Bukkit and modded dust both print "Placed by: structure '<key>'
piece '<object>'", translated in every bundled locale.
2026-11-11 18:05:49 +01:00
piexel e9b80420de Make native structure imports opt-in and mark them experimental
A dimension without importedStructures no longer gets vanilla, mod or
datapack structures in new chunks. Declaring the setting imports them,
and disabled/disabledExact still narrow it down. Iris placements that
place a vanilla structure themselves work without it.

The feature is named "Structures (experimental)" and its description
says so. The locate message for a blocked structure now says it is not
imported by importedStructures or is disabled by a pack module.
2026-11-11 18:05:46 +01:00
piexel 5915a968ff Expect the hotload guard to accept commented pack files
VolmLib's JSONTokener now skips comments, so the guard and the loaders
read them the same way.
2026-11-11 15:51:17 +01:00
piexel 1b08857bb8 Bring back /iris std hotload and let studio commands find the studio you are in
- /iris std hotload (aliases reload, h) hotloads the studio you stand in, else
  the open studio. A pack file that does not parse stops it, the same way it
  stops the file watcher, and the sender sees which file.
- modules, version, update, pkg, profile and importvanilla take an optional
  dim=<pack>. Without it they use the Iris world you stand in, else the open
  studio. The silent fall back to the "default" pack is gone.
- map and imagemap fall back to the open studio's world from the console or a
  vanilla world.
- The studio map link is printed only when the Studio window could not open.
2026-11-11 15:00:34 +01:00
piexel e51f1b8c62 Hold the unread-fields report until Iris can log it in colour
The datapack compiler loads packs before the platform binds, so their report
went to the plain stderr fallback. It now waits for the platform, at most two
minutes, and merges with the fields found after it.
2026-11-11 14:39:36 +01:00
piexel a71b27ce31 List a pack's unread fields once and draw plugin blocks in the palette view
Unknown fields used to log one warning per field per file, with a snippet,
every time a pack loaded. A pack without modules logged about 2200 of them at
startup. Now they are gathered per pack and stated as one list a few seconds
after the first, one line per field with its first file and how many others
hold it. Each file's field is stated once per server start. The header says
when the pack loads no modules, which is why layers, wall and decorators
were unread here.

The Bukkit warning path stripped colours. It now keeps section-sign codes
and still reads nothing else as markup.

The palette view drew CraftEngine blocks by their server-only state, such as
craftengine:custom_7, which has no assets. The pattern header now names a
plugin block as the pack does and adds the vanilla state players see, which
the studio draws. Asset reads check plugin resource packs before the client
jar for minecraft paths too, since those packs replace vanilla blockstates.
2026-11-11 14:34:45 +01:00
piexel f98b6dc548 Let /iris std update force=true give a pack the built-in modules back
A pack without modules.json could not use the update command, and a pack that
dropped a built-in had no way to get it back but writing the file by hand. With
force=true the command adds every module Iris ships that modules.json does not
list, at the version Iris ships, writes the file for a pack without one, and then
updates as usual. What the file already lists and pins stays.

The plain command and the console warning for a pack without modules.json now
point at the flag. On modded it is the same words: /iris std update <pack> force=true.
2026-11-11 14:06:40 +01:00
piexel 9cc45b41d0 Tell the pack's author about kept module updates when they open a studio
A server that only runs a pack logged every module update the pack kept back, along
with a hint to run the update command, for a person who should not run it. The
console now logs only the patches Iris took and packs that need a newer Iris.
/iris std open lists what the pack kept back and how to take it, on Bukkit and
modded alike, so the notice reaches the pack's author.
2026-11-11 13:41:45 +01:00
piexel 0d18637128 Take only patches on their own and leave bigger module updates to the update commands
A pack used to take every newer module on load, and a major update can change the
blocks it places or stop its settings from loading. Now a load takes patches only.
A module with a new minor or major version stays as it is, and Iris warns that it is
out of date and names the new version.

/iris std update <pack> now only updates the pack's module jars, for its author to
run before checking the settings against the new versions. It no longer writes the
VSCode workspace; studio hotload picks up the new jars and refreshes the workspace.
/iris pack update does the same for a running world, which loads the new jars at
the next server start.
2026-11-11 13:31:24 +01:00
piexel 6e96c6b71e Ship each built-in module as its own jar and let a pack's modules.json decide which update on their own
The built-ins no longer travel as one iris-builtins.jar that a pack has to
copy by hand. IrisModule builds one jar per module (the eight placement
stages share one) with an index of the id and version each module reports,
and Iris bundles that folder.

A pack lists the modules it uses in modules.json, with the version it was
built with and an optional pinned list. Before a pack loads, Iris installs
the jars of listed modules and replaces a jar that differs from the one it
ships. It keeps a jar when the module is pinned, when the pack holds a newer
version than Iris ships, and, in a world's copy of a pack, when the major
version changed, because new chunks would not match the old ones. A jar that
shares classes with a kept jar stays with it, since the two were compiled
against each other. /iris pack update takes the kept terrain changes for a
world. What is installed is recorded in modules.lock.json.

Module versions are now major.minor.patch per module, starting at 1.0.0,
with major meaning "places different blocks or stops loading settings".
2026-11-11 12:51:53 +01:00
piexel e7d1ed24cb Load built-in modules only from the pack's own jar so an Iris update never changes a pack's modules
Iris no longer loads a bundled iris-builtins.jar with every pack. It carries the jar only to copy into new packs (/iris std create), so a pack and a world's copy of it keep the module versions they were made with. Built-in modules report Iris's version instead of "built-in", and /iris std modules lists every module with version, id and jar and takes the pack positionally.
2026-11-11 08:28:12 +01:00
piexel 620d59ad7a Add /iris std modules to list the modules a pack loads, with version, id and jar 2026-11-11 07:49:02 +01:00
piexel 91f23c52b8 Show the blocks the world generates in the map and the 3D world, and drop the Height map view
Map tiles can carry the block on top of each column, read from chunks generated in memory through the world's own stages. The 2D map colours by them with a toolbar toggle and the 3D world gets a Blocks colouring with textures, both at a block a pixel or finer. The Height map view goes, as the 3D world shows heights; the Shading toggle keeps its icon under its own name.
2026-11-11 02:45:01 +01:00
piexel eb801acd86 Open the Iris Studio window from /iris studio map when the studio app is set 2026-11-10 20:42:33 +01:00
piexel cd7e9e3416 Pass octave counts through the noise offset wrapper
NoiseType.create wraps every noise in OffsetNoiseGenerator, which was not
an OctaveNoise, so CNG never set the octaves on the noise inside it. Every
multi-octave style sampled one octave: no fine detail, and a value spread
about twice as wide (natureplanet's continent style marked 21% of the world
as sea instead of v3's 6%). The wrapper now forwards setOctaves to the noise
it wraps, as VolmLib's v4 wrapper does.
2026-11-10 20:24:33 +01:00
piexel 65a6cebe9c Test loot material lookup, plugin block keys, the module summary log and the plugin content wait 2026-11-10 18:04:56 +01:00
piexel bfd2a762c7 Validate pack block keys against plugin blocks once they have loaded 2026-11-10 17:32:13 +01:00
piexel 5ea1a69190 Show each pack's module list once, not on every pack load 2026-11-10 17:32:13 +01:00
piexel da77a04fd0 Look loot items up by their namespaced key 2026-11-10 17:32:13 +01:00
piexel 1ab8aeff9e Resolve plugin blocks again once CraftEngine has loaded them
A startup world builds its engine before CraftEngine loads its packs, so
every CraftEngine block resolved as missing and stayed that way. While a
provider is still loading, an unclaimed namespaced block now resolves to
an air placeholder without a warning, and the worlds that got one hotload
once the provider reports its content loaded.
2026-11-10 17:06:31 +01:00
piexel 22b193e70a Offer the pack option when module completion has no pack to resolve 2026-11-10 16:53:11 +01:00
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