Commit Graph
1287 Commits
Author SHA1 Message Date
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
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 7b907cfdc9 Say weight in the map's pick inspection titles
Regions, biomes and children are picked by weight now, and the three inspection titles still said rarity.
2026-11-10 11:49:47 +01:00
piexel 08f4bffca9 Add a pack converter from rarity to weighted entries
A pack written with rarity needs its dimension regions, region biome lists, biome children and carving children rewritten to weighted entries. Lists that picked by 1 / rarity get the integer weights proportional to it (the least common multiple of the rarities over each, reduced by the greatest common divisor) and a list that would need a weight above 1000 stops the conversion; children keep their old rounded slots as half-slot weights with the parent listed among them. Files are edited as text so comments and formatting stay, and the conversion is all or nothing per pack. Next to the other pack tooling in core, run as PackWeightConverter [--dry-run] <pack folder>.

The converter's test checks the fixture packs are already what it would write.

v3: 96beb86e0
2026-11-10 11:46:25 +01:00
piexel 3d55236f97 Pick regions, biomes and children by weight
Rarity gave every list entry a share of 1 / rarity and children rounded slots; a weight on the list entry says what a pack author means. Dimension regions, region biome lists, biome children and carving children are now entries with a weight (1 to 1000), picked along the list in the order written, region and biome lists giving the edge to the earlier entry and children to the later. A biome keeps itself among its children only where it lists itself. PackBiome and PackRegion carry the weighted lists, and the carving module picks with the API's Weighted.pick. Rarity is gone from biomes and regions, and the three fixture packs are rewritten to the entry format.

No pin or golden moved: the changed generator seed only touches biomes of rarity other than 1, and no pinned world reads one. The fixture packs now have weights where their regions had rarities: pack-before-the-port forests 15, magnetics 1; pack-before-loot-and-spawn hot 10, terralost 6, mushroom 2, swamp 15, the rest 1.

v3: 0fbce6ba2 a598b4323 96beb86e0
2026-11-10 11:46:19 +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