Batch 6 part 3: structure locating, decoding contract, minor cuts

Finding 45: StructureLocator is the one locating service (startedStructures,
locatableStarts, locateStart, ChunkFilter moved from VanillaStructures).
StartMemo is one opaque non-empty text. VanillaStructureStart.identity is
deleted; the host only stored it. useExpansionHack and legacyAir stay: both
mirror platform structure behaviour any structure module needs.

Finding 46: DESIGN.md documents one decoding contract (fields read by name,
absent or null members keep the initialiser, unknown enum names are errors,
the host never writes null). Value type getters stop null-guarding.
NoiseStyle.cacheSize is deleted. @Desc texts rewritten. multiplier stays on
NoiseStyle: it is also an object placement's warp strength.

Finding 47: LinkedBiomes moves to world and takes the dimension's settings
as PackSettings. Optional packages move from ModuleInfo to the jar manifest
(Iris-Optional-Packages); PackageName moves into the host.
PlacementRequest.id is dropped (nothing read it).
This commit is contained in:
piexel committed 2026-10-24 09:24:12 +02:00
1 parent 6b24e6f150
commit 1bc91df048
30 files changed
+308 -314

No files matched your search

@@ -1,39 +0,0 @@
package com.volmit.config;
import com.volmit.IrisFeature;
import com.volmit.resource.PackResources;
import com.volmit.resource.ResourceId;
import java.util.Collection;
import java.util.Set;
/**
* Implemented by settings that make pack biomes part of a pack's layout besides the ones its regions list: the biome
* that a cave band puts underground, or the target of a floating island. The host asks the settings of every dimension
* and biome it reaches, without knowing the module behind them, so such a biome is loaded, registered and given its own
* settings like any other. Biomes are named by their ids, {@link PackResources#idOf} of the keys the settings hold; ids
* naming no biome of the pack are ignored.
*/
public interface LinkedBiomes {
/**
* Biomes that join the biome tree of every region the owner is part of, like the owner's children: the host registers
* them with the region, so their terrain generators take part in the region's terrain.
*
* @param pack the pack the settings belong to, which turns their keys into ids
*/
default Set<ResourceId> treeBiomes(PackResources pack) {
return Set.of();
}
/**
* Biomes the settings use besides, which a dimension reaches (their objects, decorators and settings take part in
* generation) without joining the region's biome tree.
*
* @param pack the pack the settings belong to, which turns their keys into ids
* @param dimension the settings the owner's dimension declares, for settings that name something the dimension
* declares, such as a band of its caves
*/
default Set<ResourceId> usedBiomes(PackResources pack, Collection<IrisFeature> dimension) {
return Set.of();
}
}
@@ -5,15 +5,15 @@ import java.util.Objects;
/** A span of numbers from {@code min} to {@code max}, both included, as packs write it: {@code {"min": 0, "max": 15}},
* or a snippet under {@code snippet/range/}. An omitted bound keeps its default, so give a settings field its own
* default with {@link #of}. A value the host creates with the no-argument constructor and reads the JSON into.
* default with {@link #of}. A value the host decodes as every settings class (see DESIGN.md, "Decoding contract").
*/
@Snippet("range")
@Desc("Represents a range")
@Desc("A span of numbers from min to max, both included")
public final class Range {
@Desc("The minimum value")
@Desc("The lowest value.")
private double min = 16;
@Desc("The maximum value")
@Desc("The highest value.")
private double max = 32;
private Range() {