diff --git a/core/src/main/java/art/arcane/iris/core/modules/ModuleServices.java b/core/src/main/java/art/arcane/iris/core/modules/ModuleServices.java index c69f6cb7f..c5ee7f09d 100644 --- a/core/src/main/java/art/arcane/iris/core/modules/ModuleServices.java +++ b/core/src/main/java/art/arcane/iris/core/modules/ModuleServices.java @@ -197,13 +197,10 @@ public final class ModuleServices { /** The objects every module places as trees. */ public static SaplingGrowth.TreeObjects treeObjects(Engine engine) { Set objects = new LinkedHashSet<>(); - Set procedural = new LinkedHashSet<>(); for (Provider provider : providers(engine, SaplingGrowth.class)) { - SaplingGrowth.TreeObjects trees = provider.service().treeObjects(provider.world()); - objects.addAll(trees.objects()); - procedural.addAll(trees.procedural()); + objects.addAll(provider.service().treeObjects(provider.world()).objects()); } - return new SaplingGrowth.TreeObjects(objects, procedural); + return new SaplingGrowth.TreeObjects(objects); } /** What the first module with something to spawn at {@code site} plans; empty when none does. */ diff --git a/core/src/main/java/art/arcane/iris/core/service/tree/TreeDefinitionIndex.java b/core/src/main/java/art/arcane/iris/core/service/tree/TreeDefinitionIndex.java index fd8d61caf..fd5c56eb0 100644 --- a/core/src/main/java/art/arcane/iris/core/service/tree/TreeDefinitionIndex.java +++ b/core/src/main/java/art/arcane/iris/core/service/tree/TreeDefinitionIndex.java @@ -9,22 +9,21 @@ import com.volmit.service.SaplingGrowth; import java.util.Set; +/** Tells tree placements from others: objects in {@code trees/}, and every object a module says it places as a tree. */ public final class TreeDefinitionIndex { - private static final String PROCEDURAL_TREE_PREFIX = "procedural/tree/"; + private static final String TREE_FOLDER = "trees/"; private final PackResources resources; - private final Set explicitObjects; - private final Set proceduralTrees; + private final Set treeObjects; - private TreeDefinitionIndex(PackResources resources, Set explicitObjects, Set proceduralTrees) { + private TreeDefinitionIndex(PackResources resources, Set treeObjects) { this.resources = resources; - this.explicitObjects = Set.copyOf(explicitObjects); - this.proceduralTrees = Set.copyOf(proceduralTrees); + this.treeObjects = Set.copyOf(treeObjects); } public static TreeDefinitionIndex build(Engine engine) { SaplingGrowth.TreeObjects trees = ModuleServices.treeObjects(engine); - return new TreeDefinitionIndex(engine.getData().getPackResources(), trees.objects(), trees.procedural()); + return new TreeDefinitionIndex(engine.getData().getPackResources(), trees.objects()); } public boolean isTreeMarker(String marker) { @@ -34,12 +33,6 @@ public final class TreeDefinitionIndex { } String objectKey = decoded.objectKey(); - if (objectKey.startsWith(PROCEDURAL_TREE_PREFIX)) { - return proceduralTrees.contains(resources.idOf(objectKey)); - } - if (objectKey.startsWith("procedural/")) { - return false; - } - return objectKey.startsWith("trees/") || explicitObjects.contains(resources.idOf(objectKey)); + return objectKey.startsWith(TREE_FOLDER) || treeObjects.contains(resources.idOf(objectKey)); } } diff --git a/core/src/test/java/art/arcane/iris/core/modules/PackBeforeThePortDecodingTest.java b/core/src/test/java/art/arcane/iris/core/modules/PackBeforeThePortDecodingTest.java index 13fa1a37a..ca3afe94b 100644 --- a/core/src/test/java/art/arcane/iris/core/modules/PackBeforeThePortDecodingTest.java +++ b/core/src/test/java/art/arcane/iris/core/modules/PackBeforeThePortDecodingTest.java @@ -25,8 +25,6 @@ import art.arcane.iris.modules.deposit.DepositGenerator; import art.arcane.iris.modules.deposit.DepositSettings; import art.arcane.iris.builtin.objects.ObjectPlacement; import art.arcane.iris.builtin.objects.ObjectSettings; -import art.arcane.iris.modules.objects.ProceduralObjectSettings; -import art.arcane.iris.modules.objects.tree.Tree; import art.arcane.iris.builtin.structure.StructureSettings; import art.arcane.volmlib.util.json.JSONObject; import com.google.gson.Gson; @@ -168,19 +166,18 @@ public class PackBeforeThePortDecodingTest { } @Test - public void aBiomeReadsItsProceduralTreesWithTheirPalettes() throws IOException { + public void aBiomePlacesItsProceduralTreesLikeAnyObject() throws IOException { JSONObject biome = file("biomes/estranged/bloomspire-orchard.json"); - ProceduralObjectSettings procedural = decoder.decode(Level.BIOME, biome, "biome estranged/bloomspire-orchard") - .find(ProceduralObjectSettings.class).orElseThrow(); + List objects = decoder.decode(Level.BIOME, biome, "biome estranged/bloomspire-orchard") + .find(ObjectSettings.class).orElseThrow().objects(); - assertEquals(biome.getJSONObject("proceduralObjects").getJSONArray("trees").length(), procedural.trees().size()); - Tree tree = procedural.trees().getFirst(); - assertEquals("bloomspire", tree.name()); - assertEquals(8501L, tree.seed()); - assertEquals("minecraft:cherry_wood", tree.trunk()); - assertEquals(2, tree.trunkPalette().orElseThrow().palette().size()); - assertEquals("minecraft:cherry_leaves", tree.leaves()); + ObjectPlacement bloomspire = objects.stream() + .filter(placement -> placement.place().equals(List.of("procedural/trees/estranged/bloomspire"))) + .findFirst().orElseThrow(); + assertEquals(0.6, bloomspire.chance(), 0); + assertEquals(2, bloomspire.density()); + assertTrue(Files.isRegularFile(packFolder.resolve("procedural/trees/estranged/bloomspire.json"))); } @Test diff --git a/core/src/test/java/art/arcane/iris/core/service/tree/TreeDefinitionIndexTest.java b/core/src/test/java/art/arcane/iris/core/service/tree/TreeDefinitionIndexTest.java index 0d92e1bad..3c39f942b 100644 --- a/core/src/test/java/art/arcane/iris/core/service/tree/TreeDefinitionIndexTest.java +++ b/core/src/test/java/art/arcane/iris/core/service/tree/TreeDefinitionIndexTest.java @@ -1,7 +1,13 @@ package art.arcane.iris.core.service.tree; +import art.arcane.iris.engine.UsableBlockPlatform; import art.arcane.iris.engine.framework.Engine; +import art.arcane.iris.core.modules.IrisPackResources; import art.arcane.iris.core.modules.PlacementMarkers; +import art.arcane.iris.core.loader.ResourceLoader; +import art.arcane.iris.engine.procedural.GameLikeBlocks; +import art.arcane.iris.engine.procedural.ProceduralObjectCatalog; +import art.arcane.iris.engine.procedural.part.ProceduralObject; import art.arcane.iris.engine.object.world.biome.IrisBiome; import art.arcane.iris.engine.object.world.dimension.IrisDimension; import art.arcane.iris.engine.object.world.region.IrisRegion; @@ -13,22 +19,34 @@ import art.arcane.iris.engine.framework.EngineGeneration; import art.arcane.iris.engine.mantle.components.ObjectModule; import art.arcane.iris.builtin.objects.ObjectPlacement; import art.arcane.iris.builtin.objects.ObjectSettings; -import art.arcane.iris.modules.objects.ProceduralObjectSettings; -import art.arcane.iris.modules.objects.tree.Tree; import art.arcane.iris.core.modules.BuiltInPack; import art.arcane.iris.engine.object.TestSettings; +import org.junit.After; import org.junit.Test; +import java.io.File; import java.util.List; 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; import static org.mockito.Mockito.when; +import static org.mockito.Mockito.withSettings; public class TreeDefinitionIndexTest { + private static final String TWO_VARIANT_TREE = "{\"variants\":2,\"materials\":[{\"role\":\"wood\",\"block\":\"minecraft:oak_log\"}]," + + "\"parts\":[{\"stem\":{\"length\":4}}]}"; + + @After + public void unbindPlatform() { + UsableBlockPlatform.unbind(); + } + @Test - public void indexSeparatesOrdinaryProceduralAndStructureOwnership() { + public void treesAreTheTreesFolderTreePlacementsAndProceduralTreesVariantByVariant() { + UsableBlockPlatform.bind(new GameLikeBlocks().registries()); Engine engine = mock(Engine.class); IrisDimension dimension = mock(IrisDimension.class); IrisRegion region = new IrisRegion(); @@ -40,14 +58,20 @@ public class TreeDefinitionIndexTest { "{\"place\":[\"custom/ancient_oak\"],\"trees\":[{\"treeTypes\":[\"TREE\"],\"sizes\":[{}]}]}"); region.setModuleSettings(BuiltInPack.settings(TestSettings.with(new ObjectSettings(), "objects", List.of(explicit)))); - Tree proceduralTree = TestSettings.of(Tree.class, "{\"name\":\"towering-oak\",\"variants\":2}"); - biome.setModuleSettings(BuiltInPack.settings(TestSettings.with(new ProceduralObjectSettings(), "trees", List.of(proceduralTree)))); + ObjectPlacement proceduralTrees = TestSettings.of(ObjectPlacement.class, + "{\"place\":[\"procedural/trees/towering-oak\",\"procedural/rocks/boulder\"]}"); + biome.setModuleSettings(BuiltInPack.settings(TestSettings.with(new ObjectSettings(), "objects", List.of(proceduralTrees)))); when(engine.getDimension()).thenReturn(dimension); when(dimension.getModuleSettings()).thenReturn(ModuleSettings.NONE); IrisData data = mock(IrisData.class); when(engine.getData()).thenReturn(data); - ModuleResourceFixture.serve(data); + ModuleResourceFixture.serve(data) + .resource(ProceduralObjectCatalog.DEFINITIONS, "trees/towering-oak", TestSettings.of(ProceduralObject.class, TWO_VARIANT_TREE)) + .resource(ProceduralObjectCatalog.DEFINITIONS, "rocks/boulder", TestSettings.of(ProceduralObject.class, TWO_VARIANT_TREE)); + IrisPackResources host = hostResources(); + when(data.getPackResources().blocks()).thenReturn(host.blocks()); + when(data.getPackResources().objects()).thenReturn(host.objects()); ModuleResourceFixture.serveModules(data, new ObjectModule()); when(engine.getGeneration()).thenReturn(new EngineGeneration(engine)); when(dimension.getAllRegions(engine)).thenReturn(new KList().qadd(region)); @@ -57,14 +81,24 @@ public class TreeDefinitionIndexTest { assertTrue(index.isTreeMarker("trees/oak/giant@1")); assertTrue(index.isTreeMarker("custom/ancient_oak@2")); - assertTrue(index.isTreeMarker("procedural/tree/towering-oak#0@3")); - assertTrue(index.isTreeMarker("procedural/tree/towering-oak#1@4")); - assertFalse(index.isTreeMarker("procedural/towering-oak#0@3")); - assertFalse(index.isTreeMarker("procedural/tree/towering-oak#2@5")); + assertTrue(index.isTreeMarker("procedural/trees/towering-oak#0@3")); + assertTrue(index.isTreeMarker("procedural/trees/towering-oak#1@4")); + assertFalse(index.isTreeMarker("procedural/trees/towering-oak#2@5")); + assertFalse(index.isTreeMarker("procedural/rocks/boulder#0@6")); assertFalse(index.isTreeMarker(PlacementMarkers.encodeStructure( "trees/oak/giant", 1, "village" ))); } + + private static IrisPackResources hostResources() { + IrisData data = mock(IrisData.class, withSettings().stubOnly().defaultAnswer(CALLS_REAL_METHODS)); + doReturn(new File("host")).when(data).getDataFolder(); + doReturn(mock(ResourceLoader.class)).when(data).getBlockLoader(); + doReturn(null).when(data).getEngine(); + IrisPackResources resources = new IrisPackResources(data); + doReturn(resources).when(data).getPackResources(); + return resources; + } } diff --git a/core/src/test/java/art/arcane/iris/engine/mantle/components/ObjectWarmUpTest.java b/core/src/test/java/art/arcane/iris/engine/mantle/components/ObjectWarmUpTest.java index 3e3b5d811..ede314794 100644 --- a/core/src/test/java/art/arcane/iris/engine/mantle/components/ObjectWarmUpTest.java +++ b/core/src/test/java/art/arcane/iris/engine/mantle/components/ObjectWarmUpTest.java @@ -4,8 +4,9 @@ import art.arcane.iris.builtin.IrisSeedPurposes; import art.arcane.iris.builtin.LegacyStreams; import art.arcane.iris.builtin.objects.ObjectPlacement; import art.arcane.iris.builtin.objects.ObjectSettings; -import art.arcane.iris.modules.objects.ProceduralObjectSettings; import art.arcane.iris.engine.object.TestSettings; +import art.arcane.iris.engine.procedural.ProceduralObjectCatalog; +import art.arcane.iris.engine.procedural.part.ProceduralObject; import art.arcane.volmlib.util.math.RNG; import com.volmit.IrisFeature; import com.volmit.block.BlockState; @@ -44,18 +45,19 @@ public class ObjectWarmUpTest { private static final ResourceId BIOME = new ResourceId("test", "biome/biome"); @Test - public void everyPlacementAndProceduralObjectOfBiomesAndRegionsIsBuilt() { + public void everyPlacementOfBiomesAndRegionsIsBuiltWithTheProceduralObjectsItPlaces() { LegacyStreams streams = mock(LegacyStreams.class); PackResources resources = mock(PackResources.class, RETURNS_DEEP_STUBS); PackObjects objects = mock(PackObjects.class, RETURNS_MOCKS); when(resources.objects()).thenReturn(objects); when(resources.blocks().find(anyString())).thenReturn(Optional.of(BlockState.parse("minecraft:oak_log"))); + when(resources.idOf(anyString())).thenAnswer(invocation -> new ResourceId("test", invocation.getArgument(0))); + when(resources.find(eq(ProceduralObjectCatalog.DEFINITIONS), any())).thenReturn(Optional.of(oneLog())); PackSettings settings = mock(PackSettings.class); PackWorld world = worldWithStates(settings, resources, streams); - ObjectPlacement biomePlacement = placement(); - ObjectPlacement regionPlacement = placement(); + ObjectPlacement biomePlacement = placement("procedural/trees/biome-oak"); + ObjectPlacement regionPlacement = placement("procedural/trees/region-oak"); declare(settings, ObjectSettings.class, objects(regionPlacement), objects(biomePlacement)); - declare(settings, ProceduralObjectSettings.class, oneTree("region-oak"), oneTree("biome-oak")); new ObjectWarmUp(world).warm(); @@ -83,12 +85,13 @@ public class ObjectWarmUpTest { return world; } - private static ProceduralObjectSettings oneTree(String name) { - return TestSettings.of(ProceduralObjectSettings.class, "{\"trees\":[{\"name\":\"" + name + "\"}]}"); + private static ProceduralObject oneLog() { + return TestSettings.of(ProceduralObject.class, "{\"variants\":1,\"materials\":[{\"block\":\"minecraft:oak_log\"}]," + + "\"parts\":[{\"stem\":{\"length\":3}}]}"); } - private static ObjectPlacement placement() { - return TestSettings.of(ObjectPlacement.class, "{\"place\":[\"a\"]}"); + private static ObjectPlacement placement(String objectKey) { + return TestSettings.of(ObjectPlacement.class, "{\"place\":[\"" + objectKey + "\"]}"); } private static ObjectSettings objects(ObjectPlacement placement) { diff --git a/core/src/test/java/art/arcane/iris/engine/mantle/components/PlacementReachTest.java b/core/src/test/java/art/arcane/iris/engine/mantle/components/PlacementReachTest.java index b6ccb8928..884902b97 100644 --- a/core/src/test/java/art/arcane/iris/engine/mantle/components/PlacementReachTest.java +++ b/core/src/test/java/art/arcane/iris/engine/mantle/components/PlacementReachTest.java @@ -7,7 +7,9 @@ import com.volmit.geometry.BlockBox; import com.volmit.object.PackObjects; import com.volmit.object.PlaceableObject; import com.volmit.resource.PackResources; -import art.arcane.iris.modules.objects.ProceduralPlacement; +import com.volmit.block.BlockState; +import art.arcane.iris.engine.procedural.ProceduralObjectCatalog; +import art.arcane.iris.engine.procedural.part.ProceduralObject; import art.arcane.iris.builtin.anchor.ObjectPlaceMode; import art.arcane.iris.builtin.prepare.ObjectRotation; import art.arcane.iris.builtin.prepare.ObjectTranslate; @@ -39,6 +41,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.RETURNS_DEEP_STUBS; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -65,20 +70,25 @@ public class PlacementReachTest { } @Test - public void proceduralTreeTransformsContributeToRadius() { + public void aProceduralObjectReachesAsFarAsItsLargestVariantTransformed() { PlaceableObject variant = mock(PlaceableObject.class); when(variant.width()).thenReturn(5); when(variant.height()).thenReturn(48); when(variant.depth()).thenReturn(7); - ProceduralPlacement procedural = mock(ProceduralPlacement.class); - when(procedural.variants()).thenReturn(List.of(variant)); - when(procedural.mode()).thenReturn(ObjectPlaceMode.CENTER_HEIGHT); - when(procedural.rotation()).thenReturn(TestSettings.of(ObjectRotation.class, - "{\"xAxis\":{\"enabled\":true,\"min\":90,\"max\":90,\"interval\":90},\"yAxis\":{\"enabled\":false}}")); - when(procedural.translate()).thenReturn(TestSettings.of(ObjectTranslate.class, "{\"x\":3,\"y\":4}")); - when(procedural.vacuumSettings()).thenReturn(Optional.empty()); + PackResources resources = mock(PackResources.class, RETURNS_DEEP_STUBS); + PackObjects objects = mock(PackObjects.class); + when(resources.objects()).thenReturn(objects); + when(objects.build(any(), anyInt(), anyInt(), anyInt(), any())).thenReturn(variant); + when(resources.blocks().find(anyString())).thenReturn(Optional.of(BlockState.parse("minecraft:oak_log"))); + when(resources.idOf(anyString())).thenAnswer(invocation -> new ResourceId("test", invocation.getArgument(0))); + when(resources.find(eq(ProceduralObjectCatalog.DEFINITIONS), any())).thenReturn(Optional.of(TestSettings.of(ProceduralObject.class, + "{\"variants\":1,\"materials\":[{\"block\":\"minecraft:oak_log\"}],\"parts\":[{\"stem\":{\"length\":3}}]}"))); + ObjectPlacement placement = TestSettings.of(ObjectPlacement.class, "{\"place\":[\"procedural/trees/tall\"]," + + "\"rotation\":{\"xAxis\":{\"enabled\":true,\"min\":90,\"max\":90,\"interval\":90},\"yAxis\":{\"enabled\":false}}," + + "\"translate\":{\"x\":3,\"y\":4}}"); + ObjectSettings settings = TestSettings.with(new ObjectSettings(), "objects", List.of(placement)); - assertEquals(53, PlacementReach.of(new ObjectSize(variant.width(), variant.height(), variant.depth()), procedural)); + assertEquals(53, new PlacementReach(resources, ModuleLogs.discarding()).ofPack(declaring(ObjectSettings.class, settings))); } @Test diff --git a/core/src/test/java/art/arcane/iris/engine/object/placement/IrisSurfaceSupportTest.java b/core/src/test/java/art/arcane/iris/engine/object/placement/IrisSurfaceSupportTest.java index b143e07b7..b040fed74 100644 --- a/core/src/test/java/art/arcane/iris/engine/object/placement/IrisSurfaceSupportTest.java +++ b/core/src/test/java/art/arcane/iris/engine/object/placement/IrisSurfaceSupportTest.java @@ -5,9 +5,6 @@ import com.volmit.resource.PackResources; import art.arcane.iris.builtin.prepare.AxisRotationClamp; import art.arcane.iris.builtin.prepare.ObjectRotation; import art.arcane.iris.builtin.prepare.ObjectTranslate; -import art.arcane.iris.engine.object.procedural.formation.ResolvedFormation; -import art.arcane.iris.engine.object.TestSettings; -import art.arcane.iris.modules.objects.formation.Formation; import art.arcane.iris.engine.object.placement.IObjectPlacer; import art.arcane.iris.builtin.objects.ObjectPlacement; import art.arcane.iris.engine.object.placement.IrisSurfaceSupport; @@ -174,15 +171,6 @@ public class IrisSurfaceSupportTest { assertEquals(-4, updated.getFirst().getBlockY()); } - @Test - public void formationDefaultsToWiderBufferThanObjectDefault() { - assertEquals(2, ObjectPlacement.builder().build().surfaceSupportBuffer()); - assertEquals(3, new ResolvedFormation(new Formation(), mock(PackResources.class)).surfaceSupportBuffer()); - - Formation flush = TestSettings.with(new Formation(), "surfaceSupportBuffer", 0); - assertEquals(0, new ResolvedFormation(flush, mock(PackResources.class)).surfaceSupportBuffer()); - } - private static boolean isUnsupported(IObjectPlacer placer, List footprint, int buffer, int minSolidDepth) { return IrisSurfaceSupport.isUnsupported(terrain(placer), 0, 0, NO_TRANSLATE, NO_ROTATION, 0, 0, 0, diff --git a/core/src/test/java/art/arcane/iris/engine/object/procedural/ProceduralObjectsGoldenTest.java b/core/src/test/java/art/arcane/iris/engine/object/procedural/ProceduralObjectsGoldenTest.java deleted file mode 100644 index eaead7326..000000000 --- a/core/src/test/java/art/arcane/iris/engine/object/procedural/ProceduralObjectsGoldenTest.java +++ /dev/null @@ -1,325 +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 . - */ - -package art.arcane.iris.engine.object.procedural; - -import art.arcane.iris.modules.objects.ProceduralObjectSettings; -import art.arcane.iris.modules.objects.PlacementChanges; -import art.arcane.iris.modules.objects.ProceduralPlacement; -import art.arcane.iris.core.loader.IrisData; -import art.arcane.iris.core.loader.ResourceLoader; -import art.arcane.iris.core.modules.IrisPackResources; -import art.arcane.iris.core.modules.PlatformBlockStates; -import art.arcane.iris.modules.objects.EffectiveSettings; -import art.arcane.iris.modules.objects.ObjectBuilder; -import com.volmit.block.BlockTurn; -import com.volmit.object.PlaceableObject; -import com.volmit.resource.PackResources; -import art.arcane.iris.engine.UsableBlockPlatform; -import art.arcane.iris.engine.object.prefab.IrisObject; -import art.arcane.iris.util.common.data.B; - -import com.volmit.geometry.BlockFace; -import com.volmit.block.BlockRegistry; -import com.volmit.block.BlockSpec; -import com.volmit.block.BlockState; -import com.volmit.block.BlockTrait; -import com.volmit.block.PaletteSampler; -import com.volmit.block.PaletteSpec; -import com.volmit.object.BlockEntityData; -import com.volmit.resource.ResourceId; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -import org.junit.After; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URISyntaxException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardCopyOption; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.HexFormat; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.TreeMap; -import java.util.stream.Stream; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.CALLS_REAL_METHODS; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.withSettings; -import static org.mockito.Mockito.when; - -/** - * Every procedural object of the overworld pack (its biomes' and regions' {@code proceduralObjects}, with the pack's - * snippets) bakes the same variants it did before the generators moved onto IrisApi block states: same load keys, - * sizes, blocks in the same order, and the same placement options. - */ -public class ProceduralObjectsGoldenTest { - private static final String FIXTURE = "/procedural-golden"; - private static final String PALETTE_TREE = "/procedural-palette-tree.json"; - /** Digests on a platform whose blocks have no properties and which knows no block by {@code blockOrNull}. */ - private static final Map BLOCK_ONLY = Map.ofEntries( - Map.entry("biomes-carving-frost-shards", "e07f555cae739a71"), - Map.entry("biomes-estranged-baobab-grove", "4f9da6a2c02ed6e9"), - Map.entry("biomes-estranged-birchglass-heath", "3d687b1508b55c9e"), - Map.entry("biomes-estranged-bloomspire-orchard", "c02124a9e0e110d1"), - Map.entry("biomes-estranged-bonsai", "2bbe95ef2341e459"), - Map.entry("biomes-estranged-candlewood-grove", "b1b6e514f45e6e3d"), - Map.entry("biomes-estranged-emberbark-woods", "058932e9d4d5b0d3"), - Map.entry("biomes-estranged-mistveil-swamp", "52e03623ed97b52c"), - Map.entry("biomes-estranged-pallid-necropolis", "5b4dac167760b356"), - Map.entry("biomes-estranged-skyreach-pines", "775a653c26c3f1ce"), - Map.entry("biomes-estranged-slinky-spires", "1601adf817f0c9f8"), - Map.entry("biomes-estranged-snarlwood-thicket", "d85da8751c1dc69a"), - Map.entry("biomes-estranged-spindlewood", "378af33a84e18495"), - Map.entry("biomes-estranged-stiltroot-shallows", "8853f17d5363cac3"), - Map.entry("biomes-estranged-taxodium", "760ac58118bf3980"), - Map.entry("biomes-estranged-weeping-mire", "5bc2338e974ef85e"), - Map.entry("biomes-frozen-fields-hilly-plains", "1807f6e5c34454af"), - Map.entry("biomes-frozen-ice-spikes", "67141d051a475b74"), - Map.entry("biomes-frozen-sea-frozen-parent-river", "2b2dbcf872814df7"), - Map.entry("biomes-magnetics-glass", "0e665e690219026f"), - Map.entry("biomes-magnetics-glass-shard", "c19c04ce047c3b6b"), - Map.entry("biomes-ocean-warm", "d01adb88188d5d6a"), - Map.entry("biomes-temperate-sea-ocean", "f07bf98a3e6f1f62"), - Map.entry("regions-estranged", "54a7a643793f9a2a"), - Map.entry("regions-mushroom", "8798b6e3efde6124")); - /** Digests on {@link GameLikeBlocks}. */ - private static final Map GAME_LIKE = Map.ofEntries( - Map.entry("biomes-carving-frost-shards", "58913e09aad05c20"), - Map.entry("biomes-estranged-baobab-grove", "e6f41310af0acf33"), - Map.entry("biomes-estranged-birchglass-heath", "14d377127568b966"), - Map.entry("biomes-estranged-bloomspire-orchard", "53206cf7604536ea"), - Map.entry("biomes-estranged-bonsai", "e9cdda72bb5677e8"), - Map.entry("biomes-estranged-candlewood-grove", "0b981b474a763176"), - Map.entry("biomes-estranged-emberbark-woods", "c6a910701a769bc2"), - Map.entry("biomes-estranged-mistveil-swamp", "93de774da3bd3b69"), - Map.entry("biomes-estranged-pallid-necropolis", "09b3f2e782bd0cbe"), - Map.entry("biomes-estranged-skyreach-pines", "d10bf77da543ea50"), - Map.entry("biomes-estranged-slinky-spires", "e82890512992f1f4"), - Map.entry("biomes-estranged-snarlwood-thicket", "1dbdd16f1b1d5c69"), - Map.entry("biomes-estranged-spindlewood", "705d29f85b3f6a1c"), - Map.entry("biomes-estranged-stiltroot-shallows", "7b21912e1aeceb7c"), - Map.entry("biomes-estranged-taxodium", "58628d26bc7aa937"), - Map.entry("biomes-estranged-weeping-mire", "33a5865800e722ce"), - Map.entry("biomes-frozen-fields-hilly-plains", "3ac105850fed5c6a"), - Map.entry("biomes-frozen-ice-spikes", "7bd31e676851af69"), - Map.entry("biomes-frozen-sea-frozen-parent-river", "74bbe0fc6a62f1f0"), - Map.entry("biomes-magnetics-glass", "6f865dbdf86c2231"), - Map.entry("biomes-magnetics-glass-shard", "9043905e77b0e2d4"), - Map.entry("biomes-ocean-warm", "d02b2b5c0ea91a8d"), - Map.entry("biomes-temperate-sea-ocean", "a60f0e54f345ae50"), - Map.entry("regions-estranged", "5719b6d81d0b1946"), - Map.entry("regions-mushroom", "03952e52695a0652")); - - @Rule - public TemporaryFolder folder = new TemporaryFolder(); - - @After - public void unbindPlatform() { - UsableBlockPlatform.unbind(); - } - - @Test - public void onABlockOnlyPlatformEveryProceduralObjectOfTheOverworldPackBakesAsBefore() throws Exception { - UsableBlockPlatform.bind(); - assertEquals(new TreeMap<>(BLOCK_ONLY), bakeAll()); - } - - @Test - public void onAGameLikePlatformEveryProceduralObjectOfTheOverworldPackBakesAsBefore() throws Exception { - UsableBlockPlatform.bind(new GameLikeBlocks().registries()); - assertEquals(new TreeMap<>(GAME_LIKE), bakeAll()); - } - - /** - * A tree palette picks through Iris's own palette noise, seeded and positioned as before the port: the digest was - * taken from this build after a probe of the same tree gave one signature on it and on the build before the port. - */ - @Test - public void treePalettesPickWithIrisPaletteNoiseAsBefore() throws Exception { - UsableBlockPlatform.bind(); - IrisData data = mock(IrisData.class, withSettings().stubOnly().defaultAnswer(CALLS_REAL_METHODS)); - doReturn(folder.getRoot()).when(data).getDataFolder(); - doReturn(mock(ResourceLoader.class)).when(data).getBlockLoader(); - doReturn(null).when(data).getEngine(); - IrisPackResources resources = new IrisPackResources(data); - doReturn(resources).when(data).getPackResources(); - String json = Files.readString(Path.of(ProceduralObjectsGoldenTest.class.getResource(PALETTE_TREE).toURI())); - ProceduralObjectSettings settings = new GsonBuilder().registerTypeAdapterFactory(data).create() - .fromJson(json, ProceduralObjectSettings.class); - - assertEquals("b935b5c5c85d5162", bake(settings, data)); - } - - private Map bakeAll() throws Exception { - copyFixtureInto(folder.getRoot().toPath()); - IrisData data = mock(IrisData.class, withSettings().stubOnly().defaultAnswer(CALLS_REAL_METHODS)); - IrisPackResources resources = mock(IrisPackResources.class, withSettings().stubOnly()); - doReturn(folder.getRoot()).when(data).getDataFolder(); - doReturn(resources).when(data).getPackResources(); - doReturn(mock(ResourceLoader.class)).when(data).getBlockLoader(); - doReturn(null).when(data).getEngine(); - IrisPackResources host = new IrisPackResources(data); - when(resources.blocks()).thenReturn(new HashedPalettes(host.blocks())); - when(resources.objects()).thenReturn(host.objects()); - Gson gson = new GsonBuilder().registerTypeAdapterFactory(data).create(); - JsonObject sets = JsonParser.parseString(Files.readString(folder.getRoot().toPath().resolve("sets.json"))).getAsJsonObject(); - - Map actual = new TreeMap<>(); - for (String name : sets.keySet()) { - ProceduralObjectSettings settings = gson.fromJson(sets.get(name), ProceduralObjectSettings.class); - actual.put(name, bake(settings, data)); - } - return actual; - } - - private static String bake(ProceduralObjectSettings settings, IrisData data) throws NoSuchAlgorithmException { - Gson plain = new Gson(); - MessageDigest digest = MessageDigest.getInstance("SHA-256"); - PackResources resources = data.getPackResources(); - ObjectBuilder builder = new ObjectBuilder(resources); - EffectiveSettings options = new EffectiveSettings(); - for (ProceduralPlacement placement : ResolvedProceduralObjects.resolve(settings, resources)) { - update(digest, placement.name() + '|' + placement.chance() + '|' + placement.density() + '|' - + placement.plausible() + '|' + plain.toJson(options.of(placement, PlacementChanges.NONE)) + '\n'); - for (PlaceableObject variant : ((ResolvedProceduralPlacement) placement).bake(builder)) { - IrisObject object = (IrisObject) variant; - update(digest, object.getLoadKey() + ' ' + object.getW() + 'x' + object.getH() + 'x' + object.getD() + ':'); - object.getBlocks().forEach((position, state) -> update(digest, position.getBlockX() + "," + position.getBlockY() - + "," + position.getBlockZ() + "=" + state.key() + ";")); - update(digest, "\n"); - } - } - return HexFormat.of().formatHex(digest.digest(), 0, 8); - } - - private static void update(MessageDigest digest, String text) { - digest.update(text.getBytes(StandardCharsets.UTF_8)); - } - - /** - * Blocks as the host resolves them, and palettes that pick a block from a hash of their seed and the position, so a - * generator asking with another seed or position gives another digest. Iris's real palette noise needs a platform the - * test does not have; it is the host's, unchanged by the port. - */ - private static final class HashedPalettes implements BlockRegistry { - private final BlockRegistry host; - - private HashedPalettes(BlockRegistry host) { - this.host = host; - } - - @Override - public Optional find(String key) { - return host.find(key); - } - - @Override - public BlockState withProperty(BlockState state, String name, String value) { - return host.withProperty(state, name, value); - } - - @Override - public BlockState rotate(BlockState state, BlockTurn turn) { - throw new UnsupportedOperationException(); - } - - @Override - public BlockState merge(BlockState state, BlockState onto) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean matches(BlockState state, BlockState pattern) { - throw new UnsupportedOperationException(); - } - - @Override - public BlockState resolve(BlockSpec spec) { - return stateOf(spec.block()); - } - - @Override - public BlockState oreFor(BlockState rock, BlockState ore) { - return ore; - } - - private static BlockState stateOf(String key) { - return BlockState.parse(PlatformBlockStates.namespaced(B.getState(key).key())); - } - - @Override - public PaletteSampler palette(PaletteSpec spec, long seed) { - List blocks = spec.palette(); - return (x, y, z) -> { - long hash = seed * 31 + Double.hashCode(x) * 961L + Double.hashCode(y) * 29791L + Double.hashCode(z); - return resolve(blocks.get(Math.floorMod(Long.hashCode(hash), blocks.size()))); - }; - } - - @Override - public Optional blockEntity(BlockSpec spec) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean hasTrait(BlockState state, BlockTrait trait) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean inTag(BlockState state, ResourceId tag) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean canAttach(BlockState state, BlockState support, BlockFace face) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean canPlaceOn(BlockState state, BlockState below) { - throw new UnsupportedOperationException(); - } - } - - private static void copyFixtureInto(Path target) throws IOException, URISyntaxException { - Path source = Path.of(ProceduralObjectsGoldenTest.class.getResource(FIXTURE).toURI()); - try (Stream files = Files.walk(source)) { - for (Path file : files.filter(Files::isRegularFile).toList()) { - Path copy = target.resolve(source.relativize(file).toString()); - Files.createDirectories(copy.getParent()); - try (InputStream in = Files.newInputStream(file)) { - Files.copy(in, copy, StandardCopyOption.REPLACE_EXISTING); - } - } - } - } -} diff --git a/core/src/test/java/art/arcane/iris/engine/object/procedural/GameLikeBlocks.java b/core/src/test/java/art/arcane/iris/engine/procedural/GameLikeBlocks.java similarity index 97% rename from core/src/test/java/art/arcane/iris/engine/object/procedural/GameLikeBlocks.java rename to core/src/test/java/art/arcane/iris/engine/procedural/GameLikeBlocks.java index b07895f4f..94db14cd5 100644 --- a/core/src/test/java/art/arcane/iris/engine/object/procedural/GameLikeBlocks.java +++ b/core/src/test/java/art/arcane/iris/engine/procedural/GameLikeBlocks.java @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -package art.arcane.iris.engine.object.procedural; +package art.arcane.iris.engine.procedural; import art.arcane.iris.spi.PlatformBlockState; import art.arcane.iris.spi.PlatformRegistries; @@ -37,14 +37,14 @@ import static org.mockito.Mockito.withSettings; * axis, leaves their distance, persistence and waterlogging, properties are listed by name, and setting a property * gives the state with it. A key naming {@code minecraft:missing_*} is a block the platform lacks. */ -final class GameLikeBlocks { +public final class GameLikeBlocks { private static final String NAMESPACE = "minecraft:"; private static final String MISSING = NAMESPACE + "missing_"; private final Map states = new ConcurrentHashMap<>(); private final PlatformRegistries registries = mock(PlatformRegistries.class, withSettings().stubOnly()); - GameLikeBlocks() { + public GameLikeBlocks() { when(registries.block(anyString())).thenAnswer(invocation -> { PlatformBlockState state = orNull(invocation.getArgument(0)); return state == null ? state("minecraft:air") : state; @@ -54,7 +54,7 @@ final class GameLikeBlocks { when(registries.air()).thenAnswer(invocation -> state("minecraft:air")); } - PlatformRegistries registries() { + public PlatformRegistries registries() { return registries; } diff --git a/core/src/test/java/art/arcane/iris/engine/procedural/ProceduralObjectsGoldenTest.java b/core/src/test/java/art/arcane/iris/engine/procedural/ProceduralObjectsGoldenTest.java new file mode 100644 index 000000000..19fbf79f7 --- /dev/null +++ b/core/src/test/java/art/arcane/iris/engine/procedural/ProceduralObjectsGoldenTest.java @@ -0,0 +1,213 @@ +/* + * 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 . + */ + +package art.arcane.iris.engine.procedural; + +import art.arcane.iris.core.loader.IrisData; +import art.arcane.iris.core.loader.ResourceLoader; +import art.arcane.iris.core.modules.IrisPackResources; +import art.arcane.iris.core.modules.JsonFormsCodecs; +import art.arcane.iris.engine.UsableBlockPlatform; +import art.arcane.iris.engine.procedural.part.ProceduralObject; +import art.arcane.iris.engine.procedural.part.ResolvedProceduralObject; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.volmit.object.ObjectBlock; +import com.volmit.object.PlaceableObject; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.HexFormat; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; +import java.util.stream.Stream; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.CALLS_REAL_METHODS; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.withSettings; + +/** + * Every procedural object of the overworld pack (its {@code procedural/} folder, with the palette snippets it names) + * bakes, and bakes the same variants as when these digests were taken: same names, sizes and blocks. A digest that + * changes means world generation places different objects; retake it only for a change meant to do that. + */ +public class ProceduralObjectsGoldenTest { + private static final String FIXTURE = "/procedural-parts"; + private static final String DEFINITIONS = "procedural"; + private static final Map GAME_LIKE = Map.ofEntries( + Map.entry("coral/ocean/reef-brain", "d761fa1a8dc85b20"), + Map.entry("coral/ocean/reef-branch", "f03b09fb586b648c"), + Map.entry("coral/ocean/reef-fan", "76597dc8f6cf96cf"), + Map.entry("coral/temperate/brain-coral", "7f61fb3597b4f07a"), + Map.entry("coral/temperate/branch-coral", "3f99222e95ce6964"), + Map.entry("crystals/estranged/amethyst-cluster", "469e133d1564a125"), + Map.entry("crystals/estranged/frostspar", "94adf86f507c9775"), + Map.entry("crystals/frozen/glacial-frost-bloom", "269ba23560175716"), + Map.entry("crystals/frozen/glacial-frost-sprigs", "2780c39be46ac225"), + Map.entry("formations/estranged/boulder", "5075e6b19323bdc7"), + Map.entry("formations/estranged/obelisk-spire", "52973501f324428e"), + Map.entry("formations/estranged/ossuary-spire", "56cde4be5e71d537"), + Map.entry("formations/frozen/glacial-arch", "a4eaa2ac66dbe498"), + Map.entry("formations/frozen/glacial-arch-2", "d90b2acd92233407"), + Map.entry("formations/frozen/glacial-cave-arch", "5eb7bbf9548c0e6d"), + Map.entry("formations/frozen/glacial-cave-fissure", "9ff1db3cf9dfe4a0"), + Map.entry("formations/frozen/glacial-cave-hanging-needle", "309896032f06a611"), + Map.entry("formations/frozen/glacial-cave-iceberg", "fa98c8227ede70d8"), + Map.entry("formations/frozen/glacial-cave-needle", "8b54927c81e3035d"), + Map.entry("formations/frozen/glacial-cave-overhang", "f99c488c478d80b3"), + Map.entry("formations/frozen/glacial-cave-shard-fan", "da094b44cec354d5"), + Map.entry("formations/frozen/glacial-cave-spiral", "95dec28606d59bd1"), + Map.entry("formations/frozen/glacial-crooked-spire", "2a65f5c2c165519e"), + Map.entry("formations/frozen/glacial-crooked-spire-2", "29db29d789a47ad8"), + Map.entry("formations/frozen/glacial-drift", "97d5ab9a9cb47a52"), + Map.entry("formations/frozen/glacial-fissure", "d0c032412c25548f"), + Map.entry("formations/frozen/glacial-fissure-2", "33d4d237f96312df"), + Map.entry("formations/frozen/glacial-iceberg", "c9cc7f30aa3cca4b"), + Map.entry("formations/frozen/glacial-iceberg-2", "a7f581cbf879e6c6"), + Map.entry("formations/frozen/glacial-overhang", "1e447dd99fb91822"), + Map.entry("formations/frozen/glacial-overhang-2", "7579d953b706455c"), + Map.entry("formations/frozen/glacial-overhang-3", "a509da1fc4f2e7d4"), + Map.entry("formations/frozen/glacial-shard-fan", "52b40ab0d1ec2e80"), + Map.entry("formations/frozen/glacial-shard-fan-2", "2a12859998fbf6fd"), + Map.entry("formations/frozen/glacial-spiral", "4736b907b62b7dda"), + Map.entry("formations/frozen/glacial-spiral-2", "3b1fdb376a524794"), + Map.entry("formations/frozen/glacial-spiral-3", "6a326b0dcfb0c32f"), + Map.entry("formations/magnetics/glacial-leaning-lance", "e903d16fd0791b7b"), + Map.entry("formations/magnetics/glacial-leaning-lance-2", "f95293be79600c5e"), + Map.entry("formations/magnetics/glacial-needle", "4379c14e96de7c23"), + Map.entry("formations/magnetics/glacial-needle-2", "15be4608b47322c2"), + Map.entry("formations/magnetics/glacial-shard-fan", "2cfd006aefe4606b"), + Map.entry("formations/magnetics/glacial-shard-fan-2", "39b6a3804fa863c2"), + Map.entry("fungi/mushroom/brown-table", "43559217abe6f50e"), + Map.entry("fungi/mushroom/red-cap", "d530e0ee8bf2c45a"), + Map.entry("fungi/mushroom/spindle-toadstool", "f9325da029df1a25"), + Map.entry("ruins/estranged/pallid-marker", "04b45fca766324f3"), + Map.entry("ruins/estranged/ruined-pillar", "0fc9d051ff475eeb"), + Map.entry("ruins/estranged/ruined-wall", "74460a5094fa879c"), + Map.entry("trees/estranged/baobab-giant", "62aa55828a21737c"), + Map.entry("trees/estranged/baobab-young", "fa2b9c1f7d2dfd96"), + Map.entry("trees/estranged/birchglass", "26b6746daa1553e3"), + Map.entry("trees/estranged/birchglass-wide", "bc76c876729c039b"), + Map.entry("trees/estranged/bloomspire", "19ef665ce2a46edb"), + Map.entry("trees/estranged/bonsai-blossom", "77392c7779ec932a"), + Map.entry("trees/estranged/bonsai-green", "59de9a369d465962"), + Map.entry("trees/estranged/candlewood", "1f6a191071d0fc61"), + Map.entry("trees/estranged/emberbark", "6eb2c53921956aaa"), + Map.entry("trees/estranged/emberbark-tall", "5e53fa03b5d335a1"), + Map.entry("trees/estranged/lollipop-pink", "62637edb78f21acb"), + Map.entry("trees/estranged/lollipop-teal", "9231a9a59089ea47"), + Map.entry("trees/estranged/mistveil-spire", "a7def2e1fd04f973"), + Map.entry("trees/estranged/mistveil-young", "5b997ebf801fd7e9"), + Map.entry("trees/estranged/pallid-spindle", "a17288d361507cd9"), + Map.entry("trees/estranged/pallid-willow", "ee12c867430772ce"), + Map.entry("trees/estranged/skyreach-pine", "56eeb832a996f9f5"), + Map.entry("trees/estranged/snarlwood", "82dc7264dc75363d"), + Map.entry("trees/estranged/spindle-golden", "8c59979a5ebeb224"), + Map.entry("trees/estranged/spindle-whorl", "2b91fe5d0c10db6b"), + Map.entry("trees/estranged/stiltroot", "9075cfbd22465aed"), + Map.entry("trees/estranged/taxodium", "f36caedfa443564c"), + Map.entry("trees/estranged/weeping-willow", "e1b3f8aa787a7504") + ); + + private Path pack; + private IrisPackResources resources; + private Gson gson; + + @Before + public void bindGameLikePlatform() throws URISyntaxException { + UsableBlockPlatform.bind(new GameLikeBlocks().registries()); + pack = Path.of(ProceduralObjectsGoldenTest.class.getResource(FIXTURE).toURI()); + IrisData data = mock(IrisData.class, withSettings().stubOnly().defaultAnswer(CALLS_REAL_METHODS)); + doReturn(pack.toFile()).when(data).getDataFolder(); + doReturn(mock(ResourceLoader.class)).when(data).getBlockLoader(); + doReturn(null).when(data).getEngine(); + resources = new IrisPackResources(data); + doReturn(resources).when(data).getPackResources(); + gson = new GsonBuilder().registerTypeAdapterFactory(data).registerTypeAdapterFactory(new JsonFormsCodecs()).create(); + } + + @After + public void unbindPlatform() { + UsableBlockPlatform.unbind(); + } + + @Test + public void everyProceduralObjectOfTheOverworldPackBakesVariantsWithBlocks() throws IOException { + List empty = new ArrayList<>(); + for (String path : definitionPaths()) { + List variants = variantsOf(path).variants(); + if (variants.isEmpty() || variants.stream().anyMatch(variant -> variant.geometry().blocks().isEmpty())) { + empty.add(path); + } + } + assertEquals(List.of(), empty); + } + + @Test + public void everyProceduralObjectOfTheOverworldPackBakesAsWhenTheDigestsWereTaken() throws Exception { + Map actual = new TreeMap<>(); + for (String path : definitionPaths()) { + actual.put(path, digest(variantsOf(path).variants())); + } + assertEquals(new TreeMap<>(GAME_LIKE), actual); + } + + private ProceduralVariants variantsOf(String path) throws IOException { + String json = Files.readString(pack.resolve(DEFINITIONS).resolve(path + ".json")); + return new ResolvedProceduralObject(path, gson.fromJson(json, ProceduralObject.class), resources); + } + + private List definitionPaths() throws IOException { + Path folder = pack.resolve(DEFINITIONS); + try (Stream files = Files.walk(folder)) { + return files.filter(file -> file.toString().endsWith(".json")) + .map(file -> folder.relativize(file).toString().replace('\\', '/')) + .map(file -> file.substring(0, file.length() - ".json".length())) + .sorted() + .toList(); + } + } + + private static String digest(List variants) throws NoSuchAlgorithmException { + MessageDigest digest = MessageDigest.getInstance("SHA-256"); + for (PlaceableObject variant : variants) { + update(digest, variant.name() + ' ' + variant.width() + 'x' + variant.height() + 'x' + variant.depth() + ':'); + for (ObjectBlock block : variant.geometry().blocks()) { + update(digest, block.position().x() + "," + block.position().y() + "," + block.position().z() + "=" + block.state().key() + ";"); + } + update(digest, "\n"); + } + return HexFormat.of().formatHex(digest.digest(), 0, 8); + } + + private static void update(MessageDigest digest, String text) { + digest.update(text.getBytes(StandardCharsets.UTF_8)); + } +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/procedural/fungi/mushroom/brown-table.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/procedural/fungi/mushroom/brown-table.json new file mode 100644 index 000000000..ae49da0a7 --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/procedural/fungi/mushroom/brown-table.json @@ -0,0 +1,103 @@ +{ + "variants": 6, + "seed": 9302, + "materials": [ + { + "role": "stem", + "block": "minecraft:mushroom_stem" + }, + { + "role": "cap", + "block": "minecraft:brown_mushroom_block", + "rules": [ + { + "block": "minecraft:shroomlight", + "face": "DOWN", + "chance": 0.5 + } + ] + } + ], + "parts": [ + { + "role": "stem", + "stem": { + "length": [ + 5.0, + 11.0 + ], + "radius": 1.0, + "section": "SQUARE", + "lean": 4.0, + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "facing": 0, + "wave": 0.4, + "wavePeriods": 1 + }, + "children": [ + { + "role": "cap", + "blob": { + "radius": [ + 7.0, + 10.0 + ], + "height": 1.343, + "depth": 1.0, + "profile": [ + [ + 0.0, + 0.98 + ], + [ + 0.1, + 0.96 + ], + [ + 0.2, + 0.935 + ], + [ + 0.3, + 0.905 + ], + [ + 0.4, + 0.875 + ], + [ + 0.5, + 0.835 + ], + [ + 0.6, + 0.79 + ], + [ + 0.7, + 0.735 + ], + [ + 0.8, + 0.665 + ], + [ + 0.9, + 0.545 + ], + [ + 1.0, + 0.0 + ] + ], + "shell": 1, + "open": true + } + } + ] + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/procedural/fungi/mushroom/red-cap.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/procedural/fungi/mushroom/red-cap.json new file mode 100644 index 000000000..b3e876ecf --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/procedural/fungi/mushroom/red-cap.json @@ -0,0 +1,103 @@ +{ + "variants": 6, + "seed": 9301, + "materials": [ + { + "role": "stem", + "block": "minecraft:mushroom_stem" + }, + { + "role": "cap", + "block": "minecraft:red_mushroom_block", + "rules": [ + { + "block": "minecraft:mushroom_stem", + "face": "DOWN", + "chance": 0.7 + } + ] + } + ], + "parts": [ + { + "role": "stem", + "stem": { + "length": [ + 4.0, + 9.0 + ], + "radius": 1.0, + "section": "SQUARE", + "lean": 6.0, + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "facing": 0, + "wave": 0.4, + "wavePeriods": 1.5 + }, + "children": [ + { + "role": "cap", + "blob": { + "radius": [ + 5.0, + 7.0 + ], + "height": 2.958, + "depth": 1.9495, + "profile": [ + [ + 0.0, + 1.0 + ], + [ + 0.1, + 0.985 + ], + [ + 0.2, + 0.96 + ], + [ + 0.3, + 0.925 + ], + [ + 0.4, + 0.885 + ], + [ + 0.5, + 0.83 + ], + [ + 0.6, + 0.77 + ], + [ + 0.7, + 0.69 + ], + [ + 0.8, + 0.59 + ], + [ + 0.9, + 0.445 + ], + [ + 1.0, + 0.0 + ] + ], + "shell": 2, + "open": true + } + } + ] + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/procedural/fungi/mushroom/spindle-toadstool.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/procedural/fungi/mushroom/spindle-toadstool.json new file mode 100644 index 000000000..55521523d --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/procedural/fungi/mushroom/spindle-toadstool.json @@ -0,0 +1,126 @@ +{ + "variants": 6, + "seed": 9303, + "materials": [ + { + "role": "stem", + "block": "minecraft:mushroom_stem", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.6 + }, + "palette": [ + { + "block": "minecraft:mushroom_stem", + "weight": 5 + }, + { + "block": "minecraft:pale_oak_wood", + "weight": 1 + } + ] + } + }, + { + "role": "cap", + "block": "minecraft:red_mushroom_block", + "rules": [ + { + "block": "minecraft:shroomlight", + "face": "DOWN", + "chance": 0.6 + }, + { + "block": "minecraft:brown_mushroom_block", + "face": "UP", + "chance": 0.25, + "pattern": "PATCHES", + "scale": 2 + } + ] + } + ], + "parts": [ + { + "role": "stem", + "stem": { + "length": [ + 6.0, + 12.0 + ], + "radius": 0.5, + "section": "SQUARE", + "lean": 10.0, + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "facing": 0, + "wave": 0.6, + "wavePeriods": 2 + }, + "children": [ + { + "role": "cap", + "blob": { + "radius": [ + 3.0, + 5.0 + ], + "height": 2.576, + "depth": 1.6161, + "profile": [ + [ + 0.0, + 1.0 + ], + [ + 0.1, + 0.94 + ], + [ + 0.2, + 0.875 + ], + [ + 0.3, + 0.805 + ], + [ + 0.4, + 0.73 + ], + [ + 0.5, + 0.645 + ], + [ + 0.6, + 0.545 + ], + [ + 0.7, + 0.435 + ], + [ + 0.8, + 0.305 + ], + [ + 0.9, + 0.16 + ], + [ + 1.0, + 0.0 + ] + ], + "shell": 2, + "open": true + } + } + ] + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/regions/mushroom.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/regions/mushroom.json index 93e84a1da..c53e77e7f 100644 --- a/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/regions/mushroom.json +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-loot-and-spawn/regions/mushroom.json @@ -2,125 +2,56 @@ "name": "Mushroom", "color": "#F1C3EF", "rarity": 15, - "proceduralObjects": { - "fungi": [ - { - "name": "red-cap", - "chance": 0.05, - "density": 2, - "variants": 6, - "seed": 9301, - "stem": "minecraft:mushroom_stem", - "cap": "minecraft:red_mushroom_block", - "capShape": "DOME", - "stemHeightMin": 4, - "stemHeightMax": 9, - "stemWidth": 2, - "stemCurve": 6, - "stemWaveAmplitude": 0.4, - "stemWavePeriods": 1.5, - "capRadiusMin": 3, - "capRadiusMax": 5, - "capThickness": 2, - "capSquish": 0.7, - "capDroop": 18, - "capOverhang": 2, - "gillBlock": "minecraft:mushroom_stem", - "gillChance": 0.7, - "rotation": { + "objects": [ + { + "place": [ + "procedural/fungi/mushroom/red-cap" + ], + "chance": 0.05, + "density": 2, + "rotation": { + "enabled": true, + "yAxis": { "enabled": true, - "yAxis": { - "enabled": true, - "min": 0, - "max": 360, - "interval": 90 - } - } - }, - { - "name": "brown-table", - "chance": 0.05, - "density": 2, - "variants": 6, - "seed": 9302, - "stem": "minecraft:mushroom_stem", - "cap": "minecraft:brown_mushroom_block", - "capShape": "FLAT_WIDE", - "stemHeightMin": 5, - "stemHeightMax": 11, - "stemWidth": 2, - "stemCurve": 4, - "capRadiusMin": 4, - "capRadiusMax": 7, - "capThickness": 1, - "capSquish": 0.35, - "capDroop": 8, - "capOverhang": 3, - "gillBlock": "minecraft:shroomlight", - "gillChance": 0.5, - "rotation": { - "enabled": true, - "yAxis": { - "enabled": true, - "min": 0, - "max": 360, - "interval": 90 - } - } - }, - { - "name": "spindle-toadstool", - "chance": 0.35, - "density": 3, - "variants": 6, - "seed": 9303, - "stem": "minecraft:mushroom_stem", - "stemPalette": { - "style": { - "style": "SIMPLEX", - "zoom": 0.6 - }, - "palette": [ - { - "block": "minecraft:mushroom_stem", - "weight": 5 - }, - { - "block": "minecraft:pale_oak_wood", - "weight": 1 - } - ] - }, - "cap": "minecraft:red_mushroom_block", - "capShape": "CONICAL", - "stemHeightMin": 6, - "stemHeightMax": 12, - "stemWidth": 1, - "stemCurve": 10, - "stemWaveAmplitude": 0.6, - "stemWavePeriods": 2, - "capRadiusMin": 2, - "capRadiusMax": 4, - "capThickness": 2, - "capSquish": 0.9, - "capDroop": 22, - "capOverhang": 1, - "spotBlock": "minecraft:brown_mushroom_block", - "spotChance": 0.25, - "gillBlock": "minecraft:shroomlight", - "gillChance": 0.6, - "rotation": { - "enabled": true, - "yAxis": { - "enabled": true, - "min": 0, - "max": 360, - "interval": 90 - } + "min": 0, + "max": 360, + "interval": 90 } } - ] - }, + }, + { + "place": [ + "procedural/fungi/mushroom/brown-table" + ], + "chance": 0.05, + "density": 2, + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 90 + } + } + }, + { + "place": [ + "procedural/fungi/mushroom/spindle-toadstool" + ], + "chance": 0.35, + "density": 3, + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 90 + } + } + } + ], "landBiomes": [ "mushroom/forest", "mushroom/crimson-forest", diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-before-the-port/biomes/estranged/bloomspire-orchard.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-the-port/biomes/estranged/bloomspire-orchard.json index 4c0697682..d440caff8 100644 --- a/core/src/test/resources/art/arcane/iris/core/modules/pack-before-the-port/biomes/estranged/bloomspire-orchard.json +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-the-port/biomes/estranged/bloomspire-orchard.json @@ -26,65 +26,24 @@ {"block": "minecraft:stone"} ]} ], - "proceduralObjects": { - "trees": [ - { - "name": "bloomspire", - "chance": 0.6, - "density": 2, - "variants": 6, - "seed": 8501, - "trunk": "minecraft:cherry_wood", - "trunkPalette": { - "style": {"style": "CELLULAR", "zoom": 0.4}, - "zoom": 2, - "palette": [ - {"block": "minecraft:cherry_wood", "weight": 5}, - {"block": "minecraft:oak_wood", "weight": 2} - ] - }, - "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} - ] + "objects": [ + { + "place": [ + "procedural/trees/estranged/bloomspire" + ], + "chance": 0.6, + "density": 2, + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 90 + } } - ] - }, + } + ], "decorators": [ {"chance": 0.45, "palette": [{"block": "minecraft:short_grass"}]}, {"chance": 0.08, "palette": [ diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-before-the-port/procedural/trees/estranged/bloomspire.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-the-port/procedural/trees/estranged/bloomspire.json new file mode 100644 index 000000000..13b43ea2e --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-before-the-port/procedural/trees/estranged/bloomspire.json @@ -0,0 +1,234 @@ +{ + "variants": 6, + "seed": 8501, + "materials": [ + { + "role": "wood", + "block": "minecraft:cherry_wood", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:cherry_wood", + "weight": 5 + }, + { + "block": "minecraft:oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:cherry_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:cherry_leaves", + "weight": 5 + }, + { + "block": "minecraft:flowering_azalea_leaves", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 10.0, + 16.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 0.9992 + ], + [ + 0.125, + 0.9912 + ], + [ + 0.25, + 0.9501 + ], + [ + 0.375, + 0.8587 + ], + [ + 0.5, + 0.8 + ], + [ + 0.625, + 0.8587 + ], + [ + 0.75, + 0.9501 + ], + [ + 0.875, + 0.9912 + ], + [ + 1.0, + 0.9992 + ] + ] + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 3.0, + 4.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -39.8056, + "part": { + "stem": { + "length": 4.9051, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.88, + "falloff": 1, + "blob": { + "radius": [ + 2.0, + 3.2 + ], + "stretchX": 1.2, + "stretchZ": 1.2, + "height": [ + 2.0, + 4.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.88, + "falloff": 1, + "blob": { + "radius": 2, + "stretchX": 1.2, + "stretchZ": 1.2 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 2 + }, + "azimuth": "GOLDEN", + "pitch": 10.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 5.0 + ] + ], + "radius": 0.5, + "droop": 0.2 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.85, + "falloff": 1, + "blob": { + "radius": 2, + "stretchX": 1.2, + "stretchZ": 1.2 + } + } + ] + } + } + } + ] + } + ], + "decorations": [ + { + "at": "GROUND", + "chance": 0.12, + "block": "minecraft:pink_petals", + "radius": 3.5 + }, + { + "at": "SIDE", + "chance": 0.04, + "block": "minecraft:cherry_leaves", + "on": [ + "leaves" + ] + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/biomes/frozen/sea/river.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/biomes/frozen/sea/river.json index 236738d77..588f0314b 100644 --- a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/biomes/frozen/sea/river.json +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/biomes/frozen/sea/river.json @@ -1,5 +1,4 @@ { - "proceduralObjects": "snippet/iris/objects/procedural-objects/frozen/magical-ice-spikes-surface", "name": "Frozen River", "color": "#3DB9F5", "derivative": "minecraft:frozen_river", @@ -34,7 +33,13 @@ } ], "objects": [ - + "snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-crooked-spire", + "snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-shard-fan", + "snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-spiral", + "snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-overhang", + "snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-drift", + "snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-frost-bloom", + "snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-frost-sprigs" ], "seaLayers": [ { diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/crystals/frozen/glacial-frost-bloom.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/crystals/frozen/glacial-frost-bloom.json new file mode 100644 index 000000000..18920ce2c --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/crystals/frozen/glacial-frost-bloom.json @@ -0,0 +1,77 @@ +{ + "variants": 24, + "seed": 5055031, + "materials": [ + { + "role": "shard", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.95, + "to": 1 + }, + "chance": 0.65 + } + ] + }, + { + "role": "base", + "block": "minecraft:blue_ice" + } + ], + "parts": [ + { + "role": "base", + "blob": { + "radius": 1.8, + "roughness": 0.6667 + } + }, + { + "role": "shard", + "cluster": { + "count": [ + 3.0, + 6.0 + ], + "radius": 1.08, + "layout": "GOLDEN", + "tilt": [ + [ + 0, + 10.2 + ], + [ + 1, + 79.9 + ] + ], + "part": { + "stem": { + "length": [ + 3.0, + 6.0 + ], + "radius": 1.1, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.0 + ] + ] + }, + "offset": { + "y": 0.756 + } + } + } + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/crystals/frozen/glacial-frost-sprigs.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/crystals/frozen/glacial-frost-sprigs.json new file mode 100644 index 000000000..473cdf69b --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/crystals/frozen/glacial-frost-sprigs.json @@ -0,0 +1,71 @@ +{ + "variants": 24, + "seed": 5055032, + "materials": [ + { + "role": "shard", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.95, + "to": 1 + }, + "chance": 0.55 + } + ] + }, + { + "role": "base", + "block": "minecraft:blue_ice" + } + ], + "parts": [ + { + "role": "base", + "blob": { + "radius": 1.2, + "roughness": 0.8333 + } + }, + { + "role": "shard", + "cluster": { + "count": [ + 2.0, + 5.0 + ], + "radius": 0.72, + "layout": "RANDOM", + "tilt": [ + 0, + 80.0 + ], + "part": { + "stem": { + "length": [ + 2.0, + 4.0 + ], + "radius": 1.0, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.0 + ] + ] + }, + "offset": { + "y": 0.504 + } + } + } + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-crooked-spire.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-crooked-spire.json new file mode 100644 index 000000000..677fdd06d --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-crooked-spire.json @@ -0,0 +1,77 @@ +{ + "variants": 24, + "seed": 5055021, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8824, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 12.0, + 22.0 + ], + "radius": [ + 5.0, + 7.0 + ], + "taper": [ + [ + 0.0, + 0.8556 + ], + [ + 0.125, + 0.6953 + ], + [ + 0.25, + 0.5672 + ], + [ + 0.375, + 0.4628 + ], + [ + 0.5, + 0.3736 + ], + [ + 0.625, + 0.2912 + ], + [ + 0.75, + 0.2071 + ], + [ + 0.875, + 0.1129 + ], + [ + 1.0, + 0.0833 + ] + ], + "lean": 18.0, + "facing": 72.0, + "roughness": 0.32, + "jitter": 0.09 + } + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-drift.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-drift.json new file mode 100644 index 000000000..a115ed234 --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-drift.json @@ -0,0 +1,31 @@ +{ + "variants": 24, + "seed": 5055041, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice" + } + ], + "parts": [ + { + "role": "rock", + "offset": { + "y": 2.0 + }, + "blob": { + "radius": [ + 2.0, + 4.0 + ], + "height": [ + 2.0, + 2.5 + ], + "stretchZ": 0.95, + "roughness": 0.36 + } + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-overhang-3.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-overhang-3.json new file mode 100644 index 000000000..ecca643fa --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-overhang-3.json @@ -0,0 +1,127 @@ +{ + "variants": 24, + "seed": 5055004, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 23.158, + 30.7438 + ], + "radius": [ + 5.0, + 7.0 + ], + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.36 + ] + ], + "pitch": 89.7997, + "facing": [ + 80.0, + 100.0 + ], + "bend": 178.8149, + "bendCurve": [ + [ + 0, + 0 + ], + [ + 0.0045, + 0.0 + ], + [ + 0.0497, + 0.0112 + ], + [ + 0.0949, + 0.0224 + ], + [ + 0.1403, + 0.0335 + ], + [ + 0.1858, + 0.0445 + ], + [ + 0.2315, + 0.0554 + ], + [ + 0.2775, + 0.0662 + ], + [ + 0.3239, + 0.0768 + ], + [ + 0.3706, + 0.0873 + ], + [ + 0.4178, + 0.0976 + ], + [ + 0.5059, + 0.339 + ], + [ + 0.5926, + 0.4122 + ], + [ + 0.6647, + 0.55 + ], + [ + 0.7311, + 0.7291 + ], + [ + 0.8074, + 0.8661 + ], + [ + 0.9017, + 0.9511 + ], + [ + 1, + 1 + ] + ], + "roughness": 0.1543, + "jitter": 0.056 + } + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-shard-fan.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-shard-fan.json new file mode 100644 index 000000000..1dd8ff5ac --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-shard-fan.json @@ -0,0 +1,87 @@ +{ + "variants": 24, + "seed": 5055023, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.871, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "cluster": { + "count": 3, + "radius": 9.4815, + "layout": "LINE", + "part": { + "stem": { + "length": [ + 6.82, + 20.0 + ], + "radius": 3.2407, + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 42.6397 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.28, + "jitter": 0.08 + } + } + } + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-spiral-3.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-spiral-3.json new file mode 100644 index 000000000..3aa9bece6 --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/procedural/formations/frozen/glacial-spiral-3.json @@ -0,0 +1,55 @@ +{ + "variants": 24, + "seed": 5055003, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 12.0, + 21.0 + ], + "radius": 3, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.52 + ] + ], + "helixRadius": [ + [ + 0, + 5.0 + ], + [ + 1, + 1.4 + ] + ], + "helixTurns": 1.1, + "roughness": 0.108, + "jitter": 0.049 + } + } + ] +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-crooked-spire.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-crooked-spire.json new file mode 100644 index 000000000..b040f50d4 --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-crooked-spire.json @@ -0,0 +1,22 @@ +{ + "place": [ + "procedural/formations/frozen/glacial-crooked-spire" + ], + "chance": 0.09, + "density": 1, + "mode": "CENTER_HEIGHT", + "carvingSupport": "SURFACE_ONLY", + "surfaceSupportBuffer": 1, + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 45 + } + }, + "translate": { + "y": -4 + } +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-drift.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-drift.json new file mode 100644 index 000000000..50a7b47d2 --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-drift.json @@ -0,0 +1,22 @@ +{ + "place": [ + "procedural/formations/frozen/glacial-drift" + ], + "chance": 0.28, + "density": 2, + "mode": "CENTER_HEIGHT", + "carvingSupport": "SURFACE_ONLY", + "surfaceSupportBuffer": 1, + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 45 + } + }, + "translate": { + "y": -1 + } +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-frost-bloom.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-frost-bloom.json new file mode 100644 index 000000000..11f99f79b --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-frost-bloom.json @@ -0,0 +1,21 @@ +{ + "place": [ + "procedural/crystals/frozen/glacial-frost-bloom" + ], + "chance": 0.22, + "density": 2, + "mode": "CENTER_HEIGHT", + "carvingSupport": "SURFACE_ONLY", + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 45 + } + }, + "translate": { + "y": -1 + } +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-frost-sprigs.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-frost-sprigs.json new file mode 100644 index 000000000..7862683b8 --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-frost-sprigs.json @@ -0,0 +1,21 @@ +{ + "place": [ + "procedural/crystals/frozen/glacial-frost-sprigs" + ], + "chance": 0.1, + "density": 2, + "mode": "CENTER_HEIGHT", + "carvingSupport": "SURFACE_ONLY", + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 45 + } + }, + "translate": { + "y": -1 + } +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-overhang.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-overhang.json new file mode 100644 index 000000000..3c76bfb44 --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-overhang.json @@ -0,0 +1,22 @@ +{ + "place": [ + "procedural/formations/frozen/glacial-overhang-3" + ], + "chance": 0.07, + "density": 1, + "mode": "CENTER_HEIGHT", + "carvingSupport": "SURFACE_ONLY", + "surfaceSupportBuffer": 1, + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 45 + } + }, + "translate": { + "y": -4 + } +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-shard-fan.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-shard-fan.json new file mode 100644 index 000000000..c575ccc79 --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-shard-fan.json @@ -0,0 +1,22 @@ +{ + "place": [ + "procedural/formations/frozen/glacial-shard-fan" + ], + "chance": 0.08, + "density": 1, + "mode": "CENTER_HEIGHT", + "carvingSupport": "SURFACE_ONLY", + "surfaceSupportBuffer": 1, + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 45 + } + }, + "translate": { + "y": -4 + } +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-spiral.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-spiral.json new file mode 100644 index 000000000..2f3d26837 --- /dev/null +++ b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/object-placer/procedural/frozen/magical-ice-spikes-surface/glacial-spiral.json @@ -0,0 +1,22 @@ +{ + "place": [ + "procedural/formations/frozen/glacial-spiral-3" + ], + "chance": 0.06, + "density": 1, + "mode": "CENTER_HEIGHT", + "carvingSupport": "SURFACE_ONLY", + "surfaceSupportBuffer": 1, + "rotation": { + "enabled": true, + "yAxis": { + "enabled": true, + "min": 0, + "max": 360, + "interval": 45 + } + }, + "translate": { + "y": -4 + } +} diff --git a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/procedural-objects/frozen/magical-ice-spikes-surface.json b/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/procedural-objects/frozen/magical-ice-spikes-surface.json deleted file mode 100644 index c35350eab..000000000 --- a/core/src/test/resources/art/arcane/iris/core/modules/pack-terrain/snippet/iris/objects/procedural-objects/frozen/magical-ice-spikes-surface.json +++ /dev/null @@ -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 - } - ] -} diff --git a/core/src/test/resources/procedural-parts/procedural/coral/ocean/reef-brain.json b/core/src/test/resources/procedural-parts/procedural/coral/ocean/reef-brain.json new file mode 100644 index 000000000..c6df0e32c --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/coral/ocean/reef-brain.json @@ -0,0 +1,39 @@ +{ + "variants": 5, + "seed": 9412, + "materials": [ + { + "role": "coral", + "block": "minecraft:brain_coral_block", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.35 + }, + "palette": [ + { + "block": "minecraft:brain_coral_block", + "weight": 3 + }, + { + "block": "minecraft:bubble_coral_block", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "offset": { + "y": 3.0 + }, + "blob": { + "radius": 4, + "height": 3.0, + "roughness": 0.332 + } + } + ], + "waterlogged": true +} diff --git a/core/src/test/resources/procedural-parts/procedural/coral/ocean/reef-branch.json b/core/src/test/resources/procedural-parts/procedural/coral/ocean/reef-branch.json new file mode 100644 index 000000000..00503afec --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/coral/ocean/reef-branch.json @@ -0,0 +1,102 @@ +{ + "variants": 8, + "seed": 9411, + "materials": [ + { + "role": "coral", + "block": "minecraft:fire_coral_block", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:fire_coral_block", + "weight": 3 + }, + { + "block": "minecraft:tube_coral_block", + "weight": 2 + }, + { + "block": "minecraft:bubble_coral_block", + "weight": 2 + }, + { + "block": "minecraft:horn_coral_block", + "weight": 2 + }, + { + "block": "minecraft:brain_coral_block", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "stem": { + "length": [ + 2.0, + 4.0 + ], + "sway": 0.5737 + }, + "children": [ + { + "branches": { + "count": 6, + "along": { + "from": 0.85, + "to": 1 + }, + "azimuth": "GOLDEN", + "pitch": 40, + "part": { + "stem": { + "length": 5.0, + "sway": 0.5737 + }, + "children": [ + { + "blob": { + "radius": 1 + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 35, + "pitch": 50, + "part": { + "stem": { + "lengthScale": 0.6, + "sway": 0.5737 + }, + "children": [] + } + } + } + ] + } + } + } + ] + } + ], + "decorations": [ + { + "at": "TOP", + "chance": 0.25, + "block": "minecraft:sea_pickle" + } + ], + "waterlogged": true +} diff --git a/core/src/test/resources/procedural-parts/procedural/coral/ocean/reef-fan.json b/core/src/test/resources/procedural-parts/procedural/coral/ocean/reef-fan.json new file mode 100644 index 000000000..6b15649d2 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/coral/ocean/reef-fan.json @@ -0,0 +1,81 @@ +{ + "variants": 5, + "seed": 9413, + "materials": [ + { + "role": "coral", + "block": "minecraft:horn_coral_block", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:horn_coral_block", + "weight": 3 + }, + { + "block": "minecraft:fire_coral_block", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "offset": { + "y": 1.75 + }, + "blob": { + "radius": 5, + "height": [ + 1.0, + 2.5 + ], + "stretchZ": 0.05, + "profile": [ + [ + 0.0, + 0.0 + ], + [ + 0.125, + 0.3827 + ], + [ + 0.25, + 0.7071 + ], + [ + 0.375, + 0.9239 + ], + [ + 0.5, + 1.0 + ], + [ + 0.625, + 0.9239 + ], + [ + 0.75, + 0.7071 + ], + [ + 0.875, + 0.3827 + ], + [ + 1.0, + 0.0 + ] + ], + "section": "SQUARE" + } + } + ], + "waterlogged": true +} diff --git a/core/src/test/resources/procedural-parts/procedural/coral/temperate/brain-coral.json b/core/src/test/resources/procedural-parts/procedural/coral/temperate/brain-coral.json new file mode 100644 index 000000000..dac48dd85 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/coral/temperate/brain-coral.json @@ -0,0 +1,39 @@ +{ + "variants": 5, + "seed": 9402, + "materials": [ + { + "role": "coral", + "block": "minecraft:brain_coral_block", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.35 + }, + "palette": [ + { + "block": "minecraft:brain_coral_block", + "weight": 3 + }, + { + "block": "minecraft:bubble_coral_block", + "weight": 1 + } + ] + } + } + ], + "parts": [ + { + "offset": { + "y": 2.5 + }, + "blob": { + "radius": 3, + "height": 2.5, + "roughness": 0.332 + } + } + ], + "waterlogged": true +} diff --git a/core/src/test/resources/procedural-parts/procedural/coral/temperate/branch-coral.json b/core/src/test/resources/procedural-parts/procedural/coral/temperate/branch-coral.json new file mode 100644 index 000000000..af779c368 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/coral/temperate/branch-coral.json @@ -0,0 +1,98 @@ +{ + "variants": 6, + "seed": 9401, + "materials": [ + { + "role": "coral", + "block": "minecraft:tube_coral_block", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:tube_coral_block", + "weight": 3 + }, + { + "block": "minecraft:brain_coral_block", + "weight": 2 + }, + { + "block": "minecraft:bubble_coral_block", + "weight": 2 + }, + { + "block": "minecraft:horn_coral_block", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "stem": { + "length": [ + 2.0, + 3.0 + ], + "sway": 0.5 + }, + "children": [ + { + "branches": { + "count": 5, + "along": { + "from": 0.85, + "to": 1 + }, + "azimuth": "GOLDEN", + "pitch": 35, + "part": { + "stem": { + "length": 4.0, + "sway": 0.5 + }, + "children": [ + { + "blob": { + "radius": 1 + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 35, + "pitch": 45, + "part": { + "stem": { + "lengthScale": 0.6, + "sway": 0.5 + }, + "children": [] + } + } + } + ] + } + } + } + ] + } + ], + "decorations": [ + { + "at": "TOP", + "chance": 0.2, + "block": "minecraft:sea_pickle" + } + ], + "waterlogged": true +} diff --git a/core/src/test/resources/procedural-parts/procedural/crystals/estranged/amethyst-cluster.json b/core/src/test/resources/procedural-parts/procedural/crystals/estranged/amethyst-cluster.json new file mode 100644 index 000000000..f3f205f71 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/crystals/estranged/amethyst-cluster.json @@ -0,0 +1,92 @@ +{ + "variants": 6, + "seed": 9201, + "materials": [ + { + "role": "shard", + "block": "minecraft:amethyst_block", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:amethyst_block", + "weight": 5 + }, + { + "block": "minecraft:calcite", + "weight": 2 + } + ] + }, + "rules": [ + { + "block": "minecraft:amethyst_cluster", + "along": { + "from": 0.95, + "to": 1 + }, + "chance": 0.6 + } + ] + }, + { + "role": "base", + "block": "minecraft:budding_amethyst" + } + ], + "parts": [ + { + "role": "base", + "blob": { + "radius": 2.5, + "roughness": 0.6667 + } + }, + { + "role": "shard", + "cluster": { + "count": [ + 5.0, + 9.0 + ], + "radius": 1.5, + "layout": "GOLDEN", + "tilt": [ + [ + 0, + 8.25 + ], + [ + 1, + 63.25 + ] + ], + "part": { + "stem": { + "length": [ + 4.0, + 7.0 + ], + "radius": 1.5, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.2 + ] + ] + }, + "offset": { + "y": 1.05 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/crystals/estranged/frostspar.json b/core/src/test/resources/procedural-parts/procedural/crystals/estranged/frostspar.json new file mode 100644 index 000000000..7443891e6 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/crystals/estranged/frostspar.json @@ -0,0 +1,90 @@ +{ + "variants": 5, + "seed": 9202, + "materials": [ + { + "role": "shard", + "block": "minecraft:quartz_block", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:quartz_block", + "weight": 4 + }, + { + "block": "minecraft:tinted_glass", + "weight": 2 + }, + { + "block": "minecraft:packed_ice", + "weight": 1 + } + ] + }, + "rules": [ + { + "block": "minecraft:glowstone", + "along": { + "from": 0.95, + "to": 1 + }, + "chance": 0.6 + } + ] + }, + { + "role": "base", + "block": "minecraft:calcite" + } + ], + "parts": [ + { + "role": "base", + "blob": { + "radius": 2.0, + "roughness": 0.5 + } + }, + { + "role": "shard", + "cluster": { + "count": [ + 4.0, + 7.0 + ], + "radius": 1.2, + "layout": "RANDOM", + "tilt": [ + 0, + 40.0 + ], + "part": { + "stem": { + "length": [ + 5.0, + 9.0 + ], + "radius": 1.5, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.15 + ] + ] + }, + "offset": { + "y": 0.84 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/crystals/frozen/glacial-frost-bloom.json b/core/src/test/resources/procedural-parts/procedural/crystals/frozen/glacial-frost-bloom.json new file mode 100644 index 000000000..18920ce2c --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/crystals/frozen/glacial-frost-bloom.json @@ -0,0 +1,77 @@ +{ + "variants": 24, + "seed": 5055031, + "materials": [ + { + "role": "shard", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.95, + "to": 1 + }, + "chance": 0.65 + } + ] + }, + { + "role": "base", + "block": "minecraft:blue_ice" + } + ], + "parts": [ + { + "role": "base", + "blob": { + "radius": 1.8, + "roughness": 0.6667 + } + }, + { + "role": "shard", + "cluster": { + "count": [ + 3.0, + 6.0 + ], + "radius": 1.08, + "layout": "GOLDEN", + "tilt": [ + [ + 0, + 10.2 + ], + [ + 1, + 79.9 + ] + ], + "part": { + "stem": { + "length": [ + 3.0, + 6.0 + ], + "radius": 1.1, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.0 + ] + ] + }, + "offset": { + "y": 0.756 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/crystals/frozen/glacial-frost-sprigs.json b/core/src/test/resources/procedural-parts/procedural/crystals/frozen/glacial-frost-sprigs.json new file mode 100644 index 000000000..473cdf69b --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/crystals/frozen/glacial-frost-sprigs.json @@ -0,0 +1,71 @@ +{ + "variants": 24, + "seed": 5055032, + "materials": [ + { + "role": "shard", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.95, + "to": 1 + }, + "chance": 0.55 + } + ] + }, + { + "role": "base", + "block": "minecraft:blue_ice" + } + ], + "parts": [ + { + "role": "base", + "blob": { + "radius": 1.2, + "roughness": 0.8333 + } + }, + { + "role": "shard", + "cluster": { + "count": [ + 2.0, + 5.0 + ], + "radius": 0.72, + "layout": "RANDOM", + "tilt": [ + 0, + 80.0 + ], + "part": { + "stem": { + "length": [ + 2.0, + 4.0 + ], + "radius": 1.0, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.0 + ] + ] + }, + "offset": { + "y": 0.504 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/estranged/boulder.json b/core/src/test/resources/procedural-parts/procedural/formations/estranged/boulder.json new file mode 100644 index 000000000..e82f791d3 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/estranged/boulder.json @@ -0,0 +1,54 @@ +{ + "variants": 6, + "seed": 9003, + "materials": [ + { + "role": "rock", + "block": "minecraft:mossy_cobblestone", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "palette": [ + { + "block": "minecraft:stone", + "weight": 3 + }, + { + "block": "minecraft:mossy_cobblestone", + "weight": 2 + }, + { + "block": "minecraft:andesite", + "weight": 2 + }, + { + "block": "minecraft:cobblestone", + "weight": 1 + } + ] + } + } + ], + "parts": [ + { + "role": "rock", + "offset": { + "y": 2.25 + }, + "blob": { + "radius": [ + 3.0, + 6.0 + ], + "height": [ + 2.0, + 3.0 + ], + "stretchZ": 0.95, + "roughness": 0.3 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/estranged/obelisk-spire.json b/core/src/test/resources/procedural-parts/procedural/formations/estranged/obelisk-spire.json new file mode 100644 index 000000000..5fd12ce63 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/estranged/obelisk-spire.json @@ -0,0 +1,79 @@ +{ + "variants": 4, + "seed": 9001, + "materials": [ + { + "role": "rock", + "block": "minecraft:stone", + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:calcite" + }, + { + "block": "minecraft:tuff" + } + ] + }, + "bands": 2 + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 14.0, + 26.0 + ], + "radius": [ + 3.0, + 5.0 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9678 + ], + [ + 0.25, + 0.8828 + ], + [ + 0.375, + 0.7627 + ], + [ + 0.5, + 0.625 + ], + [ + 0.625, + 0.4873 + ], + [ + 0.75, + 0.3672 + ], + [ + 0.875, + 0.2822 + ], + [ + 1.0, + 0.25 + ] + ], + "roughness": 0.35, + "jitter": 0.3 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/estranged/ossuary-spire.json b/core/src/test/resources/procedural-parts/procedural/formations/estranged/ossuary-spire.json new file mode 100644 index 000000000..bc6e064b9 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/estranged/ossuary-spire.json @@ -0,0 +1,85 @@ +{ + "variants": 7, + "seed": 9411, + "materials": [ + { + "role": "rock", + "block": "minecraft:calcite", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "palette": [ + { + "block": "minecraft:calcite", + "weight": 5 + }, + { + "block": "minecraft:diorite", + "weight": 3 + }, + { + "block": "minecraft:bone_block", + "weight": 1 + } + ] + } + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 8.0, + 19.0 + ], + "radius": [ + 2.0, + 5.0 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9693 + ], + [ + 0.25, + 0.8884 + ], + [ + 0.375, + 0.774 + ], + [ + 0.5, + 0.6429 + ], + [ + 0.625, + 0.5117 + ], + [ + 0.75, + 0.3973 + ], + [ + 0.875, + 0.3164 + ], + [ + 1.0, + 0.2857 + ] + ], + "roughness": 0.65, + "jitter": 0.7 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-arch-2.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-arch-2.json new file mode 100644 index 000000000..69af00e79 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-arch-2.json @@ -0,0 +1,121 @@ +{ + "variants": 24, + "seed": 5055005, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice" + } + ], + "parts": [ + { + "role": "rock", + "offset": { + "y": 2.0 + }, + "stem": { + "length": [ + 22.4818, + 37.1784 + ], + "radius": 2.0, + "pitch": 82.9003, + "azimuth": 0, + "facing": 0, + "bend": 165.8005, + "bendCurve": [ + [ + 0, + 0 + ], + [ + 0.0285, + 0.0 + ], + [ + 0.1567, + 0.1027 + ], + [ + 0.2318, + 0.1494 + ], + [ + 0.2928, + 0.1916 + ], + [ + 0.3449, + 0.2373 + ], + [ + 0.3904, + 0.2906 + ], + [ + 0.431, + 0.3541 + ], + [ + 0.4681, + 0.4279 + ], + [ + 0.5035, + 0.5081 + ], + [ + 0.5391, + 0.5875 + ], + [ + 0.5768, + 0.6594 + ], + [ + 0.6182, + 0.7208 + ], + [ + 0.6649, + 0.7724 + ], + [ + 0.7186, + 0.8169 + ], + [ + 0.7818, + 0.8592 + ], + [ + 0.8612, + 0.9087 + ], + [ + 1, + 1 + ] + ], + "roughness": 0.112, + "sway": 0.96, + "jitter": 0.049 + }, + "children": [ + { + "at": 0, + "blob": { + "radius": 2.9 + } + }, + { + "at": 1, + "blob": { + "radius": 2.9 + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-arch.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-arch.json new file mode 100644 index 000000000..e968b73ef --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-arch.json @@ -0,0 +1,121 @@ +{ + "variants": 16, + "seed": 5055005, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice" + } + ], + "parts": [ + { + "role": "rock", + "offset": { + "y": 2.0 + }, + "stem": { + "length": [ + 19.4504, + 32.4344 + ], + "radius": 2.0, + "pitch": 82.7539, + "azimuth": 0, + "facing": 0, + "bend": 165.5078, + "bendCurve": [ + [ + 0, + 0 + ], + [ + 0.0282, + 0.0 + ], + [ + 0.1557, + 0.1047 + ], + [ + 0.2305, + 0.152 + ], + [ + 0.2914, + 0.1946 + ], + [ + 0.3436, + 0.2404 + ], + [ + 0.3894, + 0.2936 + ], + [ + 0.4302, + 0.3565 + ], + [ + 0.4677, + 0.4292 + ], + [ + 0.5036, + 0.508 + ], + [ + 0.5396, + 0.586 + ], + [ + 0.5776, + 0.6569 + ], + [ + 0.6194, + 0.7178 + ], + [ + 0.6662, + 0.7693 + ], + [ + 0.72, + 0.8141 + ], + [ + 0.7831, + 0.8567 + ], + [ + 0.8621, + 0.9069 + ], + [ + 1, + 1 + ] + ], + "roughness": 0.112, + "sway": 0.8, + "jitter": 0.049 + }, + "children": [ + { + "at": 0, + "blob": { + "radius": 2.9 + } + }, + { + "at": 1, + "blob": { + "radius": 2.9 + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-arch.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-arch.json new file mode 100644 index 000000000..3f1512768 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-arch.json @@ -0,0 +1,121 @@ +{ + "variants": 12, + "seed": 5055105, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice" + } + ], + "parts": [ + { + "role": "rock", + "offset": { + "y": 1.0 + }, + "stem": { + "length": [ + 13.2144, + 23.622 + ], + "radius": 1.0, + "pitch": 84.6633, + "azimuth": 0, + "facing": 0, + "bend": 169.3265, + "bendCurve": [ + [ + 0, + 0 + ], + [ + 0.0312, + 0.0 + ], + [ + 0.1699, + 0.0782 + ], + [ + 0.2485, + 0.1161 + ], + [ + 0.3106, + 0.1525 + ], + [ + 0.362, + 0.1944 + ], + [ + 0.4051, + 0.2476 + ], + [ + 0.4416, + 0.3174 + ], + [ + 0.4735, + 0.4069 + ], + [ + 0.5029, + 0.5106 + ], + [ + 0.5326, + 0.6124 + ], + [ + 0.5652, + 0.6981 + ], + [ + 0.603, + 0.7642 + ], + [ + 0.6476, + 0.8147 + ], + [ + 0.7009, + 0.8551 + ], + [ + 0.7656, + 0.8911 + ], + [ + 0.8491, + 0.9308 + ], + [ + 1, + 1 + ] + ], + "roughness": 0.09, + "sway": 0.384, + "jitter": 0.021 + }, + "children": [ + { + "at": 0, + "blob": { + "radius": 1.27 + } + }, + { + "at": 1, + "blob": { + "radius": 1.27 + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-fissure.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-fissure.json new file mode 100644 index 000000000..15ebd5083 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-fissure.json @@ -0,0 +1,87 @@ +{ + "variants": 12, + "seed": 5055102, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8333, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "cluster": { + "count": 3, + "radius": 4.0, + "layout": "LINE", + "part": { + "stem": { + "length": [ + 4.96, + 16.0 + ], + "radius": 1.0, + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 23.254 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.2, + "jitter": 0.04 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-hanging-needle.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-hanging-needle.json new file mode 100644 index 000000000..7779380cd --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-hanging-needle.json @@ -0,0 +1,75 @@ +{ + "variants": 16, + "seed": 5055123, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8667, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 10.0, + 20.0 + ], + "radius": [ + 1.0, + 2.0 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.875 + ], + [ + 0.25, + 0.75 + ], + [ + 0.375, + 0.625 + ], + [ + 0.5, + 0.5 + ], + [ + 0.625, + 0.375 + ], + [ + 0.75, + 0.25 + ], + [ + 0.875, + 0.125 + ], + [ + 1.0, + 0.0 + ] + ], + "roughness": 0.1, + "jitter": 0.01 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-iceberg.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-iceberg.json new file mode 100644 index 000000000..ad8fcc393 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-iceberg.json @@ -0,0 +1,109 @@ +{ + "variants": 12, + "seed": 5055101, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.7333, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "offset": { + "y": 1.134 + }, + "blob": { + "radius": [ + 2.3, + 4.5 + ], + "stretchZ": 0.9, + "height": [ + 2.1, + 4.2 + ], + "depth": 1.134, + "roughness": 0.135 + } + }, + { + "role": "rock", + "cluster": { + "count": 3, + "radius": 1.55, + "layout": "RANDOM", + "part": { + "stem": { + "length": [ + 3.0, + 10.0 + ], + "radius": [ + 1.0, + 1.74 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 10.8464 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.3, + "jitter": 0.08 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-needle.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-needle.json new file mode 100644 index 000000000..306c855b0 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-needle.json @@ -0,0 +1,75 @@ +{ + "variants": 16, + "seed": 5055121, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8519, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 9.0, + 18.0 + ], + "radius": [ + 1.0, + 2.0 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.875 + ], + [ + 0.25, + 0.75 + ], + [ + 0.375, + 0.625 + ], + [ + 0.5, + 0.5 + ], + [ + 0.625, + 0.375 + ], + [ + 0.75, + 0.25 + ], + [ + 0.875, + 0.125 + ], + [ + 1.0, + 0.0 + ] + ], + "roughness": 0.1, + "jitter": 0.01 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-overhang.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-overhang.json new file mode 100644 index 000000000..4364f7f5c --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-overhang.json @@ -0,0 +1,127 @@ +{ + "variants": 12, + "seed": 5055104, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 14.7591, + 21.5596 + ], + "radius": [ + 1.0, + 2.0 + ], + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.36 + ] + ], + "pitch": 89.8141, + "facing": [ + 80.0, + 100.0 + ], + "bend": 178.8393, + "bendCurve": [ + [ + 0, + 0 + ], + [ + 0.0047, + 0.0 + ], + [ + 0.0516, + 0.0104 + ], + [ + 0.0986, + 0.0208 + ], + [ + 0.1457, + 0.0311 + ], + [ + 0.1929, + 0.0413 + ], + [ + 0.2403, + 0.0515 + ], + [ + 0.288, + 0.0616 + ], + [ + 0.336, + 0.0715 + ], + [ + 0.3843, + 0.0813 + ], + [ + 0.433, + 0.0909 + ], + [ + 0.5204, + 0.326 + ], + [ + 0.6057, + 0.3976 + ], + [ + 0.6757, + 0.5382 + ], + [ + 0.739, + 0.7258 + ], + [ + 0.8124, + 0.8667 + ], + [ + 0.9042, + 0.9517 + ], + [ + 1, + 1 + ] + ], + "roughness": 0.072, + "jitter": 0.021 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-shard-fan.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-shard-fan.json new file mode 100644 index 000000000..0060bf40a --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-shard-fan.json @@ -0,0 +1,87 @@ +{ + "variants": 16, + "seed": 5055122, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.84, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "cluster": { + "count": 3, + "radius": 4.0, + "layout": "LINE", + "part": { + "stem": { + "length": [ + 4.96, + 17.0 + ], + "radius": 1.0, + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 22.3477 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.16, + "jitter": 0.03 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-spiral.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-spiral.json new file mode 100644 index 000000000..33db7d572 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-cave-spiral.json @@ -0,0 +1,55 @@ +{ + "variants": 12, + "seed": 5055103, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 8.0, + 16.0 + ], + "radius": 1.0, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.52 + ] + ], + "helixRadius": [ + [ + 0, + 3.0 + ], + [ + 1, + 0.84 + ] + ], + "helixTurns": 1.3, + "roughness": 0.07, + "jitter": 0.014 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-crooked-spire-2.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-crooked-spire-2.json new file mode 100644 index 000000000..2bdec0228 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-crooked-spire-2.json @@ -0,0 +1,77 @@ +{ + "variants": 32, + "seed": 5055021, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8947, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 14.0, + 24.0 + ], + "radius": [ + 5.0, + 8.0 + ], + "taper": [ + [ + 0.0, + 0.8252 + ], + [ + 0.125, + 0.6714 + ], + [ + 0.25, + 0.5492 + ], + [ + 0.375, + 0.45 + ], + [ + 0.5, + 0.3652 + ], + [ + 0.625, + 0.2864 + ], + [ + 0.75, + 0.2049 + ], + [ + 0.875, + 0.1123 + ], + [ + 1.0, + 0.0769 + ] + ], + "lean": 18.0, + "facing": 72.0, + "roughness": 0.32, + "jitter": 0.09 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-crooked-spire.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-crooked-spire.json new file mode 100644 index 000000000..677fdd06d --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-crooked-spire.json @@ -0,0 +1,77 @@ +{ + "variants": 24, + "seed": 5055021, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8824, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 12.0, + 22.0 + ], + "radius": [ + 5.0, + 7.0 + ], + "taper": [ + [ + 0.0, + 0.8556 + ], + [ + 0.125, + 0.6953 + ], + [ + 0.25, + 0.5672 + ], + [ + 0.375, + 0.4628 + ], + [ + 0.5, + 0.3736 + ], + [ + 0.625, + 0.2912 + ], + [ + 0.75, + 0.2071 + ], + [ + 0.875, + 0.1129 + ], + [ + 1.0, + 0.0833 + ] + ], + "lean": 18.0, + "facing": 72.0, + "roughness": 0.32, + "jitter": 0.09 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-drift.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-drift.json new file mode 100644 index 000000000..a115ed234 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-drift.json @@ -0,0 +1,31 @@ +{ + "variants": 24, + "seed": 5055041, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice" + } + ], + "parts": [ + { + "role": "rock", + "offset": { + "y": 2.0 + }, + "blob": { + "radius": [ + 2.0, + 4.0 + ], + "height": [ + 2.0, + 2.5 + ], + "stretchZ": 0.95, + "roughness": 0.36 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-fissure-2.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-fissure-2.json new file mode 100644 index 000000000..7ed0b46f4 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-fissure-2.json @@ -0,0 +1,87 @@ +{ + "variants": 24, + "seed": 5055002, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8889, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "cluster": { + "count": 3, + "radius": 9.9444, + "layout": "LINE", + "part": { + "stem": { + "length": [ + 8.06, + 23.0 + ], + "radius": 3.4722, + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 38.5591 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.3, + "jitter": 0.08 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-fissure.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-fissure.json new file mode 100644 index 000000000..450ac9a8e --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-fissure.json @@ -0,0 +1,87 @@ +{ + "variants": 16, + "seed": 5055002, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.871, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "cluster": { + "count": 3, + "radius": 9.0185, + "layout": "LINE", + "part": { + "stem": { + "length": [ + 6.82, + 20.0 + ], + "radius": 3.0093, + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 41.0471 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.3, + "jitter": 0.08 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-iceberg-2.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-iceberg-2.json new file mode 100644 index 000000000..49c967d15 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-iceberg-2.json @@ -0,0 +1,109 @@ +{ + "variants": 24, + "seed": 5055001, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8824, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "offset": { + "y": 2.5704 + }, + "blob": { + "radius": [ + 5.75, + 12.0 + ], + "stretchZ": 0.9, + "height": [ + 5.04, + 9.24 + ], + "depth": 2.5704, + "roughness": 0.189 + } + }, + { + "role": "rock", + "cluster": { + "count": 4, + "radius": 4.03, + "layout": "RANDOM", + "part": { + "stem": { + "length": [ + 6.96, + 22.0 + ], + "radius": [ + 1.4, + 4.64 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 12.4298 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.42, + "jitter": 0.14 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-iceberg.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-iceberg.json new file mode 100644 index 000000000..3d5a6d900 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-iceberg.json @@ -0,0 +1,109 @@ +{ + "variants": 16, + "seed": 5055001, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8621, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "offset": { + "y": 2.1924 + }, + "blob": { + "radius": [ + 5.75, + 12.0 + ], + "stretchZ": 0.9, + "height": [ + 4.2, + 7.98 + ], + "depth": 2.1924, + "roughness": 0.189 + } + }, + { + "role": "rock", + "cluster": { + "count": 4, + "radius": 4.03, + "layout": "RANDOM", + "part": { + "stem": { + "length": [ + 5.8, + 19.0 + ], + "radius": [ + 1.4, + 4.64 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 14.5516 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.42, + "jitter": 0.14 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-overhang-2.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-overhang-2.json new file mode 100644 index 000000000..dcc2a5389 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-overhang-2.json @@ -0,0 +1,127 @@ +{ + "variants": 24, + "seed": 5055004, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 27.7662, + 35.3456 + ], + "radius": [ + 5.0, + 8.0 + ], + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.36 + ] + ], + "pitch": 89.7979, + "facing": [ + 80.0, + 100.0 + ], + "bend": 178.8163, + "bendCurve": [ + [ + 0, + 0 + ], + [ + 0.0045, + 0.0 + ], + [ + 0.0494, + 0.0113 + ], + [ + 0.0944, + 0.0226 + ], + [ + 0.1395, + 0.0338 + ], + [ + 0.1847, + 0.0449 + ], + [ + 0.2302, + 0.0559 + ], + [ + 0.276, + 0.0668 + ], + [ + 0.3221, + 0.0775 + ], + [ + 0.3686, + 0.088 + ], + [ + 0.4155, + 0.0984 + ], + [ + 0.5036, + 0.3407 + ], + [ + 0.5903, + 0.4144 + ], + [ + 0.6626, + 0.5524 + ], + [ + 0.7294, + 0.7305 + ], + [ + 0.8062, + 0.8666 + ], + [ + 0.9011, + 0.9513 + ], + [ + 1, + 1 + ] + ], + "roughness": 0.156, + "jitter": 0.056 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-overhang-3.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-overhang-3.json new file mode 100644 index 000000000..ecca643fa --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-overhang-3.json @@ -0,0 +1,127 @@ +{ + "variants": 24, + "seed": 5055004, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 23.158, + 30.7438 + ], + "radius": [ + 5.0, + 7.0 + ], + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.36 + ] + ], + "pitch": 89.7997, + "facing": [ + 80.0, + 100.0 + ], + "bend": 178.8149, + "bendCurve": [ + [ + 0, + 0 + ], + [ + 0.0045, + 0.0 + ], + [ + 0.0497, + 0.0112 + ], + [ + 0.0949, + 0.0224 + ], + [ + 0.1403, + 0.0335 + ], + [ + 0.1858, + 0.0445 + ], + [ + 0.2315, + 0.0554 + ], + [ + 0.2775, + 0.0662 + ], + [ + 0.3239, + 0.0768 + ], + [ + 0.3706, + 0.0873 + ], + [ + 0.4178, + 0.0976 + ], + [ + 0.5059, + 0.339 + ], + [ + 0.5926, + 0.4122 + ], + [ + 0.6647, + 0.55 + ], + [ + 0.7311, + 0.7291 + ], + [ + 0.8074, + 0.8661 + ], + [ + 0.9017, + 0.9511 + ], + [ + 1, + 1 + ] + ], + "roughness": 0.1543, + "jitter": 0.056 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-overhang.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-overhang.json new file mode 100644 index 000000000..e6f53683f --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-overhang.json @@ -0,0 +1,127 @@ +{ + "variants": 16, + "seed": 5055004, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 23.158, + 30.7438 + ], + "radius": [ + 5.0, + 7.0 + ], + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.36 + ] + ], + "pitch": 89.7997, + "facing": [ + 80.0, + 100.0 + ], + "bend": 178.8149, + "bendCurve": [ + [ + 0, + 0 + ], + [ + 0.0045, + 0.0 + ], + [ + 0.0497, + 0.0112 + ], + [ + 0.0949, + 0.0224 + ], + [ + 0.1403, + 0.0335 + ], + [ + 0.1858, + 0.0445 + ], + [ + 0.2315, + 0.0554 + ], + [ + 0.2775, + 0.0662 + ], + [ + 0.3239, + 0.0768 + ], + [ + 0.3706, + 0.0873 + ], + [ + 0.4178, + 0.0976 + ], + [ + 0.5059, + 0.339 + ], + [ + 0.5926, + 0.4122 + ], + [ + 0.6647, + 0.55 + ], + [ + 0.7311, + 0.7291 + ], + [ + 0.8074, + 0.8661 + ], + [ + 0.9017, + 0.9511 + ], + [ + 1, + 1 + ] + ], + "roughness": 0.1543, + "jitter": 0.056 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-shard-fan-2.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-shard-fan-2.json new file mode 100644 index 000000000..08b8c97d3 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-shard-fan-2.json @@ -0,0 +1,87 @@ +{ + "variants": 24, + "seed": 5055023, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.8788, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "cluster": { + "count": 3, + "radius": 9.9444, + "layout": "LINE", + "part": { + "stem": { + "length": [ + 7.44, + 21.0 + ], + "radius": 3.4722, + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 41.7731 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.28, + "jitter": 0.08 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-shard-fan.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-shard-fan.json new file mode 100644 index 000000000..1dd8ff5ac --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-shard-fan.json @@ -0,0 +1,87 @@ +{ + "variants": 24, + "seed": 5055023, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.871, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "cluster": { + "count": 3, + "radius": 9.4815, + "layout": "LINE", + "part": { + "stem": { + "length": [ + 6.82, + 20.0 + ], + "radius": 3.2407, + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 42.6397 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.28, + "jitter": 0.08 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-spiral-2.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-spiral-2.json new file mode 100644 index 000000000..7598f6235 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-spiral-2.json @@ -0,0 +1,55 @@ +{ + "variants": 24, + "seed": 5055003, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 15.0, + 24.0 + ], + "radius": 3, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.52 + ] + ], + "helixRadius": [ + [ + 0, + 6.0 + ], + [ + 1, + 1.68 + ] + ], + "helixTurns": 1.15, + "roughness": 0.108, + "jitter": 0.049 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-spiral-3.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-spiral-3.json new file mode 100644 index 000000000..3aa9bece6 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-spiral-3.json @@ -0,0 +1,55 @@ +{ + "variants": 24, + "seed": 5055003, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 12.0, + 21.0 + ], + "radius": 3, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.52 + ] + ], + "helixRadius": [ + [ + 0, + 5.0 + ], + [ + 1, + 1.4 + ] + ], + "helixTurns": 1.1, + "roughness": 0.108, + "jitter": 0.049 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-spiral.json b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-spiral.json new file mode 100644 index 000000000..88c0d48ac --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/frozen/glacial-spiral.json @@ -0,0 +1,55 @@ +{ + "variants": 16, + "seed": 5055003, + "materials": [ + { + "role": "rock", + "block": "minecraft:packed_ice", + "palette": "snippet/palette/frozen/magical-ice", + "rules": [ + { + "block": "minecraft:blue_ice", + "along": { + "from": 0.97, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 12.0, + 21.0 + ], + "radius": 3, + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.52 + ] + ], + "helixRadius": [ + [ + 0, + 5.0 + ], + [ + 1, + 1.4 + ] + ], + "helixTurns": 1.1, + "roughness": 0.108, + "jitter": 0.049 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-leaning-lance-2.json b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-leaning-lance-2.json new file mode 100644 index 000000000..74e103ef3 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-leaning-lance-2.json @@ -0,0 +1,77 @@ +{ + "variants": 16, + "seed": 5055022, + "materials": [ + { + "role": "rock", + "block": "minecraft:light_blue_stained_glass", + "palette": "snippet/palette/magnetics/magical-glass", + "rules": [ + { + "block": "minecraft:tinted_glass", + "along": { + "from": 0.9459, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 26.0, + 48.0 + ], + "radius": [ + 1.0, + 2.0 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.957 + ], + [ + 0.25, + 0.8438 + ], + [ + 0.375, + 0.6836 + ], + [ + 0.5, + 0.5 + ], + [ + 0.625, + 0.3164 + ], + [ + 0.75, + 0.1562 + ], + [ + 0.875, + 0.043 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": 10.0, + "facing": 72.0, + "roughness": 0.14, + "jitter": 0.02 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-leaning-lance.json b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-leaning-lance.json new file mode 100644 index 000000000..2b165069b --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-leaning-lance.json @@ -0,0 +1,77 @@ +{ + "variants": 24, + "seed": 5055022, + "materials": [ + { + "role": "rock", + "block": "minecraft:light_blue_stained_glass", + "palette": "snippet/palette/magnetics/magical-glass", + "rules": [ + { + "block": "minecraft:tinted_glass", + "along": { + "from": 0.9565, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 32.0, + 60.0 + ], + "radius": [ + 1.0, + 2.0 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.957 + ], + [ + 0.25, + 0.8438 + ], + [ + 0.375, + 0.6836 + ], + [ + 0.5, + 0.5 + ], + [ + 0.625, + 0.3164 + ], + [ + 0.75, + 0.1562 + ], + [ + 0.875, + 0.043 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": 10.0, + "facing": 72.0, + "roughness": 0.14, + "jitter": 0.02 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-needle-2.json b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-needle-2.json new file mode 100644 index 000000000..b232aa114 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-needle-2.json @@ -0,0 +1,75 @@ +{ + "variants": 16, + "seed": 5055021, + "materials": [ + { + "role": "rock", + "block": "minecraft:light_blue_stained_glass", + "palette": "snippet/palette/magnetics/magical-glass", + "rules": [ + { + "block": "minecraft:tinted_glass", + "along": { + "from": 0.9333, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 20.0, + 40.0 + ], + "radius": [ + 1.0, + 2.0 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.875 + ], + [ + 0.25, + 0.75 + ], + [ + 0.375, + 0.625 + ], + [ + 0.5, + 0.5 + ], + [ + 0.625, + 0.375 + ], + [ + 0.75, + 0.25 + ], + [ + 0.875, + 0.125 + ], + [ + 1.0, + 0.0 + ] + ], + "roughness": 0.12, + "jitter": 0.02 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-needle.json b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-needle.json new file mode 100644 index 000000000..dc3b0e3b1 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-needle.json @@ -0,0 +1,75 @@ +{ + "variants": 24, + "seed": 5055021, + "materials": [ + { + "role": "rock", + "block": "minecraft:light_blue_stained_glass", + "palette": "snippet/palette/magnetics/magical-glass", + "rules": [ + { + "block": "minecraft:tinted_glass", + "along": { + "from": 0.9487, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "stem": { + "length": [ + 26.0, + 52.0 + ], + "radius": [ + 1.0, + 2.0 + ], + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.875 + ], + [ + 0.25, + 0.75 + ], + [ + 0.375, + 0.625 + ], + [ + 0.5, + 0.5 + ], + [ + 0.625, + 0.375 + ], + [ + 0.75, + 0.25 + ], + [ + 0.875, + 0.125 + ], + [ + 1.0, + 0.0 + ] + ], + "roughness": 0.12, + "jitter": 0.02 + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-shard-fan-2.json b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-shard-fan-2.json new file mode 100644 index 000000000..fb19657c7 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-shard-fan-2.json @@ -0,0 +1,87 @@ +{ + "variants": 16, + "seed": 5055023, + "materials": [ + { + "role": "rock", + "block": "minecraft:light_blue_stained_glass", + "palette": "snippet/palette/magnetics/magical-glass", + "rules": [ + { + "block": "minecraft:tinted_glass", + "along": { + "from": 0.931, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "cluster": { + "count": 4, + "radius": 7.5, + "layout": "LINE", + "part": { + "stem": { + "length": [ + 12.4, + 38.0 + ], + "radius": 1.0, + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 15.0359 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.18, + "jitter": 0.04 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-shard-fan.json b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-shard-fan.json new file mode 100644 index 000000000..32096b3e8 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/formations/magnetics/glacial-shard-fan.json @@ -0,0 +1,87 @@ +{ + "variants": 24, + "seed": 5055023, + "materials": [ + { + "role": "rock", + "block": "minecraft:light_blue_stained_glass", + "palette": "snippet/palette/magnetics/magical-glass", + "rules": [ + { + "block": "minecraft:tinted_glass", + "along": { + "from": 0.9474, + "to": 1 + } + } + ] + } + ], + "parts": [ + { + "role": "rock", + "cluster": { + "count": 4, + "radius": 7.5, + "layout": "LINE", + "part": { + "stem": { + "length": [ + 16.12, + 50.0 + ], + "radius": 1.0, + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.9083 + ], + [ + 0.25, + 0.8129 + ], + [ + 0.375, + 0.7129 + ], + [ + 0.5, + 0.6071 + ], + [ + 0.625, + 0.4935 + ], + [ + 0.75, + 0.3686 + ], + [ + 0.875, + 0.2238 + ], + [ + 1.0, + 0.0 + ] + ], + "lean": [ + 0, + 11.5023 + ], + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "roughness": 0.18, + "jitter": 0.04 + } + } + } + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/fungi/mushroom/brown-table.json b/core/src/test/resources/procedural-parts/procedural/fungi/mushroom/brown-table.json new file mode 100644 index 000000000..ae49da0a7 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/fungi/mushroom/brown-table.json @@ -0,0 +1,103 @@ +{ + "variants": 6, + "seed": 9302, + "materials": [ + { + "role": "stem", + "block": "minecraft:mushroom_stem" + }, + { + "role": "cap", + "block": "minecraft:brown_mushroom_block", + "rules": [ + { + "block": "minecraft:shroomlight", + "face": "DOWN", + "chance": 0.5 + } + ] + } + ], + "parts": [ + { + "role": "stem", + "stem": { + "length": [ + 5.0, + 11.0 + ], + "radius": 1.0, + "section": "SQUARE", + "lean": 4.0, + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "facing": 0, + "wave": 0.4, + "wavePeriods": 1 + }, + "children": [ + { + "role": "cap", + "blob": { + "radius": [ + 7.0, + 10.0 + ], + "height": 1.343, + "depth": 1.0, + "profile": [ + [ + 0.0, + 0.98 + ], + [ + 0.1, + 0.96 + ], + [ + 0.2, + 0.935 + ], + [ + 0.3, + 0.905 + ], + [ + 0.4, + 0.875 + ], + [ + 0.5, + 0.835 + ], + [ + 0.6, + 0.79 + ], + [ + 0.7, + 0.735 + ], + [ + 0.8, + 0.665 + ], + [ + 0.9, + 0.545 + ], + [ + 1.0, + 0.0 + ] + ], + "shell": 1, + "open": true + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/fungi/mushroom/red-cap.json b/core/src/test/resources/procedural-parts/procedural/fungi/mushroom/red-cap.json new file mode 100644 index 000000000..b3e876ecf --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/fungi/mushroom/red-cap.json @@ -0,0 +1,103 @@ +{ + "variants": 6, + "seed": 9301, + "materials": [ + { + "role": "stem", + "block": "minecraft:mushroom_stem" + }, + { + "role": "cap", + "block": "minecraft:red_mushroom_block", + "rules": [ + { + "block": "minecraft:mushroom_stem", + "face": "DOWN", + "chance": 0.7 + } + ] + } + ], + "parts": [ + { + "role": "stem", + "stem": { + "length": [ + 4.0, + 9.0 + ], + "radius": 1.0, + "section": "SQUARE", + "lean": 6.0, + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "facing": 0, + "wave": 0.4, + "wavePeriods": 1.5 + }, + "children": [ + { + "role": "cap", + "blob": { + "radius": [ + 5.0, + 7.0 + ], + "height": 2.958, + "depth": 1.9495, + "profile": [ + [ + 0.0, + 1.0 + ], + [ + 0.1, + 0.985 + ], + [ + 0.2, + 0.96 + ], + [ + 0.3, + 0.925 + ], + [ + 0.4, + 0.885 + ], + [ + 0.5, + 0.83 + ], + [ + 0.6, + 0.77 + ], + [ + 0.7, + 0.69 + ], + [ + 0.8, + 0.59 + ], + [ + 0.9, + 0.445 + ], + [ + 1.0, + 0.0 + ] + ], + "shell": 2, + "open": true + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/fungi/mushroom/spindle-toadstool.json b/core/src/test/resources/procedural-parts/procedural/fungi/mushroom/spindle-toadstool.json new file mode 100644 index 000000000..55521523d --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/fungi/mushroom/spindle-toadstool.json @@ -0,0 +1,126 @@ +{ + "variants": 6, + "seed": 9303, + "materials": [ + { + "role": "stem", + "block": "minecraft:mushroom_stem", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.6 + }, + "palette": [ + { + "block": "minecraft:mushroom_stem", + "weight": 5 + }, + { + "block": "minecraft:pale_oak_wood", + "weight": 1 + } + ] + } + }, + { + "role": "cap", + "block": "minecraft:red_mushroom_block", + "rules": [ + { + "block": "minecraft:shroomlight", + "face": "DOWN", + "chance": 0.6 + }, + { + "block": "minecraft:brown_mushroom_block", + "face": "UP", + "chance": 0.25, + "pattern": "PATCHES", + "scale": 2 + } + ] + } + ], + "parts": [ + { + "role": "stem", + "stem": { + "length": [ + 6.0, + 12.0 + ], + "radius": 0.5, + "section": "SQUARE", + "lean": 10.0, + "leanCurve": { + "shape": "power", + "exponent": 2 + }, + "facing": 0, + "wave": 0.6, + "wavePeriods": 2 + }, + "children": [ + { + "role": "cap", + "blob": { + "radius": [ + 3.0, + 5.0 + ], + "height": 2.576, + "depth": 1.6161, + "profile": [ + [ + 0.0, + 1.0 + ], + [ + 0.1, + 0.94 + ], + [ + 0.2, + 0.875 + ], + [ + 0.3, + 0.805 + ], + [ + 0.4, + 0.73 + ], + [ + 0.5, + 0.645 + ], + [ + 0.6, + 0.545 + ], + [ + 0.7, + 0.435 + ], + [ + 0.8, + 0.305 + ], + [ + 0.9, + 0.16 + ], + [ + 1.0, + 0.0 + ] + ], + "shell": 2, + "open": true + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/ruins/estranged/pallid-marker.json b/core/src/test/resources/procedural-parts/procedural/ruins/estranged/pallid-marker.json new file mode 100644 index 000000000..afd486804 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/ruins/estranged/pallid-marker.json @@ -0,0 +1,121 @@ +{ + "variants": 8, + "seed": 9421, + "materials": [ + { + "role": "stone", + "block": "minecraft:calcite", + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:calcite", + "weight": 5 + }, + { + "block": "minecraft:polished_diorite", + "weight": 2 + }, + { + "block": "minecraft:bone_block", + "weight": 1 + } + ] + }, + "rules": [ + { + "block": "minecraft:air", + "chance": 0.5, + "along": { + "from": 0.88, + "to": 1 + } + }, + { + "block": "minecraft:air", + "chance": 0.32, + "height": { + "from": 0.5, + "to": 1 + } + }, + { + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:tuff", + "weight": 2 + }, + { + "block": "minecraft:pale_moss_block", + "weight": 1 + } + ] + }, + "chance": [ + [ + 0, + 0.35 + ], + [ + 1, + 0.14 + ] + ], + "pattern": "PATCHES", + "scale": 5.0 + } + ] + } + ], + "parts": [ + { + "stem": { + "length": [ + 2.0, + 5.0 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "at": 0, + "branches": { + "count": [ + 0, + 1.4 + ], + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "WHORL", + "whorl": 4, + "azimuthOffset": [ + 0, + 360 + ], + "pitch": 0, + "part": { + "stem": { + "length": [ + 2, + 3 + ], + "radius": 0.5, + "section": "SQUARE" + } + } + } + } + ] + } + ], + "sink": 0.24 +} diff --git a/core/src/test/resources/procedural-parts/procedural/ruins/estranged/ruined-pillar.json b/core/src/test/resources/procedural-parts/procedural/ruins/estranged/ruined-pillar.json new file mode 100644 index 000000000..e162fe046 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/ruins/estranged/ruined-pillar.json @@ -0,0 +1,126 @@ +{ + "variants": 5, + "seed": 9101, + "materials": [ + { + "role": "stone", + "block": "minecraft:stone_bricks", + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:stone_bricks", + "weight": 4 + }, + { + "block": "minecraft:cracked_stone_bricks", + "weight": 2 + }, + { + "block": "minecraft:cobblestone", + "weight": 1 + } + ] + }, + "rules": [ + { + "block": "minecraft:air", + "chance": 0.5, + "along": { + "from": 0.88, + "to": 1 + } + }, + { + "block": "minecraft:air", + "chance": 0.3, + "height": { + "from": 0.2, + "to": 1 + } + }, + { + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:mossy_stone_bricks" + }, + { + "block": "minecraft:mossy_cobblestone" + } + ] + }, + "chance": [ + [ + 0, + 0.4 + ], + [ + 1, + 0.16 + ] + ], + "pattern": "PATCHES", + "scale": 4.0 + } + ] + } + ], + "parts": [ + { + "stem": { + "length": [ + 4.0, + 11.0 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "at": 0, + "branches": { + "count": [ + 0, + 1.4 + ], + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "WHORL", + "whorl": 4, + "azimuthOffset": [ + 0, + 360 + ], + "pitch": 0, + "part": { + "stem": { + "length": [ + 2, + 3 + ], + "radius": 0.5, + "section": "SQUARE" + } + } + } + } + ] + } + ], + "decorations": [ + { + "at": "TOP", + "chance": 0.3, + "block": "minecraft:vine" + } + ], + "sink": 0.2 +} diff --git a/core/src/test/resources/procedural-parts/procedural/ruins/estranged/ruined-wall.json b/core/src/test/resources/procedural-parts/procedural/ruins/estranged/ruined-wall.json new file mode 100644 index 000000000..5cdee0a3d --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/ruins/estranged/ruined-wall.json @@ -0,0 +1,94 @@ +{ + "variants": 5, + "seed": 9102, + "materials": [ + { + "role": "stone", + "block": "minecraft:cobblestone", + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:cobblestone", + "weight": 4 + }, + { + "block": "minecraft:stone_bricks", + "weight": 2 + }, + { + "block": "minecraft:mossy_cobblestone", + "weight": 2 + } + ] + }, + "rules": [ + { + "block": "minecraft:air", + "chance": 0.4, + "height": { + "from": 0.3333, + "to": 1 + } + }, + { + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:mossy_cobblestone" + }, + { + "block": "minecraft:mossy_stone_bricks" + } + ] + }, + "chance": [ + [ + 0, + 0.5 + ], + [ + 1, + 0.2 + ] + ], + "pattern": "PATCHES", + "scale": 2.0 + } + ] + } + ], + "parts": [ + { + "blob": { + "radius": [ + 1.5, + 3.5 + ], + "stretchZ": 0.05, + "height": [ + 2.0, + 5.0 + ], + "depth": 0, + "profile": [ + [ + 0, + 1 + ], + [ + 1, + 1 + ] + ], + "section": "SQUARE" + } + } + ], + "sink": 0.25 +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/baobab-giant.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/baobab-giant.json new file mode 100644 index 000000000..cb205373b --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/baobab-giant.json @@ -0,0 +1,239 @@ +{ + "variants": 6, + "seed": 7001, + "materials": [ + { + "role": "wood", + "block": "minecraft:acacia_wood", + "palette": { + "style": { + "style": "STATIC" + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:acacia_wood", + "weight": 6 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:acacia_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.35 + }, + "zoom": 4, + "palette": [ + { + "block": "minecraft:acacia_leaves", + "weight": 6 + }, + { + "block": "minecraft:oak_leaves", + "weight": 3 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 16.0, + 44.0 + ], + "radius": 2.0, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.3 + ], + [ + 0.125, + 1.1875 + ], + [ + 0.25, + 1.075 + ], + [ + 0.375, + 0.9625 + ], + [ + 0.5, + 0.85 + ], + [ + 0.625, + 0.7375 + ], + [ + 0.75, + 0.625 + ], + [ + 0.875, + 0.5125 + ], + [ + 1.0, + 0.4 + ] + ] + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 4.0, + 9.0 + ], + "radius": 2.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 12, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -42.4092, + "part": { + "stem": { + "length": 9.1551, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.9, + "falloff": 1, + "blob": { + "radius": [ + 8.68, + 24.8 + ], + "height": [ + 5.0, + 13.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.9, + "falloff": 1, + "blob": { + "radius": 3 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 3 + }, + "azimuth": "WHORL", + "pitch": 8.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 4.0 + ], + [ + 1.0, + 9.0 + ] + ], + "radius": 0.5, + "droop": 0.2 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.88, + "falloff": 1, + "blob": { + "radius": 3 + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 60, + "pitch": 20.0, + "depth": 1, + "part": { + "stem": { + "lengthScale": 0.5, + "radius": 0.5, + "droop": 0.2 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.85, + "falloff": 1, + "blob": { + "radius": 2 + } + } + ] + } + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/baobab-young.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/baobab-young.json new file mode 100644 index 000000000..2853a223f --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/baobab-young.json @@ -0,0 +1,194 @@ +{ + "variants": 5, + "seed": 7002, + "materials": [ + { + "role": "wood", + "block": "minecraft:acacia_wood", + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:acacia_wood", + "weight": 5 + }, + { + "block": "minecraft:oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:acacia_leaves" + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 10.0, + 14.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.2 + ], + [ + 0.125, + 1.1125 + ], + [ + 0.25, + 1.025 + ], + [ + 0.375, + 0.9375 + ], + [ + 0.5, + 0.85 + ], + [ + 0.625, + 0.7625 + ], + [ + 0.75, + 0.675 + ], + [ + 0.875, + 0.5875 + ], + [ + 1.0, + 0.5 + ] + ] + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 3.0, + 4.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -37.9371, + "part": { + "stem": { + "length": 5.0664, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.9, + "falloff": 1, + "blob": { + "radius": [ + 5.58, + 8.06 + ], + "height": [ + 3.0, + 5.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.9, + "falloff": 1, + "blob": { + "radius": 3 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 2.5 + }, + "azimuth": "RANDOM", + "pitch": 6.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 6.0 + ] + ], + "radius": 0.5, + "droop": 0.2 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.85, + "falloff": 1, + "blob": { + "radius": 2 + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/birchglass-wide.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/birchglass-wide.json new file mode 100644 index 000000000..171fb108b --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/birchglass-wide.json @@ -0,0 +1,180 @@ +{ + "variants": 6, + "seed": 8102, + "materials": [ + { + "role": "wood", + "block": "minecraft:pale_oak_wood", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.6 + }, + "palette": [ + { + "block": "minecraft:pale_oak_wood", + "weight": 4 + }, + { + "block": "minecraft:birch_wood", + "weight": 3 + }, + { + "block": "minecraft:stripped_birch_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:pale_oak_leaves", + "palette": { + "style": { + "style": "STATIC", + "zoom": 0.25 + }, + "palette": [ + { + "block": "minecraft:pale_oak_leaves", + "weight": 1 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 12.0, + 18.0 + ], + "radius": 0.5, + "section": "SQUARE", + "lean": 9, + "sway": 1.1879 + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 3.0, + 4.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -39.8056, + "part": { + "stem": { + "length": 4.9051, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.55, + "blob": { + "radius": [ + 2.1, + 3.15 + ], + "stretchX": 0.85, + "stretchZ": 1.3, + "height": [ + 3.0, + 4.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.55, + "blob": { + "radius": 3, + "stretchX": 0.85, + "stretchZ": 1.3 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 1.4 + }, + "azimuth": "GOLDEN", + "pitch": 14.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 5.0 + ] + ], + "radius": 0.5, + "droop": 0.3 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.55, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": 2, + "stretchX": 0.85, + "stretchZ": 1.3 + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/birchglass.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/birchglass.json new file mode 100644 index 000000000..62c3daf13 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/birchglass.json @@ -0,0 +1,217 @@ +{ + "variants": 8, + "seed": 8101, + "materials": [ + { + "role": "wood", + "block": "minecraft:birch_wood", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.6 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:birch_wood", + "weight": 4 + }, + { + "block": "minecraft:stripped_birch_wood", + "weight": 3 + }, + { + "block": "minecraft:pale_oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:birch_leaves", + "palette": { + "style": { + "style": "STATIC", + "zoom": 0.25 + }, + "palette": [ + { + "block": "minecraft:pale_oak_leaves", + "weight": 1 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 16.0, + 26.0 + ], + "radius": 0.5, + "section": "SQUARE", + "lean": 7, + "sway": 1.2892 + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 4.0, + 6.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -48.8141, + "part": { + "stem": { + "length": 6.3151, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.62, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": [ + 2.8, + 4.55 + ], + "stretchX": 1.25, + "stretchZ": 0.85, + "height": [ + 3.0, + 5.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.62, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": 3, + "stretchX": 1.25, + "stretchZ": 0.85 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 1.5 + }, + "azimuth": "GOLDEN", + "pitch": 18.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 6.0 + ] + ], + "radius": 0.5, + "droop": 0.25 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.6, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": 2, + "stretchX": 1.25, + "stretchZ": 0.85 + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 80, + "pitch": 30.0, + "depth": 2, + "part": { + "stem": { + "lengthScale": 0.6, + "radius": 0.5, + "droop": 0.3 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.55, + "blob": { + "radius": 2, + "stretchX": 1.25, + "stretchZ": 0.85 + } + } + ] + } + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/bloomspire.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/bloomspire.json new file mode 100644 index 000000000..13b43ea2e --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/bloomspire.json @@ -0,0 +1,234 @@ +{ + "variants": 6, + "seed": 8501, + "materials": [ + { + "role": "wood", + "block": "minecraft:cherry_wood", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:cherry_wood", + "weight": 5 + }, + { + "block": "minecraft:oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:cherry_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:cherry_leaves", + "weight": 5 + }, + { + "block": "minecraft:flowering_azalea_leaves", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 10.0, + 16.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 0.9992 + ], + [ + 0.125, + 0.9912 + ], + [ + 0.25, + 0.9501 + ], + [ + 0.375, + 0.8587 + ], + [ + 0.5, + 0.8 + ], + [ + 0.625, + 0.8587 + ], + [ + 0.75, + 0.9501 + ], + [ + 0.875, + 0.9912 + ], + [ + 1.0, + 0.9992 + ] + ] + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 3.0, + 4.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -39.8056, + "part": { + "stem": { + "length": 4.9051, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.88, + "falloff": 1, + "blob": { + "radius": [ + 2.0, + 3.2 + ], + "stretchX": 1.2, + "stretchZ": 1.2, + "height": [ + 2.0, + 4.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.88, + "falloff": 1, + "blob": { + "radius": 2, + "stretchX": 1.2, + "stretchZ": 1.2 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 2 + }, + "azimuth": "GOLDEN", + "pitch": 10.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 5.0 + ] + ], + "radius": 0.5, + "droop": 0.2 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.85, + "falloff": 1, + "blob": { + "radius": 2, + "stretchX": 1.2, + "stretchZ": 1.2 + } + } + ] + } + } + } + ] + } + ], + "decorations": [ + { + "at": "GROUND", + "chance": 0.12, + "block": "minecraft:pink_petals", + "radius": 3.5 + }, + { + "at": "SIDE", + "chance": 0.04, + "block": "minecraft:cherry_leaves", + "on": [ + "leaves" + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/bonsai-blossom.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/bonsai-blossom.json new file mode 100644 index 000000000..9c057565a --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/bonsai-blossom.json @@ -0,0 +1,258 @@ +{ + "variants": 6, + "seed": 8802, + "materials": [ + { + "role": "wood", + "block": "minecraft:cherry_wood", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.5 + }, + "palette": [ + { + "block": "minecraft:cherry_wood", + "weight": 4 + }, + { + "block": "minecraft:stripped_oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:cherry_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:cherry_leaves", + "weight": 5 + }, + { + "block": "minecraft:flowering_azalea_leaves", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 3.0, + 5.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.0988 + ], + [ + 0.125, + 1.0962 + ], + [ + 0.25, + 1.0893 + ], + [ + 0.375, + 1.0738 + ], + [ + 0.5, + 1.0441 + ], + [ + 0.625, + 0.9964 + ], + [ + 0.75, + 0.9332 + ], + [ + 0.875, + 0.8666 + ], + [ + 1.0, + 0.8162 + ] + ], + "lean": 18, + "leanCurve": { + "shape": "power", + "exponent": 8 + }, + "facing": 0 + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": 3.0, + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -31.9483, + "part": { + "stem": { + "length": 4.7796, + "radius": 0.5 + } + } + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "EVEN", + "pitch": 58.0, + "part": { + "role": "wood", + "stem": { + "length": [ + 4.9048, + 6.0756 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": [ + 2.48, + 3.72 + ], + "stretchX": 1.15, + "stretchZ": 1.15, + "height": [ + 1.0, + 2.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": [ + 4.0, + 6.0 + ], + "stretchX": 1.15, + "stretchZ": 1.15, + "height": 2.0, + "depth": 0.0 + }, + "at": 1.0, + "offset": { + "y": [ + 0.0, + 1.0 + ] + } + }, + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": [ + 4.0, + 6.0 + ], + "stretchX": 1.15, + "stretchZ": 1.15, + "height": 2.0, + "depth": 0.0 + }, + "at": 1.0, + "offset": { + "y": 1.0 + } + }, + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": [ + 2.4, + 3.6 + ], + "stretchX": 1.15, + "stretchZ": 1.15, + "height": [ + 1.0, + 2.0 + ], + "depth": 0.0 + }, + "at": 1.0, + "offset": { + "y": 2.0 + } + } + ] + } + } + } + ] + } + ], + "decorations": [ + { + "at": "GROUND", + "chance": 0.1, + "block": "minecraft:pink_petals", + "radius": 4.0 + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/bonsai-green.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/bonsai-green.json new file mode 100644 index 000000000..b8c164a14 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/bonsai-green.json @@ -0,0 +1,247 @@ +{ + "variants": 8, + "seed": 8801, + "materials": [ + { + "role": "wood", + "block": "minecraft:oak_wood", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.5 + }, + "zoom": 1.5, + "palette": [ + { + "block": "minecraft:oak_wood", + "weight": 4 + }, + { + "block": "minecraft:stripped_oak_wood", + "weight": 3 + }, + { + "block": "minecraft:spruce_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:azalea_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:azalea_leaves", + "weight": 5 + }, + { + "block": "minecraft:oak_leaves", + "weight": 3 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 3.0, + 5.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.0988 + ], + [ + 0.125, + 1.0967 + ], + [ + 0.25, + 1.0914 + ], + [ + 0.375, + 1.0803 + ], + [ + 0.5, + 1.0594 + ], + [ + 0.625, + 1.0252 + ], + [ + 0.75, + 0.9767 + ], + [ + 0.875, + 0.918 + ], + [ + 1.0, + 0.8598 + ] + ], + "lean": 16, + "leanCurve": { + "shape": "power", + "exponent": 8 + }, + "facing": 0 + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": 3.0, + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -31.9483, + "part": { + "stem": { + "length": 4.7796, + "radius": 0.5 + } + } + } + }, + { + "branches": { + "count": 3, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "EVEN", + "pitch": 52.0, + "part": { + "role": "wood", + "stem": { + "length": [ + 5.332, + 7.8538 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": [ + 2.48, + 3.72 + ], + "height": [ + 1.0, + 2.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": [ + 4.0, + 6.0 + ], + "height": 2.0, + "depth": 0.0 + }, + "at": 1.0, + "offset": { + "y": [ + 0.0, + 1.0 + ] + } + }, + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": [ + 4.0, + 6.0 + ], + "height": 2.0, + "depth": 0.0 + }, + "at": 1.0, + "offset": { + "y": 1.0 + } + }, + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": [ + 2.4, + 3.6 + ], + "height": [ + 1.0, + 2.0 + ], + "depth": 0.0 + }, + "at": 1.0, + "offset": { + "y": 2.0 + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/candlewood.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/candlewood.json new file mode 100644 index 000000000..5ac643121 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/candlewood.json @@ -0,0 +1,285 @@ +{ + "variants": 6, + "seed": 8601, + "materials": [ + { + "role": "wood", + "block": "minecraft:acacia_wood", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:acacia_wood", + "weight": 4 + }, + { + "block": "minecraft:oak_wood", + "weight": 3 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:azalea_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:azalea_leaves", + "weight": 5 + }, + { + "block": "minecraft:oak_leaves", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 6.0, + 8.0 + ], + "radius": 1.0, + "section": "SQUARE" + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 3.0, + 4.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -37.9371, + "part": { + "stem": { + "length": 5.0664, + "radius": 0.5 + } + } + } + }, + { + "branches": { + "count": 3, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "EVEN", + "pitch": 68.0, + "part": { + "role": "wood", + "stem": { + "length": [ + 8.7102, + 13.0211 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": [ + 2.1, + 3.5 + ], + "height": [ + 3.0, + 4.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": 3 + }, + "at": 1 + }, + { + "branches": { + "chance": [ + [ + 0.0, + 0.16 + ], + [ + 0.0625, + 0.1914 + ], + [ + 0.125, + 0.2256 + ], + [ + 0.1875, + 0.2627 + ], + [ + 0.25, + 0.3025 + ], + [ + 0.3125, + 0.3452 + ], + [ + 0.375, + 0.3906 + ], + [ + 0.4375, + 0.4389 + ], + [ + 0.5, + 0.49 + ], + [ + 0.5625, + 0.5439 + ], + [ + 0.625, + 0.6006 + ], + [ + 0.6875, + 0.6602 + ], + [ + 0.75, + 0.7225 + ], + [ + 0.8125, + 0.7877 + ], + [ + 0.875, + 0.8556 + ], + [ + 0.9375, + 0.9264 + ], + [ + 1.0, + 1.0 + ] + ], + "azimuth": "GOLDEN", + "pitch": 25.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.8 + ], + [ + 1.0, + 5.0 + ] + ], + "radius": 0.5 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": 2 + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 60, + "pitch": 40.0, + "depth": 2, + "part": { + "stem": { + "lengthScale": 0.6, + "radius": 0.5 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": 1 + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/emberbark-tall.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/emberbark-tall.json new file mode 100644 index 000000000..d938b04d8 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/emberbark-tall.json @@ -0,0 +1,215 @@ +{ + "variants": 6, + "seed": 7302, + "materials": [ + { + "role": "wood", + "block": "minecraft:dark_oak_wood", + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:dark_oak_wood", + "weight": 5 + }, + { + "block": "minecraft:spruce_wood", + "weight": 3 + }, + { + "block": "minecraft:oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:jungle_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:jungle_leaves", + "weight": 6 + }, + { + "block": "minecraft:oak_leaves", + "weight": 3 + }, + { + "block": "minecraft:flowering_azalea_leaves", + "weight": 1 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 15.0, + 19.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.8227 + ], + [ + 0.25, + 0.6672 + ], + [ + 0.375, + 0.5287 + ], + [ + 0.5, + 0.4039 + ], + [ + 0.625, + 0.2902 + ], + [ + 0.75, + 0.1859 + ], + [ + 0.875, + 0.0896 + ], + [ + 1.0, + 0.0 + ] + ] + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": 4.0, + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -43.089, + "part": { + "stem": { + "length": 5.3915, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.82, + "falloff": 1, + "blob": { + "radius": [ + 2.8, + 3.5 + ], + "height": [ + 3.0, + 4.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.82, + "falloff": 1, + "blob": { + "radius": 3 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 1.8 + }, + "azimuth": "RANDOM", + "pitch": 0.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 4.0 + ], + [ + 1.0, + 7.0 + ] + ], + "radius": 0.5, + "droop": 0.25 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.8, + "falloff": 1, + "blob": { + "radius": 3 + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/emberbark.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/emberbark.json new file mode 100644 index 000000000..8f3c88380 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/emberbark.json @@ -0,0 +1,262 @@ +{ + "variants": 8, + "seed": 7301, + "materials": [ + { + "role": "wood", + "block": "minecraft:oak_wood", + "palette": { + "style": { + "style": "STATIC" + }, + "zoom": 1.5, + "palette": [ + { + "block": "minecraft:oak_wood", + "weight": 5 + }, + { + "block": "minecraft:dark_oak_wood", + "weight": 3 + }, + { + "block": "minecraft:spruce_wood", + "weight": 2 + }, + { + "block": "minecraft:mangrove_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:oak_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "zoom": 3.5, + "palette": [ + { + "block": "minecraft:oak_leaves", + "weight": 6 + }, + { + "block": "minecraft:jungle_leaves", + "weight": 3 + }, + { + "block": "minecraft:flowering_azalea_leaves", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 9.0, + 15.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 1.25 + ], + [ + 0.25, + 1.0 + ], + [ + 0.375, + 0.75 + ], + [ + 0.5, + 1.0 + ], + [ + 0.625, + 1.25 + ], + [ + 0.75, + 1.0 + ], + [ + 0.875, + 0.75 + ], + [ + 1.0, + 1.0 + ] + ] + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 3.0, + 4.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -39.8056, + "part": { + "stem": { + "length": 4.9051, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.85, + "falloff": 1, + "blob": { + "radius": [ + 1.5, + 2.8 + ], + "height": [ + 2.0, + 3.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.85, + "falloff": 1, + "blob": { + "radius": 2 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 2 + }, + "azimuth": "RANDOM", + "pitch": 0.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 6.0 + ] + ], + "radius": 0.5, + "droop": 0.3 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.82, + "falloff": 1, + "blob": { + "radius": 2 + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 55, + "pitch": -8.0, + "depth": 2, + "part": { + "stem": { + "lengthScale": 0.5, + "radius": 0.5 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "blob": { + "radius": 1 + } + } + ] + } + } + } + ] + } + } + } + ] + } + ], + "decorations": [ + { + "at": "SIDE", + "chance": 0.12, + "block": "minecraft:vine", + "on": [ + "wood" + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/lollipop-pink.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/lollipop-pink.json new file mode 100644 index 000000000..b53f779c1 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/lollipop-pink.json @@ -0,0 +1,186 @@ +{ + "variants": 6, + "seed": 8701, + "materials": [ + { + "role": "wood", + "block": "minecraft:birch_wood", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.7 + }, + "zoom": 1.5, + "palette": [ + { + "block": "minecraft:birch_wood", + "weight": 5 + }, + { + "block": "minecraft:stripped_birch_wood", + "weight": 3 + }, + { + "block": "minecraft:cherry_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:cherry_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 3, + "palette": [ + { + "block": "minecraft:cherry_leaves", + "weight": 5 + }, + { + "block": "minecraft:flowering_azalea_leaves", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 32.0, + 48.0 + ], + "radius": 1.0, + "section": "SQUARE", + "lean": 26, + "leanCurve": { + "shape": "power", + "exponent": 4 + }, + "facing": 0 + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 7.0, + 10.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -52.7308, + "part": { + "stem": { + "length": 10.4245, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.95, + "falloff": 1, + "blob": { + "radius": [ + 2.4, + 3.2 + ], + "height": [ + 3.0, + 4.0 + ], + "depth": 0.0 + }, + "at": 0.9677 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.95, + "falloff": 1, + "blob": { + "radius": 2 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "bell", + "mid": 0.95, + "width": 0.08 + }, + "azimuth": "GOLDEN", + "pitch": -16.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 5.0 + ], + [ + 1.0, + 6.0 + ] + ], + "radius": 0.5, + "droop": 0.4 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.92, + "falloff": 1, + "blob": { + "radius": 5 + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/lollipop-teal.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/lollipop-teal.json new file mode 100644 index 000000000..379bec33b --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/lollipop-teal.json @@ -0,0 +1,186 @@ +{ + "variants": 6, + "seed": 8702, + "materials": [ + { + "role": "wood", + "block": "minecraft:birch_wood", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.7 + }, + "zoom": 1.5, + "palette": [ + { + "block": "minecraft:stripped_birch_wood", + "weight": 5 + }, + { + "block": "minecraft:birch_wood", + "weight": 3 + }, + { + "block": "minecraft:stripped_oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:azalea_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 3, + "palette": [ + { + "block": "minecraft:azalea_leaves", + "weight": 5 + }, + { + "block": "minecraft:jungle_leaves", + "weight": 3 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 30.0, + 44.0 + ], + "radius": 1.0, + "section": "SQUARE", + "lean": 24, + "leanCurve": { + "shape": "power", + "exponent": 4 + }, + "facing": 0 + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 6.0, + 9.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -51.843, + "part": { + "stem": { + "length": 9.2663, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.95, + "falloff": 1, + "blob": { + "radius": [ + 2.0, + 3.2 + ], + "height": [ + 2.0, + 4.0 + ], + "depth": 0.0 + }, + "at": 0.9655 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.95, + "falloff": 1, + "blob": { + "radius": 2 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "bell", + "mid": 0.95, + "width": 0.08 + }, + "azimuth": "GOLDEN", + "pitch": -14.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 5.0 + ], + [ + 1.0, + 6.0 + ] + ], + "radius": 0.5, + "droop": 0.4 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.92, + "falloff": 1, + "blob": { + "radius": 5 + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/mistveil-spire.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/mistveil-spire.json new file mode 100644 index 000000000..49daab8ed --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/mistveil-spire.json @@ -0,0 +1,190 @@ +{ + "variants": 6, + "seed": 7601, + "materials": [ + { + "role": "wood", + "block": "minecraft:spruce_wood", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:spruce_wood", + "weight": 5 + }, + { + "block": "minecraft:dark_oak_wood", + "weight": 3 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:spruce_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:spruce_leaves", + "weight": 6 + }, + { + "block": "minecraft:dark_oak_leaves", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 20.0, + 30.0 + ], + "radius": 1.0, + "section": "SQUARE" + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 5.0, + 6.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -49.034, + "part": { + "stem": { + "length": 6.9595, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "falloff": 0.5, + "blob": { + "radius": 1.5, + "height": 2.0, + "depth": 0.0 + }, + "at": 0.9474 + }, + { + "role": "leaves", + "mode": "FILL", + "falloff": 0.5, + "blob": { + "radius": 3 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "periodic", + "periods": 6, + "sharpness": 8, + "to": 0.95 + }, + "azimuth": "WHORL", + "pitch": -14.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 7.0 + ] + ], + "radius": 0.5, + "droop": 0.4 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.24, + "blob": { + "radius": 2 + } + } + ] + }, + "whorl": 5 + } + } + ] + } + ], + "decorations": [ + { + "at": "BOTTOM", + "chance": 0.4, + "block": "minecraft:vine", + "on": [ + "leaves" + ], + "length": [ + 1, + 4 + ] + }, + { + "at": "SIDE", + "chance": 0.2, + "block": "minecraft:vine", + "on": [ + "wood" + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/mistveil-young.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/mistveil-young.json new file mode 100644 index 000000000..8a77e52f6 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/mistveil-young.json @@ -0,0 +1,134 @@ +{ + "variants": 5, + "seed": 7602, + "materials": [ + { + "role": "wood", + "block": "minecraft:spruce_wood" + }, + { + "role": "leaves", + "block": "minecraft:spruce_leaves" + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 14.0, + 20.0 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 4.0, + 5.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -47.5638, + "part": { + "stem": { + "length": 5.7424, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.28, + "blob": { + "radius": 1.5, + "height": 2.0, + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.28, + "blob": { + "radius": 2 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "periodic", + "periods": 5, + "sharpness": 8, + "to": 0.9 + }, + "azimuth": "ALTERNATE", + "pitch": -10.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 2.0 + ], + [ + 1.0, + 5.0 + ] + ], + "radius": 0.5, + "droop": 0.35 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.22, + "blob": { + "radius": 1 + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/pallid-spindle.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/pallid-spindle.json new file mode 100644 index 000000000..a9202589d --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/pallid-spindle.json @@ -0,0 +1,361 @@ +{ + "variants": 8, + "seed": 9402, + "materials": [ + { + "role": "wood", + "block": "minecraft:pale_oak_wood", + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:pale_oak_wood", + "weight": 5 + }, + { + "block": "minecraft:bone_block", + "weight": 1 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:pale_oak_leaves" + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 9.0, + 15.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 0.7122 + ], + [ + 0.25, + 1.1622 + ], + [ + 0.375, + 1.1965 + ], + [ + 0.5, + 0.7271 + ], + [ + 0.625, + 0.9573 + ], + [ + 0.75, + 1.2969 + ], + [ + 0.875, + 0.8754 + ], + [ + 1.0, + 0.7733 + ] + ], + "lean": 12, + "leanCurve": { + "shape": "sigmoid", + "steepness": 8 + }, + "sway": 2.0193 + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 4.0, + 5.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -45.7705, + "part": { + "stem": { + "length": 5.8845, + "radius": 0.5 + } + } + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "EVEN", + "pitch": 62.0, + "part": { + "role": "wood", + "stem": { + "length": [ + 6.9311, + 11.4533 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.72, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": [ + 1.5, + 1.6 + ], + "stretchX": 0.65, + "stretchZ": 0.65, + "height": 2.0, + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.72, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": 2, + "stretchX": 0.65, + "stretchZ": 0.65 + }, + "at": 1 + }, + { + "branches": { + "chance": [ + [ + 0.0, + 0.0 + ], + [ + 0.0312, + 0.0 + ], + [ + 0.0625, + 0.0 + ], + [ + 0.0938, + 0.0 + ], + [ + 0.125, + 0.0 + ], + [ + 0.1562, + 0.0 + ], + [ + 0.1875, + 0.0001 + ], + [ + 0.2188, + 0.005 + ], + [ + 0.25, + 0.0513 + ], + [ + 0.2812, + 0.2218 + ], + [ + 0.3125, + 0.5301 + ], + [ + 0.3438, + 0.7889 + ], + [ + 0.375, + 0.7655 + ], + [ + 0.4062, + 0.4827 + ], + [ + 0.4375, + 0.1873 + ], + [ + 0.4688, + 0.0391 + ], + [ + 0.5, + 0.0032 + ], + [ + 0.5312, + 0.0 + ], + [ + 0.5625, + 0.0 + ], + [ + 0.5938, + 0.0 + ], + [ + 0.625, + 0.0 + ], + [ + 0.6562, + 0.0 + ], + [ + 0.6875, + 0.0 + ], + [ + 0.7188, + 0.0 + ], + [ + 0.75, + 0.0 + ], + [ + 0.7812, + 0.0 + ], + [ + 0.8125, + 0.0 + ], + [ + 0.8438, + 0.0 + ], + [ + 0.875, + 0.0 + ], + [ + 0.9062, + 0.0 + ], + [ + 0.9375, + 0.0 + ], + [ + 0.9688, + 0.0 + ], + [ + 1.0, + 0.0 + ] + ], + "azimuth": "WHORL", + "pitch": 12.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 4.2222 + ], + [ + 1.0, + 5.0 + ] + ], + "radius": 0.5, + "droop": 0.12 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.82, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": 2, + "stretchX": 0.65, + "stretchZ": 0.65 + } + } + ] + }, + "whorl": 5 + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/pallid-willow.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/pallid-willow.json new file mode 100644 index 000000000..6918f9715 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/pallid-willow.json @@ -0,0 +1,348 @@ +{ + "variants": 10, + "seed": 9401, + "materials": [ + { + "role": "wood", + "block": "minecraft:pale_oak_wood", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.45 + }, + "palette": [ + { + "block": "minecraft:pale_oak_wood", + "weight": 6 + }, + { + "block": "minecraft:stripped_pale_oak_wood", + "weight": 3 + }, + { + "block": "minecraft:bone_block", + "weight": 1 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:pale_oak_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:pale_oak_leaves" + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 9.0, + 15.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 1.0 + ], + [ + 0.25, + 1.0 + ], + [ + 0.375, + 1.0 + ], + [ + 0.5, + 1.0 + ], + [ + 0.625, + 1.0 + ], + [ + 0.75, + 1.0 + ], + [ + 0.875, + 1.0 + ], + [ + 1.0, + 1.0 + ] + ], + "lean": 18, + "leanCurve": { + "shape": "sigmoid", + "steepness": 8 + }, + "sway": 3.9803 + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 4.0, + 7.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -48.316, + "part": { + "stem": { + "length": 7.0255, + "radius": 0.5 + } + } + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "EVEN", + "pitch": 58.0, + "part": { + "role": "wood", + "stem": { + "length": [ + 11.9566, + 20.2053 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.8, + "falloff": 1, + "blob": { + "radius": [ + 6.0, + 10.2 + ], + "stretchX": 1.25, + "stretchZ": 1.1, + "height": [ + 3.0, + 5.0 + ], + "depth": [ + 2.0, + 3.0 + ] + }, + "at": 0.8894 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.8, + "falloff": 1, + "blob": { + "radius": 3, + "stretchX": 1.25, + "stretchZ": 1.1 + }, + "at": 1 + }, + { + "branches": { + "chance": [ + [ + 0.0, + 0.3202 + ], + [ + 0.0625, + 0.355 + ], + [ + 0.125, + 0.3909 + ], + [ + 0.1875, + 0.4279 + ], + [ + 0.25, + 0.466 + ], + [ + 0.3125, + 0.5052 + ], + [ + 0.375, + 0.5454 + ], + [ + 0.4375, + 0.5867 + ], + [ + 0.5, + 0.6289 + ], + [ + 0.5625, + 0.6721 + ], + [ + 0.625, + 0.7163 + ], + [ + 0.6875, + 0.7613 + ], + [ + 0.75, + 0.8073 + ], + [ + 0.8125, + 0.8542 + ], + [ + 0.875, + 0.9019 + ], + [ + 0.9375, + 0.9505 + ], + [ + 1.0, + 1.0 + ] + ], + "azimuth": "GOLDEN", + "pitch": -20.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 5.8723 + ], + [ + 1.0, + 8.0 + ] + ], + "radius": 0.5, + "droop": 0.55 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.82, + "falloff": 1, + "blob": { + "radius": 3, + "stretchX": 1.25, + "stretchZ": 1.1 + } + }, + { + "branches": { + "count": 1, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 41, + "pitch": -30.0, + "depth": 2, + "part": { + "stem": { + "lengthScale": 0.6, + "radius": 0.5, + "droop": 0.5 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.84, + "falloff": 1, + "blob": { + "radius": 2, + "stretchX": 1.25, + "stretchZ": 1.1 + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/skyreach-pine.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/skyreach-pine.json new file mode 100644 index 000000000..957f5410e --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/skyreach-pine.json @@ -0,0 +1,139 @@ +{ + "variants": 6, + "seed": 8401, + "materials": [ + { + "role": "wood", + "block": "minecraft:spruce_wood", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:spruce_wood", + "weight": 6 + }, + { + "block": "minecraft:dark_oak_wood", + "weight": 1 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:spruce_leaves" + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 22.0, + 34.0 + ], + "radius": 1.0, + "section": "SQUARE" + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 5.0, + 7.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.85, + "falloff": 1, + "blob": { + "radius": 1.5, + "height": 2.0, + "depth": 0.0 + }, + "at": 0.9524 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.85, + "falloff": 1, + "blob": { + "radius": 3 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "periodic", + "periods": 8, + "sharpness": 8, + "to": 0.95 + }, + "azimuth": "WHORL", + "pitch": -6.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 7.0 + ] + ], + "radius": 0.5, + "droop": 0.25 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.8, + "falloff": 1, + "blob": { + "radius": 2 + } + } + ] + }, + "whorl": 5 + } + } + ] + } + ], + "decorations": [ + { + "at": "TOP", + "chance": 0.4, + "block": "minecraft:snow" + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/snarlwood.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/snarlwood.json new file mode 100644 index 000000000..08d02631b --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/snarlwood.json @@ -0,0 +1,259 @@ +{ + "variants": 8, + "seed": 8201, + "materials": [ + { + "role": "wood", + "block": "minecraft:dark_oak_wood", + "palette": { + "style": { + "style": "STATIC" + }, + "palette": [ + { + "block": "minecraft:dark_oak_wood", + "weight": 5 + }, + { + "block": "minecraft:spruce_wood", + "weight": 2 + }, + { + "block": "minecraft:oak_wood", + "weight": 1 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:dark_oak_leaves" + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 8.0, + 13.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.0 + ], + [ + 0.125, + 1.2772 + ], + [ + 0.25, + 0.7879 + ], + [ + 0.375, + 0.8852 + ], + [ + 0.5, + 1.3 + ], + [ + 0.625, + 0.8852 + ], + [ + 0.75, + 0.7879 + ], + [ + 0.875, + 1.2772 + ], + [ + 1.0, + 1.0 + ] + ], + "lean": 22, + "leanCurve": { + "shape": "sigmoid", + "steepness": 8 + }, + "sway": 2.1211 + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": 3.0, + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -33.6901, + "part": { + "stem": { + "length": 4.6056, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "falloff": 0.5, + "blob": { + "radius": [ + 1.5, + 2.1 + ], + "stretchX": 1.4, + "stretchZ": 0.8, + "height": [ + 2.0, + 3.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "falloff": 0.5, + "blob": { + "radius": 2, + "stretchX": 1.4, + "stretchZ": 0.8 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 1.6 + }, + "azimuth": "ALTERNATE", + "pitch": -10.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 5.0 + ] + ], + "radius": 0.5, + "droop": 0.5 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "falloff": 0.5, + "blob": { + "radius": 2, + "stretchX": 1.4, + "stretchZ": 0.8 + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 70, + "pitch": -22.0, + "depth": 2, + "part": { + "stem": { + "lengthScale": 0.6, + "radius": 0.5, + "droop": 0.4 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "falloff": 0.5, + "blob": { + "radius": 1, + "stretchX": 1.4, + "stretchZ": 0.8 + } + } + ] + } + } + } + ] + }, + "azimuthOffset": -90 + } + } + ] + } + ], + "decorations": [ + { + "at": "SIDE", + "chance": 0.3, + "block": "minecraft:vine", + "on": [ + "wood" + ] + }, + { + "at": "BOTTOM", + "chance": 0.4, + "block": "minecraft:vine", + "on": [ + "leaves" + ], + "length": [ + 1, + 4 + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/spindle-golden.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/spindle-golden.json new file mode 100644 index 000000000..e30842845 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/spindle-golden.json @@ -0,0 +1,211 @@ +{ + "variants": 8, + "seed": 7501, + "materials": [ + { + "role": "wood", + "block": "minecraft:birch_wood", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:birch_wood", + "weight": 5 + }, + { + "block": "minecraft:oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:birch_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:birch_leaves", + "weight": 5 + }, + { + "block": "minecraft:azalea_leaves", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 8.0, + 13.0 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": 3.0, + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -33.6901, + "part": { + "stem": { + "length": 4.6056, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.7, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": [ + 2.5, + 4.0 + ], + "height": [ + 3.0, + 4.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.7, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": 2 + }, + "at": 1 + }, + { + "branches": { + "chance": [ + [ + 0, + 0.2 + ], + [ + 1, + 0.9 + ] + ], + "azimuth": "GOLDEN", + "pitch": 15.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 5.0 + ] + ], + "radius": 0.5, + "droop": 0.15 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.75, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": 2 + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 80, + "pitch": 35.0, + "depth": 3, + "part": { + "stem": { + "lengthScale": 0.55, + "radius": 0.5 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.85, + "pattern": "PATCHES", + "scale": 2, + "blob": { + "radius": 1 + } + } + ] + } + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/spindle-whorl.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/spindle-whorl.json new file mode 100644 index 000000000..186dd2deb --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/spindle-whorl.json @@ -0,0 +1,138 @@ +{ + "variants": 6, + "seed": 7502, + "materials": [ + { + "role": "wood", + "block": "minecraft:oak_wood" + }, + { + "role": "leaves", + "block": "minecraft:birch_leaves" + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 11.0, + 16.0 + ], + "radius": 0.5, + "section": "SQUARE" + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 3.0, + 4.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -39.8056, + "part": { + "stem": { + "length": 4.9051, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.78, + "falloff": 1, + "blob": { + "radius": 1.5, + "height": 2.0, + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.78, + "falloff": 1, + "blob": { + "radius": 2 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "periodic", + "periods": 4, + "sharpness": 8, + "to": 0.9 + }, + "azimuth": "WHORL", + "pitch": 8.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 5.0 + ] + ], + "radius": 0.5, + "droop": 0.1 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.78, + "falloff": 1, + "blob": { + "radius": 2 + } + } + ] + }, + "whorl": 5 + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/stiltroot.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/stiltroot.json new file mode 100644 index 000000000..495f24311 --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/stiltroot.json @@ -0,0 +1,188 @@ +{ + "variants": 6, + "seed": 8301, + "materials": [ + { + "role": "wood", + "block": "minecraft:mangrove_wood", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:mangrove_wood", + "weight": 5 + }, + { + "block": "minecraft:oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:mangrove_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "palette": [ + { + "block": "minecraft:mangrove_leaves", + "weight": 5 + }, + { + "block": "minecraft:oak_leaves", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 12.0, + 18.0 + ], + "radius": 1.0, + "section": "SQUARE" + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 3.0, + 4.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0.2857, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -45.0, + "part": { + "stem": { + "length": 9.4853, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.82, + "falloff": 1, + "blob": { + "radius": [ + 4.2, + 6.0 + ], + "height": [ + 3.0, + 5.0 + ], + "depth": 2.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.82, + "falloff": 1, + "blob": { + "radius": 3 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "power", + "exponent": 1.8 + }, + "azimuth": "RANDOM", + "pitch": -14.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 4.0 + ], + [ + 1.0, + 7.0 + ] + ], + "radius": 0.5, + "droop": 0.4 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.8, + "falloff": 1, + "blob": { + "radius": 2 + } + } + ] + } + } + } + ] + } + ], + "decorations": [ + { + "at": "BOTTOM", + "chance": 0.4, + "block": "minecraft:vine", + "on": [ + "leaves" + ], + "length": [ + 1, + 4 + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/taxodium.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/taxodium.json new file mode 100644 index 000000000..0c85ea53c --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/taxodium.json @@ -0,0 +1,265 @@ +{ + "variants": 8, + "seed": 8901, + "materials": [ + { + "role": "wood", + "block": "minecraft:spruce_wood", + "palette": { + "style": { + "style": "SIMPLEX", + "zoom": 0.7 + }, + "zoom": 1.5, + "palette": [ + { + "block": "minecraft:spruce_wood", + "weight": 4 + }, + { + "block": "minecraft:stripped_spruce_wood", + "weight": 3 + }, + { + "block": "minecraft:dark_oak_wood", + "weight": 2 + }, + { + "block": "minecraft:mangrove_wood", + "weight": 2 + }, + { + "block": "minecraft:stripped_oak_wood", + "weight": 2 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:stripped_spruce_wood", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.35 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:stripped_spruce_wood", + "weight": 3 + }, + { + "block": "minecraft:stripped_birch_wood", + "weight": 3 + }, + { + "block": "minecraft:stripped_oak_wood", + "weight": 2 + }, + { + "block": "minecraft:cherry_wood", + "weight": 2 + }, + { + "block": "minecraft:mangrove_wood", + "weight": 2 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 20.0, + 34.0 + ], + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0.0, + 1.1 + ], + [ + 0.125, + 1.0375 + ], + [ + 0.25, + 0.975 + ], + [ + 0.375, + 0.9125 + ], + [ + 0.5, + 0.85 + ], + [ + 0.625, + 0.7875 + ], + [ + 0.75, + 0.725 + ], + [ + 0.875, + 0.6625 + ], + [ + 1.0, + 0.6 + ] + ] + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": 4.0, + "radius": 0.5, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0.2692, + "branches": { + "count": 4, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -66.0375, + "part": { + "stem": { + "length": 10.8489, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.06, + "blob": { + "radius": [ + 3.5, + 5.95 + ], + "height": [ + 4.0, + 6.0 + ], + "depth": 0.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.06, + "blob": { + "radius": 3 + }, + "at": 1 + }, + { + "branches": { + "chance": [ + [ + 0, + 0.5 + ], + [ + 1, + 0.95 + ] + ], + "azimuth": "GOLDEN", + "pitch": 32.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 3.0 + ], + [ + 1.0, + 6.0 + ] + ], + "radius": 0.5 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.08, + "blob": { + "radius": 1 + } + }, + { + "branches": { + "count": 2, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 65, + "pitch": 38.0, + "depth": 4, + "part": { + "stem": { + "lengthScale": 0.62, + "radius": 0.5 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.06, + "blob": { + "radius": 1 + } + } + ] + } + } + } + ] + } + } + } + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/procedural/trees/estranged/weeping-willow.json b/core/src/test/resources/procedural-parts/procedural/trees/estranged/weeping-willow.json new file mode 100644 index 000000000..298a274ec --- /dev/null +++ b/core/src/test/resources/procedural-parts/procedural/trees/estranged/weeping-willow.json @@ -0,0 +1,229 @@ +{ + "variants": 6, + "seed": 7201, + "materials": [ + { + "role": "wood", + "block": "minecraft:mangrove_wood", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.4 + }, + "zoom": 2, + "palette": [ + { + "block": "minecraft:mangrove_wood", + "weight": 5 + }, + { + "block": "minecraft:oak_wood", + "weight": 3 + } + ] + } + }, + { + "role": "leaves", + "block": "minecraft:oak_leaves", + "palette": { + "style": { + "style": "CELLULAR", + "zoom": 0.3 + }, + "zoom": 4, + "palette": [ + { + "block": "minecraft:oak_leaves", + "weight": 5 + }, + { + "block": "minecraft:jungle_leaves", + "weight": 3 + } + ] + } + } + ], + "parts": [ + { + "role": "wood", + "stem": { + "length": [ + 11.0, + 17.0 + ], + "radius": 1.0, + "section": "SQUARE" + }, + "children": [ + { + "role": "wood", + "at": 0, + "stem": { + "pitch": -90, + "length": [ + 3.0, + 4.0 + ], + "radius": 1.0, + "section": "SQUARE", + "taper": [ + [ + 0, + 1 + ], + [ + 1, + 0.4 + ] + ] + } + }, + { + "role": "wood", + "at": 0, + "branches": { + "count": 6, + "along": { + "from": 0, + "to": 0 + }, + "azimuth": "EVEN", + "azimuthOffset": [ + -14, + 14 + ], + "pitch": -37.9371, + "part": { + "stem": { + "length": 5.0664, + "radius": 0.5 + } + } + } + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.82, + "falloff": 1, + "blob": { + "radius": [ + 3.6, + 5.4 + ], + "height": [ + 2.0, + 3.0 + ], + "depth": 2.0 + }, + "at": 1.0 + }, + { + "role": "leaves", + "mode": "FILL", + "density": 0.82, + "falloff": 1, + "blob": { + "radius": 3 + }, + "at": 1 + }, + { + "branches": { + "chance": { + "shape": "bell", + "mid": 0.8, + "width": 0.2 + }, + "azimuth": "RANDOM", + "pitch": -22.0, + "part": { + "role": "wood", + "stem": { + "length": [ + [ + 0.0, + 5.0 + ], + [ + 1.0, + 8.0 + ] + ], + "radius": 0.5, + "droop": 0.6 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.8, + "falloff": 1, + "blob": { + "radius": 2 + } + }, + { + "branches": { + "count": 1, + "along": { + "from": 1, + "to": 1 + }, + "azimuth": "FAN", + "fan": 25, + "pitch": -34.0, + "depth": 2, + "part": { + "stem": { + "lengthScale": 0.7, + "radius": 0.5, + "droop": 0.6 + }, + "children": [ + { + "role": "leaves", + "mode": "FILL", + "density": 0.8, + "falloff": 1, + "blob": { + "radius": 2 + } + } + ] + } + } + } + ] + } + } + } + ] + } + ], + "decorations": [ + { + "at": "BOTTOM", + "chance": 0.5, + "block": "minecraft:vine", + "on": [ + "leaves" + ], + "length": [ + 1, + 5 + ] + }, + { + "at": "SIDE", + "chance": 0.25, + "block": "minecraft:vine", + "on": [ + "wood" + ] + } + ] +} diff --git a/core/src/test/resources/procedural-parts/snippet/palette/frozen/magical-ice.json b/core/src/test/resources/procedural-parts/snippet/palette/frozen/magical-ice.json new file mode 100644 index 000000000..a23a78132 --- /dev/null +++ b/core/src/test/resources/procedural-parts/snippet/palette/frozen/magical-ice.json @@ -0,0 +1,21 @@ +{ + "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 + } + ] +} diff --git a/core/src/test/resources/procedural-parts/snippet/palette/magnetics/magical-glass.json b/core/src/test/resources/procedural-parts/snippet/palette/magnetics/magical-glass.json new file mode 100644 index 000000000..ed49f7f43 --- /dev/null +++ b/core/src/test/resources/procedural-parts/snippet/palette/magnetics/magical-glass.json @@ -0,0 +1,21 @@ +{ + "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 + } + ] +}