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.
This commit is contained in:
piexel committed 2026-11-05 23:00:13 +01:00
1 parent 8ca183d0c2
commit d0ca502a56
20 files changed
+171 -5195

No files matched your search

@@ -159,7 +159,11 @@ final class IrisBlockRegistry implements BlockRegistry {
@Override
public BlockState withProperty(BlockState state, String name, String value) {
return apiState(platformState(state).withProperty(name, value));
try {
return apiState(platformState(state).withProperty(name, value));
} catch (IllegalArgumentException notAccepted) {
return state;
}
}
@Override
@@ -0,0 +1,82 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.core.modules;
import com.google.gson.Gson;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.volmit.config.JsonForms;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Reads and writes IrisApi's {@link JsonForms} classes through their codec, as the plain values Gson reads into an
* {@code Object}: maps, lists, {@code Double}s, strings and booleans. Each codec is created once.
*/
public final class JsonFormsCodecs implements TypeAdapterFactory {
private final Map<Class<?>, JsonForms.Codec<?>> codecs = new ConcurrentHashMap<>();
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
JsonForms forms = type.getRawType().getAnnotation(JsonForms.class);
if (forms == null) {
return null;
}
JsonForms.Codec<T> codec = codecOf(forms);
TypeAdapter<Object> plainValues = gson.getAdapter(Object.class);
String typeName = type.getRawType().getSimpleName();
return new TypeAdapter<T>() {
@Override
public void write(JsonWriter out, T value) throws IOException {
plainValues.write(out, codec.write(value));
}
@Override
public T read(JsonReader in) throws IOException {
Object json = plainValues.read(in);
try {
return codec.read(json);
} catch (IllegalArgumentException notAForm) {
throw new JsonParseException(typeName + ": " + notAForm.getMessage(), notAForm);
}
}
}.nullSafe();
}
@SuppressWarnings("unchecked")
private <T> JsonForms.Codec<T> codecOf(JsonForms forms) {
return (JsonForms.Codec<T>) codecs.computeIfAbsent(forms.value(), JsonFormsCodecs::newCodec);
}
private static JsonForms.Codec<?> newCodec(Class<?> type) {
try {
var constructor = type.getDeclaredConstructor();
constructor.setAccessible(true);
return (JsonForms.Codec<?>) constructor.newInstance();
} catch (ReflectiveOperationException | RuntimeException failure) {
throw new IllegalStateException("Codec " + type.getName() + " cannot be created with its no-argument constructor: " + failure, failure);
}
}
}
@@ -64,7 +64,8 @@ import java.util.stream.Stream;
* keeps its default. A {@link Snippet}
* type may be written as {@code "snippet/<name>"} or, as Iris's own snippets are, {@code "snippet/<snippet folder>/<name>"},
* both read from {@code snippet/<snippet folder>/<name>.json}. IrisApi's value types ({@code BlockSpec},
* {@code NoiseStyle} and the rest) are read like settings, and an {@code Object} as Gson reads any JSON value.
* {@code NoiseStyle} and the rest) are read like settings, an {@code Object} as Gson reads any JSON value, and a
* {@link com.volmit.config.JsonForms} class through its codec ({@link JsonFormsCodecs}).
* <p>
* Settings are written in the one shape their class declares: an object of the class's options or, when the feature
* names a {@code root} option, exactly that option's value. Iris's own classes that built-in settings hold (see
@@ -93,6 +94,7 @@ public final class ModuleSettingsDecoder {
.registerTypeAdapter(ResourceId.class, textAdapter(text -> resourceIdOf(packIds, text), ResourceId::toString))
.registerTypeAdapterFactory(new HostTypes())
.registerTypeAdapterFactory(new SnippetReferences())
.registerTypeAdapterFactory(new JsonFormsCodecs())
.create();
for (Level target : Level.values()) {
settings.put(target, settingsAt(catalog, target));
@@ -133,6 +133,14 @@ public class IrisBlockRegistryTest {
assertFalse(blocks.canPlaceOn(sandState, stoneState));
}
@Test
public void aPropertyValueTheBlockDoesNotAcceptLeavesTheStateAsItWas() {
when(sand.withProperty("facing", "up")).thenThrow(new IllegalArgumentException("Could not parse data: minecraft:sand[facing=up]"));
BlockState sandState = BlockState.parse("minecraft:sand");
assertEquals(sandState, blocks.withProperty(sandState, "facing", "up"));
}
@Test
public void eachStateIsLookedUpOnceAndAskedAgainFromMemory() {
BlockState stoneState = BlockState.parse("minecraft:stone");
@@ -0,0 +1,70 @@
package art.arcane.iris.core.modules;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonParseException;
import com.volmit.config.JsonForms;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
public class JsonFormsCodecsTest {
private static final Gson GSON = DecodingContract.appliedTo(new GsonBuilder())
.registerTypeAdapterFactory(new JsonFormsCodecs())
.create();
@Test
public void eachFormIsReadThroughTheCodecAsPlainValues() {
Settings settings = GSON.fromJson("{\"height\": 4, \"steps\": [[1, 3], 2]}", Settings.class);
assertEquals(new Height(4, 4), settings.height);
assertEquals(List.of(new Height(1, 3), new Height(2, 2)), settings.steps);
}
@Test
public void aMemberWrittenAsNullKeepsItsDefault() {
Settings settings = GSON.fromJson("{\"height\": null}", Settings.class);
assertEquals(new Height(1, 1), settings.height);
}
@Test
public void aValueIsWrittenBackInTheFormTheCodecGives() {
assertEquals("{\"height\":[1.0,3.0],\"steps\":[]}", GSON.toJson(GSON.fromJson("{\"height\": [1, 3]}", Settings.class)));
}
@Test
public void aFormTheCodecDoesNotKnowFailsNamingTheClass() {
JsonParseException failure = assertThrows(JsonParseException.class, () -> GSON.fromJson("{\"height\": \"tall\"}", Settings.class));
assertTrue(failure.getMessage(), failure.getMessage().startsWith("Height: "));
}
private static final class Settings {
private Height height = new Height(1, 1);
private List<Height> steps = List.of();
}
@JsonForms(Height.Forms.class)
private record Height(double min, double max) {
static final class Forms implements JsonForms.Codec<Height> {
@Override
public Height read(Object json) {
return switch (json) {
case Double blocks -> new Height(blocks, blocks);
case List<?> range -> new Height((Double) range.get(0), (Double) range.get(1));
default -> throw new IllegalArgumentException("a height is a number or [min, max], not " + json);
};
}
@Override
public Object write(Height value) {
return value.min() == value.max() ? value.min() : List.of(value.min(), value.max());
}
}
}
}
@@ -1,18 +0,0 @@
package art.arcane.iris.engine.mantle.components;
import art.arcane.volmlib.util.math.RNG;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class ObjectPlacingProceduralChanceTest {
@Test
public void exactChanceBoundariesRemainExact() {
for (int seed = 0; seed < 1000; seed++) {
RNG rng = new RNG(seed);
assertFalse(ChunkObjectPlacing.passesProceduralChance(rng, 0.0));
assertTrue(ChunkObjectPlacing.passesProceduralChance(rng, 1.0));
}
}
}
@@ -1,10 +1,12 @@
package art.arcane.iris.engine.object;
import art.arcane.iris.core.modules.JsonFormsCodecs;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
/** Settings classes of the built-in modules have no setters; tests write them as the JSON packs hold. */
public final class TestSettings {
private static final Gson GSON = new Gson();
private static final Gson GSON = new GsonBuilder().registerTypeAdapterFactory(new JsonFormsCodecs()).create();
private TestSettings() {
}
@@ -1,191 +0,0 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.engine.object.procedural;
import art.arcane.iris.builtin.anchor.ObjectPlaceMode;
import art.arcane.iris.builtin.carve.CarvingMode;
import art.arcane.iris.modules.objects.PlacementChanges;
import art.arcane.iris.modules.objects.EffectiveSettings;
import com.volmit.resource.PackResources;
import art.arcane.iris.modules.objects.ProceduralObjectSettings;
import art.arcane.iris.modules.objects.ProceduralPlacement;
import art.arcane.iris.modules.objects.coral.Coral;
import art.arcane.iris.modules.objects.coral.CoralForm;
import art.arcane.iris.modules.objects.crystal.Crystal;
import art.arcane.iris.modules.objects.crystal.CrystalDistribution;
import art.arcane.iris.modules.objects.formation.Formation;
import art.arcane.iris.modules.objects.formation.FormationForm;
import art.arcane.iris.modules.objects.fungi.Fungus;
import art.arcane.iris.modules.objects.ruin.Ruin;
import art.arcane.iris.modules.objects.tree.TreeLeafMode;
import art.arcane.iris.core.loader.IrisData;
import art.arcane.iris.builtin.objects.ObjectPlacement;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.CALLS_REAL_METHODS;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
/**
* The procedural objects the overworld pack's biomes write ({@code snippet/iris/objects/procedural-objects/frozen/...}) read into the module settings
* classes (IrisApi types only) with the values Iris's own classes read from the same JSON, and made placeable.
*/
public class ProceduralSettingsDecodingTest {
private static final String ICEBERG = """
{"name": "glacial-iceberg", "chance": 0.08, "density": 1, "variants": 24, "seed": 5055001, "mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY", "surfaceSupportBuffer": 1, "block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice", "capBlock": "minecraft:blue_ice",
"rotation": {"enabled": true, "yAxis": {"enabled": true, "min": 0, "max": 360, "interval": 45}},
"form": "ICEBERG", "translate": {"y": -4}, "heightMin": 12, "heightMax": 22, "baseWidthMin": 5, "baseWidthMax": 8,
"icebergPeaks": 4, "roughness": 0.42, "jitter": 0.14}
""";
private static final String FROST_BLOOM = """
{"mode": "CENTER_HEIGHT", "carvingSupport": "SURFACE_ONLY",
"rotation": {"enabled": true, "yAxis": {"enabled": true, "min": 0, "max": 360, "interval": 45}},
"growthSurface": "FLOOR", "block": "minecraft:packed_ice", "blockPalette": "snippet/palette/frozen/magical-ice",
"tipBlock": "minecraft:blue_ice", "baseBlock": "minecraft:blue_ice", "tipChance": 0.65, "name": "glacial-frost-bloom",
"chance": 0.28, "density": 2, "variants": 24, "seed": 5055031, "translate": {"y": -1}, "baseRadius": 1.8, "baseNoise": 0.4,
"shardCountMin": 3, "shardCountMax": 6, "shardLengthMin": 2, "shardLengthMax": 5, "shardBaseRadius": 1.1,
"shardTaper": 1.0, "spreadAngle": 68, "distribution": "GOLDEN_ANGLE", "jitter": 0.35}
""";
private static final String BIOME_SNIPPET = "\"snippet/iris/objects/procedural-objects/frozen/magical-ice-spikes-biome\"";
@Rule
public TemporaryFolder folder = new TemporaryFolder();
private Gson gson;
@Before
public void decodeLikeIrisDoes() throws IOException {
File palettes = folder.newFolder("snippet", "palette", "frozen");
Files.writeString(new File(palettes, "magical-ice.json").toPath(),
"{\"style\": {\"style\": \"SIMPLEX\", \"zoom\": 0.4}, \"palette\": [{\"block\": \"minecraft:packed_ice\"}, {\"block\": \"minecraft:blue_ice\", \"weight\": 2}]}");
File objects = folder.newFolder("snippet", "iris", "objects", "procedural-objects", "frozen");
Files.writeString(new File(objects, "magical-ice-spikes-biome.json").toPath(),
"{\"formations\": [" + ICEBERG + "], \"crystals\": [" + FROST_BLOOM + "]}");
IrisData data = mock(IrisData.class, CALLS_REAL_METHODS);
doReturn(folder.getRoot()).when(data).getDataFolder();
gson = new GsonBuilder().registerTypeAdapterFactory(data).create();
}
@Test
public void aFormationReadsEveryFieldIrisReadFromIt() {
Formation iceberg = gson.fromJson(ICEBERG, Formation.class);
assertEquals("glacial-iceberg", iceberg.name());
assertEquals(0.08, iceberg.chance(), 0);
assertEquals(24, iceberg.variants());
assertEquals(5055001L, iceberg.seed());
assertEquals(ObjectPlaceMode.CENTER_HEIGHT, iceberg.mode());
assertEquals(CarvingMode.SURFACE_ONLY, iceberg.carvingSupport());
assertEquals(1, iceberg.surfaceSupportBuffer());
assertEquals("minecraft:packed_ice", iceberg.block());
assertEquals("minecraft:blue_ice", iceberg.capBlock().orElseThrow());
assertEquals(FormationForm.ICEBERG, iceberg.form());
assertEquals(-4, iceberg.translate().y());
assertTrue(iceberg.rotation().yAxis().enabled());
assertEquals(45, iceberg.rotation().yAxis().interval(), 0);
assertEquals(360, iceberg.rotation().yAxis().max(), 0);
assertEquals(4, iceberg.icebergPeaks());
assertEquals(0.42, iceberg.roughness(), 0);
}
@Test
public void palettesMayBeSnippetsAndReadAsPaletteSpecs() {
Formation iceberg = gson.fromJson(ICEBERG, Formation.class);
var palette = iceberg.blockPalette().orElseThrow();
assertEquals("SIMPLEX", palette.style().style());
assertEquals(0.4, palette.style().zoom(), 0);
assertEquals(2, palette.palette().size());
assertEquals(2, palette.palette().get(1).weight());
assertTrue(gson.fromJson("{}", Formation.class).blockPalette().isEmpty());
}
@Test
public void aCrystalReadsItsFieldsAndEnums() {
Crystal bloom = gson.fromJson(FROST_BLOOM, Crystal.class);
assertEquals("glacial-frost-bloom", bloom.name());
assertEquals(CrystalDistribution.GOLDEN_ANGLE, bloom.distribution());
assertEquals(1.8, bloom.baseRadius(), 0);
assertEquals(6, bloom.shardCountMax());
assertEquals("minecraft:blue_ice", bloom.baseBlock());
assertEquals(-1, bloom.translate().y());
}
@Test
public void aBiomeHoldsItsProceduralObjectsFromASnippet() {
ProceduralObjectSettings objects = gson.fromJson(BIOME_SNIPPET, ProceduralObjectSettings.class);
assertEquals(1, objects.formations().size());
assertEquals(1, objects.crystals().size());
assertEquals("glacial-iceberg", objects.formations().get(0).name());
assertFalse(ResolvedProceduralObjects.resolve(objects, mock(PackResources.class)).isEmpty());
}
@Test
public void everyKindPlacesWithItsSettings() {
List<ProceduralPlacement> placements = ResolvedProceduralObjects.resolve(gson.fromJson("{\"coral\": [{}], \"fungi\": [{}], \"ruins\": [{}], "
+ "\"formations\": [" + ICEBERG + "], \"crystals\": [" + FROST_BLOOM + "]}", ProceduralObjectSettings.class), mock(PackResources.class));
assertEquals(5, placements.size());
ProceduralPlacement iceberg = placements.get(1);
assertEquals("glacial-iceberg", iceberg.name());
assertEquals(0.08, iceberg.chance(), 0);
ObjectPlacement placement = new EffectiveSettings().of(iceberg, PlacementChanges.NONE);
assertEquals(ObjectPlaceMode.CENTER_HEIGHT, placement.mode());
assertEquals(1, placement.surfaceSupportBuffer());
assertEquals(-4, placement.translate().y());
assertEquals(45, placement.rotation().yAxis().interval(), 0);
assertTrue(placement.rotation().enabled());
assertFalse(iceberg.plausible());
}
@Test
public void emptyKindsHaveIrisDefaults() {
Coral coral = gson.fromJson("{}", Coral.class);
assertEquals("coral", coral.name());
assertEquals(0.4, coral.chance(), 0);
assertEquals(CoralForm.BRANCHING, coral.form());
assertEquals("minecraft:tube_coral_block", coral.block());
assertTrue(coral.underwater());
assertTrue(coral.tipBlock().isEmpty());
assertTrue(coral.stiltSettings().isEmpty());
assertEquals(ObjectPlaceMode.MIN_HEIGHT, gson.fromJson("{}", Ruin.class).mode());
assertEquals("fungus", gson.fromJson("{}", Fungus.class).name());
assertEquals(3, gson.fromJson("{}", Formation.class).surfaceSupportBuffer());
assertEquals(TreeLeafMode.TRIMMED, TreeLeafMode.valueOf("TRIMMED"));
}
}
@@ -1,355 +0,0 @@
package art.arcane.iris.engine.object.procedural.formation;
import art.arcane.iris.engine.object.TestSettings;
import art.arcane.iris.modules.objects.formation.Formation;
import art.arcane.iris.engine.object.procedural.formation.FormationCanvas;
import art.arcane.iris.engine.object.procedural.formation.FormationShapeBuilder;
import art.arcane.volmlib.util.math.Vector3i;
import art.arcane.volmlib.util.math.RNG;
import org.junit.Test;
import java.util.ArrayDeque;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class FormationShapeBuilderTest {
@Test
public void magicalFormsAreDeterministicAndGrounded() {
assertDeterministicAndGrounded(this::iceberg);
assertDeterministicAndGrounded(this::fissure);
assertDeterministicAndGrounded(this::spiral);
assertDeterministicAndGrounded(this::overhang);
}
@Test
public void icebergBuildsWideBodyWithMultipleSummits() {
FormationCanvas canvas = iceberg(41L);
assertTrue(maxY(canvas) >= 12);
assertTrue(horizontalDiameter(canvas) >= 12);
assertTrue(localSummits(canvas) >= 2);
}
@Test
public void fissureKeepsShardsSeparatedByOpenCracks() {
FormationCanvas canvas = fissure(73L);
assertTrue(connectedComponents(canvas) >= 3);
assertTrue(maxY(canvas) >= 10);
}
@Test
public void spiralLeavesAnOpenCenterAndCirclesMultipleQuadrants() {
FormationCanvas canvas = spiral(101L);
int middleY = 9;
assertFalse(canvas.has(0, middleY, 0));
assertTrue(hasQuadrant(canvas, true, true));
assertTrue(hasQuadrant(canvas, true, false));
assertTrue(hasQuadrant(canvas, false, true));
assertTrue(hasQuadrant(canvas, false, false));
}
@Test
public void overhangCantileversBeyondItsGroundedFoot() {
FormationCanvas canvas = overhang(131L);
double footReach = maxHorizontalReach(canvas, 0, 2);
double upperReach = maxHorizontalReach(canvas, 9, Integer.MAX_VALUE);
assertTrue(upperReach >= footReach + 5.0);
}
@Test
public void thinLeaningSpireRetainsAConnectedPointedTip() {
Formation formation = baseFormation();
TestSettings.with(formation, "roughness", 0.12);
TestSettings.with(formation, "jitter", 0.02);
TestSettings.with(formation, "topWidth", 0);
TestSettings.with(formation, "lean", 10);
TestSettings.with(formation, "leanAzimuth", 18);
FormationCanvas canvas = new FormationCanvas();
int height = 48;
FormationShapeBuilder.spire(canvas, formation, height, 1.0, new RNG(137L));
double shear = Math.tan(Math.toRadians(formation.lean())) * (height - 1);
int tipX = (int) Math.round(Math.cos(Math.toRadians(formation.leanAzimuth())) * shear);
int tipZ = (int) Math.round(Math.sin(Math.toRadians(formation.leanAzimuth())) * shear);
assertEquals(FormationCanvas.Role.CAP, canvas.getCells().get(new Vector3i(tipX, height - 1, tipZ)));
assertEquals(height - 1, maxY(canvas));
assertEquals(1, connectedComponents(canvas));
assertTrue(maxLayerDiameter(canvas) <= 3);
}
@Test
public void archRetainsGroundedLegsAndAnOpenCenter() {
Formation formation = baseFormation();
TestSettings.with(formation, "archSpan", 10);
TestSettings.with(formation, "archThickness", 2);
TestSettings.with(formation, "archAsymmetry", 0.8);
FormationCanvas canvas = arch(formation, 149L);
FormationCanvas repeated = arch(formation, 149L);
FormationCanvas different = arch(formation, 151L);
assertEquals(canvas.getCells(), repeated.getCells());
assertFalse(canvas.getCells().equals(different.getCells()));
assertEquals(1, connectedComponents(canvas));
assertTrue(layerComponents(canvas, 0) >= 2);
assertTrue(openCenterColumn(canvas, 3, 6));
assertTrue(axisDiameter(canvas, false) >= 4);
assertTrue(maxY(canvas) >= 16);
assertTrue(maxY(canvas) <= 18);
assertTrue(unmirroredCells(canvas) >= 20);
}
@Test
public void zeroAsymmetryKeepsArchMirroredAndThicknessScales() {
Formation formation = baseFormation();
TestSettings.with(formation, "roughness", 0.0);
TestSettings.with(formation, "jitter", 0.0);
TestSettings.with(formation, "archSpan", 10);
TestSettings.with(formation, "archAsymmetry", 0.0);
TestSettings.with(formation, "archThickness", 1);
FormationCanvas thin = arch(formation, 173L);
TestSettings.with(formation, "archThickness", 2);
FormationCanvas medium = arch(formation, 173L);
TestSettings.with(formation, "archThickness", 3);
FormationCanvas thick = arch(formation, 173L);
assertEquals(0, unmirroredCells(medium));
assertTrue(thin.getCells().size() < medium.getCells().size());
assertTrue(medium.getCells().size() < thick.getCells().size());
}
private void assertDeterministicAndGrounded(CanvasFactory factory) {
FormationCanvas first = factory.create(31L);
FormationCanvas second = factory.create(31L);
assertFalse(first.isEmpty());
assertEquals(first.getCells(), second.getCells());
assertTrue(hasLayer(first, 0));
}
private FormationCanvas iceberg(long seed) {
Formation formation = baseFormation();
TestSettings.with(formation, "icebergPeaks", 4);
FormationCanvas canvas = new FormationCanvas();
FormationShapeBuilder.iceberg(canvas, formation, 20, 5.0, new RNG(seed));
return canvas;
}
private FormationCanvas fissure(long seed) {
Formation formation = baseFormation();
TestSettings.with(formation, "fractureCount", 3);
TestSettings.with(formation, "fractureSeparation", 4);
FormationCanvas canvas = new FormationCanvas();
FormationShapeBuilder.fissure(canvas, formation, 18, 4.0, new RNG(seed));
return canvas;
}
private FormationCanvas spiral(long seed) {
Formation formation = baseFormation();
TestSettings.with(formation, "spiralTurns", 1.75);
TestSettings.with(formation, "spiralRadius", 6);
TestSettings.with(formation, "spiralThickness", 1);
FormationCanvas canvas = new FormationCanvas();
FormationShapeBuilder.spiral(canvas, formation, 20, 4.0, new RNG(seed));
return canvas;
}
private FormationCanvas overhang(long seed) {
Formation formation = baseFormation();
TestSettings.with(formation, "overhangReach", 14);
TestSettings.with(formation, "overhangDrop", 4);
FormationCanvas canvas = new FormationCanvas();
FormationShapeBuilder.overhang(canvas, formation, 20, 3.0, new RNG(seed));
return canvas;
}
private FormationCanvas arch(Formation formation, long seed) {
FormationCanvas canvas = new FormationCanvas();
FormationShapeBuilder.arch(canvas, formation, 18, 4.0, new RNG(seed));
return canvas;
}
private Formation baseFormation() {
Formation formation = new Formation();
TestSettings.with(formation, "roughness", 0.2);
TestSettings.with(formation, "jitter", 0.05);
return formation;
}
private boolean hasLayer(FormationCanvas canvas, int y) {
for (Vector3i position : canvas.getCells().keySet()) {
if (position.getBlockY() == y) {
return true;
}
}
return false;
}
private int maxY(FormationCanvas canvas) {
int max = Integer.MIN_VALUE;
for (Vector3i position : canvas.getCells().keySet()) {
max = Math.max(max, position.getBlockY());
}
return max;
}
private int horizontalDiameter(FormationCanvas canvas) {
int minX = Integer.MAX_VALUE;
int maxX = Integer.MIN_VALUE;
int minZ = Integer.MAX_VALUE;
int maxZ = Integer.MIN_VALUE;
for (Vector3i position : canvas.getCells().keySet()) {
minX = Math.min(minX, position.getBlockX());
maxX = Math.max(maxX, position.getBlockX());
minZ = Math.min(minZ, position.getBlockZ());
maxZ = Math.max(maxZ, position.getBlockZ());
}
return Math.max(maxX - minX + 1, maxZ - minZ + 1);
}
private int axisDiameter(FormationCanvas canvas, boolean xAxis) {
int min = Integer.MAX_VALUE;
int max = Integer.MIN_VALUE;
for (Vector3i position : canvas.getCells().keySet()) {
int coordinate = xAxis ? position.getBlockX() : position.getBlockZ();
min = Math.min(min, coordinate);
max = Math.max(max, coordinate);
}
return max - min + 1;
}
private int maxLayerDiameter(FormationCanvas canvas) {
int maximum = 0;
for (int y = 0; y <= maxY(canvas); y++) {
int minX = Integer.MAX_VALUE;
int maxX = Integer.MIN_VALUE;
int minZ = Integer.MAX_VALUE;
int maxZ = Integer.MIN_VALUE;
for (Vector3i position : canvas.getCells().keySet()) {
if (position.getBlockY() != y) {
continue;
}
minX = Math.min(minX, position.getBlockX());
maxX = Math.max(maxX, position.getBlockX());
minZ = Math.min(minZ, position.getBlockZ());
maxZ = Math.max(maxZ, position.getBlockZ());
}
if (minX != Integer.MAX_VALUE) {
maximum = Math.max(maximum, Math.max(maxX - minX + 1, maxZ - minZ + 1));
}
}
return maximum;
}
private boolean openCenterColumn(FormationCanvas canvas, int halfWidth, int maxY) {
for (int x = -halfWidth; x <= halfWidth; x++) {
for (int y = 0; y <= maxY; y++) {
if (canvas.has(x, y, 0)) {
return false;
}
}
}
return true;
}
private int unmirroredCells(FormationCanvas canvas) {
int unmatched = 0;
for (Vector3i position : canvas.getCells().keySet()) {
if (!canvas.has(-position.getBlockX(), position.getBlockY(), position.getBlockZ())) {
unmatched++;
}
}
return unmatched;
}
private int localSummits(FormationCanvas canvas) {
Set<String> summits = new HashSet<>();
for (Vector3i position : canvas.getCells().keySet()) {
if (!canvas.has(position.getBlockX(), position.getBlockY() + 1, position.getBlockZ())) {
int bucketX = Math.floorDiv(position.getBlockX(), 3);
int bucketZ = Math.floorDiv(position.getBlockZ(), 3);
if (position.getBlockY() >= 8) {
summits.add(bucketX + ":" + bucketZ);
}
}
}
return summits.size();
}
private int connectedComponents(FormationCanvas canvas) {
Set<Vector3i> remaining = new HashSet<>(canvas.getCells().keySet());
int components = 0;
while (!remaining.isEmpty()) {
Vector3i start = remaining.iterator().next();
remaining.remove(start);
ArrayDeque<Vector3i> queue = new ArrayDeque<>();
queue.add(start);
while (!queue.isEmpty()) {
Vector3i current = queue.removeFirst();
for (Vector3i neighbor : neighbors(current)) {
if (remaining.remove(neighbor)) {
queue.addLast(neighbor);
}
}
}
components++;
}
return components;
}
private int layerComponents(FormationCanvas canvas, int y) {
FormationCanvas layer = new FormationCanvas();
for (Map.Entry<Vector3i, FormationCanvas.Role> entry : canvas.getCells().entrySet()) {
Vector3i position = entry.getKey();
if (position.getBlockY() == y) {
layer.setBody(position.getBlockX(), position.getBlockY(), position.getBlockZ());
}
}
return connectedComponents(layer);
}
private Set<Vector3i> neighbors(Vector3i position) {
Set<Vector3i> neighbors = new HashSet<>();
neighbors.add(new Vector3i(position.getBlockX() + 1, position.getBlockY(), position.getBlockZ()));
neighbors.add(new Vector3i(position.getBlockX() - 1, position.getBlockY(), position.getBlockZ()));
neighbors.add(new Vector3i(position.getBlockX(), position.getBlockY() + 1, position.getBlockZ()));
neighbors.add(new Vector3i(position.getBlockX(), position.getBlockY() - 1, position.getBlockZ()));
neighbors.add(new Vector3i(position.getBlockX(), position.getBlockY(), position.getBlockZ() + 1));
neighbors.add(new Vector3i(position.getBlockX(), position.getBlockY(), position.getBlockZ() - 1));
return neighbors;
}
private boolean hasQuadrant(FormationCanvas canvas, boolean positiveX, boolean positiveZ) {
for (Vector3i position : canvas.getCells().keySet()) {
boolean matchesX = positiveX ? position.getBlockX() >= 3 : position.getBlockX() <= -3;
boolean matchesZ = positiveZ ? position.getBlockZ() >= 3 : position.getBlockZ() <= -3;
if (matchesX && matchesZ) {
return true;
}
}
return false;
}
private double maxHorizontalReach(FormationCanvas canvas, int minY, int maxY) {
double max = 0.0;
for (Vector3i position : canvas.getCells().keySet()) {
if (position.getBlockY() < minY || position.getBlockY() > maxY) {
continue;
}
max = Math.max(max, Math.hypot(position.getBlockX(), position.getBlockZ()));
}
return max;
}
private interface CanvasFactory {
FormationCanvas create(long seed);
}
}
@@ -1,280 +0,0 @@
package art.arcane.iris.engine.object.procedural.tree;
import art.arcane.iris.engine.object.TestSettings;
import art.arcane.iris.modules.objects.tree.TreeSubBranches;
import art.arcane.iris.modules.objects.tree.TreeBranches;
import art.arcane.iris.modules.objects.tree.TreeProfile;
import art.arcane.iris.modules.objects.tree.TreeLeafMode;
import art.arcane.iris.modules.objects.tree.TreeFunction;
import art.arcane.iris.modules.objects.tree.TreeBranchProbability;
import art.arcane.iris.modules.objects.tree.TreeAzimuthMode;
import art.arcane.iris.engine.object.procedural.tree.TreeBlockCanvas;
import art.arcane.iris.engine.object.procedural.tree.TreeCanopyBuilder;
import art.arcane.iris.engine.object.procedural.tree.TreePlausibility;
import art.arcane.iris.engine.object.procedural.tree.TreeRootBuilder;
import art.arcane.iris.engine.object.procedural.tree.TreeSupport;
import art.arcane.iris.engine.object.procedural.tree.TreeTrunkBuilder;
import art.arcane.iris.modules.objects.tree.Tree;
import org.junit.Test;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
public class ProceduralTreeGeneratorTest {
@Test
public void variantsUseTreeSpecificProceduralOwnershipKeys() {
Tree tree = new Tree();
TestSettings.with(tree, "name", "towering-oak");
assertEquals("procedural/tree/towering-oak#3", Tree.variantLoadKey(tree.name(), 3));
}
@Test
public void trunkBuildsConnectedColumnOfRequestedHeight() {
Tree tree = new Tree();
TestSettings.with(tree, "trunk", "minecraft:oak_log");
TestSettings.with(tree, "trunkWidth", 1);
TreeBlockCanvas canvas = new TreeBlockCanvas();
int height = 12;
TreeTrunkBuilder.build(canvas, tree, height);
for (int y = 0; y < height; y++) {
assertTrue("trunk column missing at y=" + y, canvas.has(0, y, 0));
}
assertEquals(height, canvas.getTrunk().size());
}
@Test
public void leaningTrunkStaysConnected() {
Tree tree = new Tree();
TestSettings.with(tree, "trunk", "minecraft:oak_log");
TestSettings.with(tree, "leanAngle", 35);
TestSettings.with(tree, "leanAzimuth", 45);
TreeBlockCanvas canvas = new TreeBlockCanvas();
int height = 16;
TreeTrunkBuilder.build(canvas, tree, height);
for (int y = 0; y < height; y++) {
boolean layerHasBlock = false;
for (TreeBlockCanvas.Vec v : canvas.getTrunk()) {
if (v.y() == y) {
layerHasBlock = true;
break;
}
}
assertTrue("leaning trunk has a gap at y=" + y, layerHasBlock);
}
}
@Test
public void volumeCanopyProducesLeavesAboveTrunk() {
Tree tree = new Tree();
TestSettings.with(tree, "trunk", "minecraft:oak_log");
TestSettings.with(tree, "leaves", "minecraft:oak_leaves");
TestSettings.with(tree, "profile", TreeProfile.OAK);
TreeBlockCanvas canvas = new TreeBlockCanvas();
int height = 9;
double[][] offsets = TreeTrunkBuilder.build(canvas, tree, height).get(0).offsets();
TreeCanopyBuilder.build(canvas, tree, height, offsets, 0, 1234L, null);
assertFalse("canopy produced no leaves", canvas.getLeaf().isEmpty());
int maxLeafY = Integer.MIN_VALUE;
for (TreeBlockCanvas.Vec v : canvas.getLeaf()) {
maxLeafY = Math.max(maxLeafY, v.y());
}
assertTrue("leaves should rise above the trunk top", maxLeafY >= height - 1);
}
@Test
public void hollowCanopyHasFewerLeavesThanFilled() {
TreeBlockCanvas filled = canopyOnly(TreeLeafMode.FILLED);
TreeBlockCanvas hollow = canopyOnly(TreeLeafMode.HOLLOW);
assertTrue("hollow canopy should place fewer leaves than filled",
hollow.getLeaf().size() < filled.getLeaf().size());
assertFalse("hollow canopy still places a leaf shell", hollow.getLeaf().isEmpty());
}
private TreeBlockCanvas canopyOnly(TreeLeafMode mode) {
Tree tree = new Tree();
TestSettings.with(tree, "trunk", "minecraft:oak_log");
TestSettings.with(tree, "leaves", "minecraft:oak_leaves");
TestSettings.with(tree, "profile", TreeProfile.OAK);
TestSettings.with(tree.canopy(), "mode", mode);
TreeBlockCanvas canvas = new TreeBlockCanvas();
int height = 10;
double[][] offsets = TreeTrunkBuilder.build(canvas, tree, height).get(0).offsets();
TreeCanopyBuilder.build(canvas, tree, height, offsets, 0, 99L, null);
return canvas;
}
@Test
public void branchCanopyRecordsEndpoints() {
Tree tree = new Tree();
TestSettings.with(tree, "trunk", "minecraft:jungle_log");
TestSettings.with(tree, "leaves", "minecraft:jungle_leaves");
TestSettings.with(tree, "profile", TreeProfile.JUNGLE);
TreeBranches branches = new TreeBranches();
TestSettings.with(branches, "probabilityFunction", TreeBranchProbability.CONSTANT);
TestSettings.with(branches, "probabilityConstant", 1.0);
TestSettings.with(branches, "lengthFunction", TreeFunction.CONSTANT);
TestSettings.with(branches, "lengthConstant", 4);
TestSettings.with(branches, "azimuthMode", art.arcane.iris.modules.objects.tree.TreeAzimuthMode.GOLDEN_ANGLE);
TestSettings.with(tree.canopy(), "branches", branches);
TreeBlockCanvas canvas = new TreeBlockCanvas();
int height = 14;
double[][] offsets = TreeTrunkBuilder.build(canvas, tree, height).get(0).offsets();
List<int[]> endpoints = new java.util.ArrayList<>();
TreeCanopyBuilder.build(canvas, tree, height, offsets, 0, 777L, endpoints);
assertFalse("branch system recorded no endpoints", endpoints.isEmpty());
assertFalse("branch system placed no leaves", canvas.getLeaf().isEmpty());
}
@Test
public void trunkForksProduceMultipleLimbs() {
Tree tree = new Tree();
TestSettings.with(tree, "trunk", "minecraft:oak_log");
TestSettings.with(tree, "trunkForks", 3);
TestSettings.with(tree, "forkHeight", 0.4);
TestSettings.with(tree, "forkAngle", 30);
TreeBlockCanvas canvas = new TreeBlockCanvas();
int height = 18;
List<TreeTrunkBuilder.Limb> limbs = TreeTrunkBuilder.build(canvas, tree, height);
assertEquals("a 3-fork tree should yield 3 crown limbs", 3, limbs.size());
Set<Integer> topXs = new HashSet<>();
for (TreeBlockCanvas.Vec v : canvas.getTrunk()) {
if (v.y() == height - 1) {
topXs.add(v.x());
}
}
assertTrue("forks should spread the trunk into separate tops", topXs.size() >= 2);
}
@Test
public void recursiveBranchesAddMoreWood() {
int shallow = branchWoodCount(1);
int deep = branchWoodCount(3);
assertTrue("deeper recursion should add more branch wood", deep > shallow);
}
private int branchWoodCount(int depth) {
Tree tree = new Tree();
TestSettings.with(tree, "trunk", "minecraft:oak_log");
TestSettings.with(tree, "leaves", "minecraft:oak_leaves");
TreeBranches branches = new TreeBranches();
TestSettings.with(branches, "probabilityFunction", TreeBranchProbability.CONSTANT);
TestSettings.with(branches, "probabilityConstant", 1.0);
TestSettings.with(branches, "lengthFunction", TreeFunction.CONSTANT);
TestSettings.with(branches, "lengthConstant", 4);
TestSettings.with(branches, "branchDepth", depth);
TestSettings.with(branches, "subBranches", new art.arcane.iris.modules.objects.tree.TreeSubBranches());
TestSettings.with(tree.canopy(), "branches", branches);
TreeBlockCanvas canvas = new TreeBlockCanvas();
int height = 14;
double[][] offsets = TreeTrunkBuilder.build(canvas, tree, height).get(0).offsets();
TreeCanopyBuilder.build(canvas, tree, height, offsets, 0, 555L, new java.util.ArrayList<>());
return canvas.getTrunk().size();
}
@Test
public void rootsExtendBelowTheBase() {
Tree tree = new Tree();
TestSettings.with(tree, "trunk", "minecraft:oak_log");
TreeBlockCanvas canvas = new TreeBlockCanvas();
int height = 14;
TreeTrunkBuilder.build(canvas, tree, height);
TreeRootBuilder.build(canvas, tree, height, 42L);
int minY = Integer.MAX_VALUE;
for (TreeBlockCanvas.Vec v : canvas.getTrunk()) {
minY = Math.min(minY, v.y());
}
assertTrue("roots should descend below the trunk base", minY < 0);
}
@Test
public void plausibilityDistancesPropagateFromWood() {
Set<TreeBlockCanvas.Vec> trunk = new HashSet<>();
trunk.add(new TreeBlockCanvas.Vec(0, 0, 0));
trunk.add(new TreeBlockCanvas.Vec(0, 1, 0));
TreeBlockCanvas.Vec a = new TreeBlockCanvas.Vec(1, 1, 0);
TreeBlockCanvas.Vec b = new TreeBlockCanvas.Vec(2, 1, 0);
TreeBlockCanvas.Vec c = new TreeBlockCanvas.Vec(3, 1, 0);
TreeBlockCanvas.Vec far = new TreeBlockCanvas.Vec(40, 1, 0);
Set<TreeBlockCanvas.Vec> realLeaves = new HashSet<>();
realLeaves.add(a);
realLeaves.add(b);
realLeaves.add(c);
realLeaves.add(far);
Map<TreeBlockCanvas.Vec, Integer> distances = TreePlausibility.computeDistances(trunk, realLeaves);
assertEquals(Integer.valueOf(1), distances.get(a));
assertEquals(Integer.valueOf(2), distances.get(b));
assertEquals(Integer.valueOf(3), distances.get(c));
assertNull("disconnected leaf must remain unsupported", distances.get(far));
}
@Test
public void supportTendrilsMakeFarLeavesLegal() {
TreeBlockCanvas canvas = new TreeBlockCanvas();
canvas.setTrunk(0, 0, 0, TreeBlockCanvas.Role.TRUNK, TreeBlockCanvas.Axis.Y);
for (int x = 1; x <= 14; x++) {
canvas.setLeaf(x, 0, 0, TreeBlockCanvas.Role.LEAF);
}
Map<TreeBlockCanvas.Vec, Integer> before = TreePlausibility.computeDistances(canvas.getTrunk(), canvas.getLeaf());
assertNull("the far leaf should start unsupported", before.get(new TreeBlockCanvas.Vec(14, 0, 0)));
TreeSupport.ensureLeavesSupported(canvas, 24);
Map<TreeBlockCanvas.Vec, Integer> after = TreePlausibility.computeDistances(canvas.getTrunk(), canvas.getLeaf());
assertFalse("leaves should remain after support", canvas.getLeaf().isEmpty());
for (TreeBlockCanvas.Vec leaf : canvas.getLeaf()) {
Integer d = after.get(leaf);
assertNotNull("every leaf must be reachable from wood after support", d);
assertTrue("every leaf must be within legal decay distance after support", d <= 6);
}
}
@Test
public void plausibilityDistanceCapsAtSeven() {
Set<TreeBlockCanvas.Vec> trunk = new HashSet<>();
trunk.add(new TreeBlockCanvas.Vec(0, 0, 0));
Set<TreeBlockCanvas.Vec> realLeaves = new HashSet<>();
for (int x = 1; x <= 12; x++) {
realLeaves.add(new TreeBlockCanvas.Vec(x, 0, 0));
}
Map<TreeBlockCanvas.Vec, Integer> distances = TreePlausibility.computeDistances(trunk, realLeaves);
for (int x = 1; x <= 7; x++) {
assertEquals("leaf at distance " + x + " should be reachable",
Integer.valueOf(x), distances.get(new TreeBlockCanvas.Vec(x, 0, 0)));
}
for (int x = 8; x <= 12; x++) {
assertNull("leaves beyond distance 7 must remain unsupported",
distances.get(new TreeBlockCanvas.Vec(x, 0, 0)));
}
}
}
File diff suppressed because it is too large. Load diff
@@ -1,268 +0,0 @@
{
"formations": [
{
"name": "glacial-cave-iceberg",
"chance": 0.045,
"density": 1,
"variants": 12,
"seed": 5055101,
"mode": "CENTER_HEIGHT",
"carvingSupport": "CARVING_ONLY",
"surfaceSupportBuffer": 0,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "ICEBERG",
"translate": {
"y": -1
},
"heightMin": 5,
"heightMax": 10,
"baseWidthMin": 2,
"baseWidthMax": 3,
"icebergPeaks": 3,
"roughness": 0.3,
"jitter": 0.08
},
{
"name": "glacial-cave-fissure",
"chance": 0.04,
"density": 1,
"variants": 12,
"seed": 5055102,
"mode": "CENTER_HEIGHT",
"carvingSupport": "CARVING_ONLY",
"surfaceSupportBuffer": 0,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "FISSURE",
"translate": {
"y": -1
},
"heightMin": 8,
"heightMax": 16,
"baseWidthMin": 1,
"baseWidthMax": 2,
"fractureCount": 3,
"fractureSeparation": 2,
"roughness": 0.2,
"jitter": 0.04
},
{
"name": "glacial-cave-spiral",
"chance": 0.035,
"density": 1,
"variants": 12,
"seed": 5055103,
"mode": "CEILING_HANG",
"carvingSupport": "CARVING_ONLY",
"surfaceSupportBuffer": 0,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRAL",
"heightMin": 8,
"heightMax": 16,
"baseWidthMin": 1,
"baseWidthMax": 2,
"spiralTurns": 1.3,
"spiralRadius": 3,
"spiralThickness": 1,
"roughness": 0.14,
"jitter": 0.02
},
{
"name": "glacial-cave-overhang",
"chance": 0.03,
"density": 1,
"variants": 12,
"seed": 5055104,
"mode": "CEILING_HANG",
"carvingSupport": "CARVING_ONLY",
"surfaceSupportBuffer": 0,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "OVERHANG",
"heightMin": 8,
"heightMax": 16,
"baseWidthMin": 1,
"baseWidthMax": 2,
"overhangReach": 7,
"overhangDrop": 3,
"roughness": 0.18,
"jitter": 0.03
},
{
"name": "glacial-cave-arch",
"chance": 0.03,
"density": 1,
"variants": 12,
"seed": 5055105,
"mode": "CENTER_HEIGHT",
"carvingSupport": "CARVING_ONLY",
"surfaceSupportBuffer": 0,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "ARCH",
"translate": {
"y": -1
},
"heightMin": 7,
"heightMax": 13,
"baseWidthMin": 1,
"baseWidthMax": 2,
"archSpan": 6,
"archThickness": 2,
"archAsymmetry": 0.8,
"roughness": 0.18,
"jitter": 0.03
},
{
"name": "glacial-cave-needle",
"chance": 0.24,
"density": 4,
"variants": 16,
"seed": 5055121,
"mode": "CENTER_HEIGHT",
"carvingSupport": "CARVING_ONLY",
"surfaceSupportBuffer": 0,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRE",
"translate": {
"y": -1
},
"heightMin": 9,
"heightMax": 18,
"baseWidthMin": 1,
"baseWidthMax": 2,
"topWidth": 0,
"profile": "LINEAR",
"roughness": 0.1,
"jitter": 0.01
},
{
"name": "glacial-cave-shard-fan",
"chance": 0.18,
"density": 4,
"variants": 16,
"seed": 5055122,
"mode": "CENTER_HEIGHT",
"carvingSupport": "CARVING_ONLY",
"surfaceSupportBuffer": 0,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "FISSURE",
"translate": {
"y": -1
},
"heightMin": 8,
"heightMax": 17,
"baseWidthMin": 1,
"baseWidthMax": 2,
"fractureCount": 3,
"fractureSeparation": 2,
"roughness": 0.16,
"jitter": 0.03
},
{
"name": "glacial-cave-hanging-needle",
"chance": 0.16,
"density": 3,
"variants": 16,
"seed": 5055123,
"mode": "CEILING_HANG",
"carvingSupport": "CARVING_ONLY",
"surfaceSupportBuffer": 0,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRE",
"heightMin": 10,
"heightMax": 20,
"baseWidthMin": 1,
"baseWidthMax": 2,
"topWidth": 0,
"profile": "LINEAR",
"roughness": 0.1,
"jitter": 0.01
}
]
}
@@ -1,357 +0,0 @@
{
"formations": [
{
"name": "glacial-iceberg",
"chance": 0.08,
"density": 1,
"variants": 24,
"seed": 5055001,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "ICEBERG",
"translate": {
"y": -4
},
"heightMin": 12,
"heightMax": 22,
"baseWidthMin": 5,
"baseWidthMax": 8,
"icebergPeaks": 4,
"roughness": 0.42,
"jitter": 0.14
},
{
"name": "glacial-fissure",
"chance": 0.12,
"density": 1,
"variants": 24,
"seed": 5055002,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "FISSURE",
"translate": {
"y": -4
},
"heightMin": 13,
"heightMax": 23,
"baseWidthMin": 6,
"baseWidthMax": 9,
"fractureCount": 3,
"fractureSeparation": 3,
"roughness": 0.3,
"jitter": 0.08
},
{
"name": "glacial-spiral",
"chance": 0.15,
"density": 1,
"variants": 24,
"seed": 5055003,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRAL",
"translate": {
"y": -4
},
"heightMin": 15,
"heightMax": 24,
"baseWidthMin": 5,
"baseWidthMax": 8,
"spiralTurns": 1.15,
"spiralRadius": 6,
"spiralThickness": 3,
"roughness": 0.24,
"jitter": 0.07
},
{
"name": "glacial-overhang",
"chance": 0.18,
"density": 1,
"variants": 24,
"seed": 5055004,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "OVERHANG",
"translate": {
"y": -4
},
"heightMin": 16,
"heightMax": 25,
"baseWidthMin": 5,
"baseWidthMax": 8,
"overhangReach": 13,
"overhangDrop": 6,
"roughness": 0.3,
"jitter": 0.08
},
{
"name": "glacial-arch",
"chance": 0.07,
"density": 1,
"variants": 24,
"seed": 5055005,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "ARCH",
"translate": {
"y": -4
},
"heightMin": 11,
"heightMax": 20,
"baseWidthMin": 4,
"baseWidthMax": 7,
"archSpan": 12,
"archThickness": 4,
"archAsymmetry": 1.0,
"roughness": 0.28,
"jitter": 0.07
},
{
"name": "glacial-crooked-spire",
"chance": 0.3,
"density": 1,
"variants": 32,
"seed": 5055021,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRE",
"translate": {
"y": -4
},
"heightMin": 14,
"heightMax": 24,
"baseWidthMin": 5,
"baseWidthMax": 8,
"topWidth": 0,
"profile": "PARABOLIC",
"profileWaist": 0.38,
"profileWaistFloor": 0.72,
"lean": 18,
"leanAzimuth": 18,
"roughness": 0.32,
"jitter": 0.09
},
{
"name": "glacial-drift",
"chance": 0.4,
"density": 2,
"variants": 24,
"seed": 5055041,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "BOULDER",
"translate": {
"y": -1
},
"heightMin": 3,
"heightMax": 5,
"baseWidthMin": 2,
"baseWidthMax": 4,
"roughness": 0.48,
"jitter": 0.12
},
{
"name": "glacial-shard-fan",
"chance": 0.16,
"density": 1,
"variants": 24,
"seed": 5055023,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "FISSURE",
"translate": {
"y": -4
},
"heightMin": 12,
"heightMax": 21,
"baseWidthMin": 6,
"baseWidthMax": 9,
"fractureCount": 3,
"fractureSeparation": 3,
"roughness": 0.28,
"jitter": 0.08
}
],
"crystals": [
{
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"growthSurface": "FLOOR",
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"tipBlock": "minecraft:blue_ice",
"baseBlock": "minecraft:blue_ice",
"tipChance": 0.65,
"name": "glacial-frost-bloom",
"chance": 0.28,
"density": 2,
"variants": 24,
"seed": 5055031,
"translate": {
"y": -1
},
"baseRadius": 1.8,
"baseNoise": 0.4,
"shardCountMin": 3,
"shardCountMax": 6,
"shardLengthMin": 2,
"shardLengthMax": 5,
"shardBaseRadius": 1.1,
"shardTaper": 1.0,
"spreadAngle": 68,
"distribution": "GOLDEN_ANGLE",
"jitter": 0.35
},
{
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"growthSurface": "FLOOR",
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"tipBlock": "minecraft:blue_ice",
"baseBlock": "minecraft:blue_ice",
"tipChance": 0.55,
"name": "glacial-frost-sprigs",
"chance": 0.12,
"density": 2,
"variants": 24,
"seed": 5055032,
"translate": {
"y": -1
},
"baseRadius": 1.2,
"baseNoise": 0.5,
"shardCountMin": 2,
"shardCountMax": 5,
"shardLengthMin": 1,
"shardLengthMax": 3,
"shardBaseRadius": 1.0,
"shardTaper": 1.0,
"spreadAngle": 80,
"distribution": "RANDOM",
"jitter": 0.55
}
]
}
@@ -1,255 +0,0 @@
{
"formations": [
{
"name": "glacial-crooked-spire",
"chance": 0.09,
"density": 1,
"variants": 24,
"seed": 5055021,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRE",
"translate": {
"y": -4
},
"heightMin": 12,
"heightMax": 22,
"baseWidthMin": 5,
"baseWidthMax": 7,
"topWidth": 0,
"profile": "PARABOLIC",
"profileWaist": 0.4,
"profileWaistFloor": 0.74,
"lean": 18,
"leanAzimuth": 18,
"roughness": 0.32,
"jitter": 0.09
},
{
"name": "glacial-shard-fan",
"chance": 0.08,
"density": 1,
"variants": 24,
"seed": 5055023,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "FISSURE",
"translate": {
"y": -4
},
"heightMin": 11,
"heightMax": 20,
"baseWidthMin": 6,
"baseWidthMax": 8,
"fractureCount": 3,
"fractureSeparation": 3,
"roughness": 0.28,
"jitter": 0.08
},
{
"name": "glacial-spiral",
"chance": 0.06,
"density": 1,
"variants": 24,
"seed": 5055003,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRAL",
"translate": {
"y": -4
},
"heightMin": 12,
"heightMax": 21,
"baseWidthMin": 4,
"baseWidthMax": 7,
"spiralTurns": 1.1,
"spiralRadius": 5,
"spiralThickness": 3,
"roughness": 0.24,
"jitter": 0.07
},
{
"name": "glacial-overhang",
"chance": 0.07,
"density": 1,
"variants": 24,
"seed": 5055004,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "OVERHANG",
"translate": {
"y": -4
},
"heightMin": 13,
"heightMax": 22,
"baseWidthMin": 5,
"baseWidthMax": 7,
"overhangReach": 11,
"overhangDrop": 5,
"roughness": 0.3,
"jitter": 0.08
},
{
"name": "glacial-drift",
"chance": 0.28,
"density": 2,
"variants": 24,
"seed": 5055041,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "BOULDER",
"translate": {
"y": -1
},
"heightMin": 3,
"heightMax": 5,
"baseWidthMin": 2,
"baseWidthMax": 4,
"roughness": 0.48,
"jitter": 0.12
}
],
"crystals": [
{
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"growthSurface": "FLOOR",
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"tipBlock": "minecraft:blue_ice",
"baseBlock": "minecraft:blue_ice",
"tipChance": 0.65,
"name": "glacial-frost-bloom",
"chance": 0.22,
"density": 2,
"variants": 24,
"seed": 5055031,
"translate": {
"y": -1
},
"baseRadius": 1.8,
"baseNoise": 0.4,
"shardCountMin": 3,
"shardCountMax": 6,
"shardLengthMin": 2,
"shardLengthMax": 5,
"shardBaseRadius": 1.1,
"shardTaper": 1.0,
"spreadAngle": 68,
"distribution": "GOLDEN_ANGLE",
"jitter": 0.35
},
{
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"growthSurface": "FLOOR",
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"tipBlock": "minecraft:blue_ice",
"baseBlock": "minecraft:blue_ice",
"tipChance": 0.55,
"name": "glacial-frost-sprigs",
"chance": 0.1,
"density": 2,
"variants": 24,
"seed": 5055032,
"translate": {
"y": -1
},
"baseRadius": 1.2,
"baseNoise": 0.5,
"shardCountMin": 2,
"shardCountMax": 5,
"shardLengthMin": 1,
"shardLengthMax": 3,
"shardBaseRadius": 1.0,
"shardTaper": 1.0,
"spreadAngle": 80,
"distribution": "RANDOM",
"jitter": 0.55
}
]
}
@@ -1,357 +0,0 @@
{
"formations": [
{
"name": "glacial-iceberg",
"chance": 0.04,
"density": 1,
"variants": 16,
"seed": 5055001,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "ICEBERG",
"translate": {
"y": -4
},
"heightMin": 10,
"heightMax": 19,
"baseWidthMin": 5,
"baseWidthMax": 8,
"icebergPeaks": 4,
"roughness": 0.42,
"jitter": 0.14
},
{
"name": "glacial-fissure",
"chance": 0.045,
"density": 1,
"variants": 16,
"seed": 5055002,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "FISSURE",
"translate": {
"y": -4
},
"heightMin": 11,
"heightMax": 20,
"baseWidthMin": 5,
"baseWidthMax": 8,
"fractureCount": 3,
"fractureSeparation": 3,
"roughness": 0.3,
"jitter": 0.08
},
{
"name": "glacial-spiral",
"chance": 0.055,
"density": 1,
"variants": 16,
"seed": 5055003,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRAL",
"translate": {
"y": -4
},
"heightMin": 12,
"heightMax": 21,
"baseWidthMin": 4,
"baseWidthMax": 7,
"spiralTurns": 1.1,
"spiralRadius": 5,
"spiralThickness": 3,
"roughness": 0.24,
"jitter": 0.07
},
{
"name": "glacial-overhang",
"chance": 0.06,
"density": 1,
"variants": 16,
"seed": 5055004,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "OVERHANG",
"translate": {
"y": -4
},
"heightMin": 13,
"heightMax": 22,
"baseWidthMin": 5,
"baseWidthMax": 7,
"overhangReach": 11,
"overhangDrop": 5,
"roughness": 0.3,
"jitter": 0.08
},
{
"name": "glacial-arch",
"chance": 0.025,
"density": 1,
"variants": 16,
"seed": 5055005,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "ARCH",
"translate": {
"y": -4
},
"heightMin": 10,
"heightMax": 18,
"baseWidthMin": 4,
"baseWidthMax": 6,
"archSpan": 10,
"archThickness": 4,
"archAsymmetry": 1.0,
"roughness": 0.28,
"jitter": 0.07
},
{
"name": "glacial-crooked-spire",
"chance": 0.09,
"density": 1,
"variants": 24,
"seed": 5055021,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRE",
"translate": {
"y": -4
},
"heightMin": 12,
"heightMax": 22,
"baseWidthMin": 5,
"baseWidthMax": 7,
"topWidth": 0,
"profile": "PARABOLIC",
"profileWaist": 0.4,
"profileWaistFloor": 0.74,
"lean": 18,
"leanAzimuth": 18,
"roughness": 0.32,
"jitter": 0.09
},
{
"name": "glacial-drift",
"chance": 0.22,
"density": 2,
"variants": 24,
"seed": 5055041,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "BOULDER",
"translate": {
"y": -1
},
"heightMin": 3,
"heightMax": 5,
"baseWidthMin": 2,
"baseWidthMax": 4,
"roughness": 0.48,
"jitter": 0.12
},
{
"name": "glacial-shard-fan",
"chance": 0.06,
"density": 1,
"variants": 24,
"seed": 5055023,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"capBlock": "minecraft:blue_ice",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "FISSURE",
"translate": {
"y": -4
},
"heightMin": 11,
"heightMax": 20,
"baseWidthMin": 6,
"baseWidthMax": 8,
"fractureCount": 3,
"fractureSeparation": 3,
"roughness": 0.28,
"jitter": 0.08
}
],
"crystals": [
{
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"growthSurface": "FLOOR",
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"tipBlock": "minecraft:blue_ice",
"baseBlock": "minecraft:blue_ice",
"tipChance": 0.65,
"name": "glacial-frost-bloom",
"chance": 0.16,
"density": 2,
"variants": 24,
"seed": 5055031,
"translate": {
"y": -1
},
"baseRadius": 1.8,
"baseNoise": 0.4,
"shardCountMin": 3,
"shardCountMax": 6,
"shardLengthMin": 2,
"shardLengthMax": 5,
"shardBaseRadius": 1.1,
"shardTaper": 1.0,
"spreadAngle": 68,
"distribution": "GOLDEN_ANGLE",
"jitter": 0.35
},
{
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"growthSurface": "FLOOR",
"block": "minecraft:packed_ice",
"blockPalette": "snippet/palette/frozen/magical-ice",
"tipBlock": "minecraft:blue_ice",
"baseBlock": "minecraft:blue_ice",
"tipChance": 0.55,
"name": "glacial-frost-sprigs",
"chance": 0.08,
"density": 2,
"variants": 24,
"seed": 5055032,
"translate": {
"y": -1
},
"baseRadius": 1.2,
"baseNoise": 0.5,
"shardCountMin": 2,
"shardCountMax": 5,
"shardLengthMin": 1,
"shardLengthMax": 3,
"shardBaseRadius": 1.0,
"shardTaper": 1.0,
"spreadAngle": 80,
"distribution": "RANDOM",
"jitter": 0.55
}
]
}
@@ -1,108 +0,0 @@
{
"formations": [
{
"name": "glacial-needle",
"chance": 0.42,
"density": 5,
"variants": 24,
"seed": 5055021,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:light_blue_stained_glass",
"blockPalette": "snippet/palette/magnetics/magical-glass",
"capBlock": "minecraft:tinted_glass",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRE",
"translate": {
"y": -2
},
"heightMin": 26,
"heightMax": 52,
"baseWidthMin": 1,
"baseWidthMax": 2,
"topWidth": 0,
"profile": "LINEAR",
"roughness": 0.12,
"jitter": 0.02
},
{
"name": "glacial-leaning-lance",
"chance": 0.34,
"density": 4,
"variants": 24,
"seed": 5055022,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:light_blue_stained_glass",
"blockPalette": "snippet/palette/magnetics/magical-glass",
"capBlock": "minecraft:tinted_glass",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRE",
"translate": {
"y": -2
},
"heightMin": 32,
"heightMax": 60,
"baseWidthMin": 1,
"baseWidthMax": 2,
"topWidth": 0,
"profile": "TAPER",
"lean": 10,
"leanAzimuth": 18,
"roughness": 0.14,
"jitter": 0.02
},
{
"name": "glacial-shard-fan",
"chance": 0.28,
"density": 3,
"variants": 24,
"seed": 5055023,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:light_blue_stained_glass",
"blockPalette": "snippet/palette/magnetics/magical-glass",
"capBlock": "minecraft:tinted_glass",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "FISSURE",
"translate": {
"y": -2
},
"heightMin": 26,
"heightMax": 50,
"baseWidthMin": 2,
"baseWidthMax": 3,
"fractureCount": 4,
"fractureSeparation": 3,
"roughness": 0.18,
"jitter": 0.04
}
]
}
@@ -1,108 +0,0 @@
{
"formations": [
{
"name": "glacial-needle",
"chance": 0.24,
"density": 3,
"variants": 16,
"seed": 5055021,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:light_blue_stained_glass",
"blockPalette": "snippet/palette/magnetics/magical-glass",
"capBlock": "minecraft:tinted_glass",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRE",
"translate": {
"y": -2
},
"heightMin": 20,
"heightMax": 40,
"baseWidthMin": 1,
"baseWidthMax": 2,
"topWidth": 0,
"profile": "LINEAR",
"roughness": 0.12,
"jitter": 0.02
},
{
"name": "glacial-leaning-lance",
"chance": 0.16,
"density": 3,
"variants": 16,
"seed": 5055022,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:light_blue_stained_glass",
"blockPalette": "snippet/palette/magnetics/magical-glass",
"capBlock": "minecraft:tinted_glass",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "SPIRE",
"translate": {
"y": -2
},
"heightMin": 26,
"heightMax": 48,
"baseWidthMin": 1,
"baseWidthMax": 2,
"topWidth": 0,
"profile": "TAPER",
"lean": 10,
"leanAzimuth": 18,
"roughness": 0.14,
"jitter": 0.02
},
{
"name": "glacial-shard-fan",
"chance": 0.13,
"density": 2,
"variants": 16,
"seed": 5055023,
"mode": "CENTER_HEIGHT",
"carvingSupport": "SURFACE_ONLY",
"surfaceSupportBuffer": 1,
"block": "minecraft:light_blue_stained_glass",
"blockPalette": "snippet/palette/magnetics/magical-glass",
"capBlock": "minecraft:tinted_glass",
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 45
}
},
"form": "FISSURE",
"translate": {
"y": -2
},
"heightMin": 20,
"heightMax": 38,
"baseWidthMin": 2,
"baseWidthMax": 3,
"fractureCount": 4,
"fractureSeparation": 3,
"roughness": 0.18,
"jitter": 0.04
}
]
}
@@ -1,21 +0,0 @@
{
"style": {
"style": "CELLULAR",
"zoom": 0.55
},
"zoom": 2.5,
"palette": [
{
"block": "minecraft:packed_ice",
"weight": 5
},
{
"block": "minecraft:ice",
"weight": 2
},
{
"block": "minecraft:blue_ice",
"weight": 2
}
]
}
@@ -1,21 +0,0 @@
{
"style": {
"style": "CELLULAR",
"zoom": 0.55
},
"zoom": 2.5,
"palette": [
{
"block": "minecraft:light_blue_stained_glass",
"weight": 5
},
{
"block": "minecraft:glass",
"weight": 2
},
{
"block": "minecraft:tinted_glass",
"weight": 2
}
]
}
@@ -1,88 +0,0 @@
{
"trees": [
{
"name": "bloomspire",
"chance": 0.6,
"density": 2,
"variants": 6,
"seed": 8501,
"trunk": "minecraft:cherry_wood",
"trunkPalette": {
"palette": [
{
"block": "minecraft:diamond_block",
"weight": 1
},
{
"block": "minecraft:gold_block",
"weight": 1
}
]
},
"leaves": "minecraft:cherry_leaves",
"leavesPalette": {
"style": {
"style": "CELLULAR",
"zoom": 0.3
},
"palette": [
{
"block": "minecraft:cherry_leaves",
"weight": 5
},
{
"block": "minecraft:flowering_azalea_leaves",
"weight": 2
}
]
},
"profile": "CHERRY",
"heightMin": 10,
"heightMax": 16,
"trunkWidth": 1,
"trunkShape": "BELL",
"shapeStart": 1.0,
"shapeEnd": 0.8,
"rotation": {
"enabled": true,
"yAxis": {
"enabled": true,
"min": 0,
"max": 360,
"interval": 90
}
},
"canopy": {
"mode": "DENSITY",
"leafDensity": 0.88,
"crownStretchX": 1.2,
"crownStretchZ": 1.2,
"branches": {
"probabilityFunction": "TOP_HEAVY",
"probabilityExponent": 2,
"lengthFunction": "LINEAR",
"lengthBase": 2,
"lengthCrown": 4,
"azimuthMode": "GOLDEN_ANGLE",
"elevation": 10,
"sag": 0.2,
"clusterRadius": 2,
"clusterMode": "DENSITY",
"clusterDensity": 0.85
}
},
"decorators": [
{
"target": "GROUND_SCATTER",
"block": "minecraft:pink_petals",
"chance": 0.12
},
{
"target": "LEAF_SURFACE",
"block": "minecraft:cherry_leaves",
"chance": 0.04
}
]
}
]
}