From 59f87b861fc5ebbe4572eab25fd1f2023f198647 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Sun, 16 Jul 2023 02:28:04 +0300 Subject: [PATCH 01/10] Update Loom and LVF --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 89a4159..53c20c4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { - id 'fabric-loom' version '1.2-SNAPSHOT' - id 'io.github.juuxel.loom-quiltflower' version '1.10.0' + id 'fabric-loom' version '1.3-SNAPSHOT' + id 'io.github.juuxel.loom-vineflower' version '1.11.0' id 'maven-publish' } From 0b20789a8240c118b47a03269cc153fa4dc93123 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Sun, 16 Jul 2023 02:20:59 +0300 Subject: [PATCH 02/10] Add pine cones --- .../data/WamBlockLootTableProvider.java | 11 +++- .../loot_tables/blocks/pine_leaves.json | 55 ++++++++++++++++++ .../juuxel/woodsandmires/item/WamItems.java | 1 + .../assets/woods_and_mires/lang/en_us.json | 1 + .../assets/woods_and_mires/lang/fi_fi.json | 1 + .../models/item/pine_cone.json | 6 ++ .../textures/item/pine_cone.png | Bin 0 -> 837 bytes .../resources/woods_and_mires.accesswidener | 1 + 8 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/assets/woods_and_mires/models/item/pine_cone.json create mode 100644 src/main/resources/assets/woods_and_mires/textures/item/pine_cone.png diff --git a/src/data/java/juuxel/woodsandmires/data/WamBlockLootTableProvider.java b/src/data/java/juuxel/woodsandmires/data/WamBlockLootTableProvider.java index 437ca9e..9afdbd4 100644 --- a/src/data/java/juuxel/woodsandmires/data/WamBlockLootTableProvider.java +++ b/src/data/java/juuxel/woodsandmires/data/WamBlockLootTableProvider.java @@ -1,6 +1,7 @@ package juuxel.woodsandmires.data; import juuxel.woodsandmires.block.WamBlocks; +import juuxel.woodsandmires.item.WamItems; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider; import net.minecraft.block.TallPlantBlock; @@ -32,7 +33,15 @@ protected void generateBlockLootTables() { addDrop(WamBlocks.PINE_SIGN); addDrop(WamBlocks.PINE_DOOR, BlockLootTableGenerator::addDoorDrop); addDrop(WamBlocks.PINE_TRAPDOOR); - addDrop(WamBlocks.PINE_LEAVES, block -> leavesDrop(block, WamBlocks.PINE_SAPLING, SAPLING_DROP_CHANCE)); + addDrop(WamBlocks.PINE_LEAVES, + block -> leavesDrop(block, WamBlocks.PINE_SAPLING, SAPLING_DROP_CHANCE) + .pool(addSurvivesExplosionCondition(WamItems.PINE_CONE, LootPool.builder() + .conditionally(WITHOUT_SILK_TOUCH_NOR_SHEARS) + .with(ItemEntry.builder(WamItems.PINE_CONE) + .apply(SetCountLootFunction.builder(BinomialLootNumberProvider.create(3, 0.07f))) + ) + )) + ); addDrop(WamBlocks.PINE_SAPLING); addPottedPlantDrop(WamBlocks.POTTED_PINE_SAPLING); addDrop(WamBlocks.PINE_WOOD); diff --git a/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json b/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json index cb47a9b..c7c1659 100644 --- a/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json +++ b/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json @@ -130,6 +130,61 @@ } } ] + }, + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:binomial", + "n": 3.0, + "p": 0.07 + }, + "add": false + } + ], + "name": "woods_and_mires:pine_cone" + } + ], + "conditions": [ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:alternative", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": [ + "minecraft:shears" + ] + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ] + } + }, + { + "condition": "minecraft:survives_explosion" + } + ] } ] } diff --git a/src/main/java/juuxel/woodsandmires/item/WamItems.java b/src/main/java/juuxel/woodsandmires/item/WamItems.java index eb7a2c0..81c9f9e 100644 --- a/src/main/java/juuxel/woodsandmires/item/WamItems.java +++ b/src/main/java/juuxel/woodsandmires/item/WamItems.java @@ -9,6 +9,7 @@ public final class WamItems { public static final Item PINE_BOAT = register("pine_boat", new WamBoatItem(WamBoat.PINE, new Item.Settings().group(ItemGroup.TRANSPORTATION))); + public static final Item PINE_CONE = register("pine_cone", new Item(new Item.Settings().group(ItemGroup.MATERIALS))); public static void init() { for (WamBoat boat : WamBoat.values()) { diff --git a/src/main/resources/assets/woods_and_mires/lang/en_us.json b/src/main/resources/assets/woods_and_mires/lang/en_us.json index ff71631..6dabbda 100644 --- a/src/main/resources/assets/woods_and_mires/lang/en_us.json +++ b/src/main/resources/assets/woods_and_mires/lang/en_us.json @@ -39,6 +39,7 @@ "block.woods_and_mires.tansy": "Tansy", "item.woods_and_mires.pine_boat": "Pine Boat", + "item.woods_and_mires.pine_cone": "Pine Cone", "entity.woods_and_mires.pine_boat": "Pine Boat", diff --git a/src/main/resources/assets/woods_and_mires/lang/fi_fi.json b/src/main/resources/assets/woods_and_mires/lang/fi_fi.json index bd4c709..e703914 100644 --- a/src/main/resources/assets/woods_and_mires/lang/fi_fi.json +++ b/src/main/resources/assets/woods_and_mires/lang/fi_fi.json @@ -39,6 +39,7 @@ "block.woods_and_mires.tansy": "Pietaryrtti", "item.woods_and_mires.pine_boat": "Mäntyvene", + "item.woods_and_mires.pine_cone": "Männynkäpy", "entity.woods_and_mires.pine_boat": "Mäntyvene", diff --git a/src/main/resources/assets/woods_and_mires/models/item/pine_cone.json b/src/main/resources/assets/woods_and_mires/models/item/pine_cone.json new file mode 100644 index 0000000..d63457e --- /dev/null +++ b/src/main/resources/assets/woods_and_mires/models/item/pine_cone.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "woods_and_mires:item/pine_cone" + } +} diff --git a/src/main/resources/assets/woods_and_mires/textures/item/pine_cone.png b/src/main/resources/assets/woods_and_mires/textures/item/pine_cone.png new file mode 100644 index 0000000000000000000000000000000000000000..140f2e6570110064b8a8bffaa3e7d51326b9669c GIT binary patch literal 837 zcmV-L1G@Z)P)EX>4Tx04R}tkv&MmKpe$iQ>7x6B6bjQ$WS|35EXHhDi*;)X)CnqU~=gfG-*gu zTpR`0f`cE6RR0!X5l%$?&0I>U5saWpZjwRC4rtTK|Hf* z>74h8!>lYR#OK8023?T&k?XR{Z=6dG3p_JyWYhD+VPdh=#c~(3vY`@B6Gs$PqkJLf zvch?bvs$gQ_C5Ivg9U9R!*!aYNMH#`q#!~@9TikzAx5i4iitGs$36Tbjz2{%nOqex zax9<*6_Voz|AXJ%n#HL}Hz^ngdS7h&V+;uF0jdyW16NwdUuy!hpQJZB zTI2`_Z37qA9ZlW?E_Z<8CtWfmNAlAYibdf4jJ_!k4BZ0#Yi@7teVjf3S?X%}1~@nb zq9w{+_jq?-cW?imY4`U7S@&|Cs%{=g00006VoOIv00000008+zyMF)x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru=LZiKF&Yj+Y}Nn(02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00A9IL_t(I%iWQ&O2beThQC`%p@U!tQ7BRBP;@8`T?<|8 zTe$ibjy`}7;qEFp1p-bIBtt@nND=}m4Kxtaz$Fj|xgl*y?Iw7pa}V7Ae0&G~x`b*T z@1`X{oJpQu-o>E-ZPj>DLa>?5m%()fAxHzQ|>P>4cb0SZ!89|51GdqoAMOw Date: Sun, 16 Jul 2023 02:26:29 +0300 Subject: [PATCH 03/10] Replace GenerationSettingsBuilderAccessor with an AW I was wary of adding dev-only AWs, but WaM already has them :shrug: --- .../builtin/WamGenerationSettingsBuilder.java | 5 +---- .../mixin/GenerationSettingsBuilderAccessor.java | 15 --------------- .../resources/mixins.woods_and_mires_data.json | 1 - src/main/resources/woods_and_mires.accesswidener | 1 + 4 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 src/data/java/juuxel/woodsandmires/data/mixin/GenerationSettingsBuilderAccessor.java diff --git a/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java b/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java index 96307ac..8723e1a 100644 --- a/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java +++ b/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java @@ -1,6 +1,5 @@ package juuxel.woodsandmires.data.builtin; -import juuxel.woodsandmires.data.mixin.GenerationSettingsBuilderAccessor; import net.minecraft.util.TopologicalSorts; import net.minecraft.util.registry.RegistryEntry; import net.minecraft.world.biome.GenerationSettings; @@ -54,9 +53,7 @@ public GenerationSettings build() { private void order() { orderingsByStep.forEach((step, orderings) -> { - List> features = ((GenerationSettingsBuilderAccessor) this) - .getFeatures() - .get(step.ordinal()); + List> features = this.features.get(step.ordinal()); Set> visited = new HashSet<>(); Set> visiting = new HashSet<>(); diff --git a/src/data/java/juuxel/woodsandmires/data/mixin/GenerationSettingsBuilderAccessor.java b/src/data/java/juuxel/woodsandmires/data/mixin/GenerationSettingsBuilderAccessor.java deleted file mode 100644 index a5cec50..0000000 --- a/src/data/java/juuxel/woodsandmires/data/mixin/GenerationSettingsBuilderAccessor.java +++ /dev/null @@ -1,15 +0,0 @@ -package juuxel.woodsandmires.data.mixin; - -import net.minecraft.util.registry.RegistryEntry; -import net.minecraft.world.biome.GenerationSettings; -import net.minecraft.world.gen.feature.PlacedFeature; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -import java.util.List; - -@Mixin(GenerationSettings.Builder.class) -public interface GenerationSettingsBuilderAccessor { - @Accessor - List>> getFeatures(); -} diff --git a/src/data/resources/mixins.woods_and_mires_data.json b/src/data/resources/mixins.woods_and_mires_data.json index e0cf934..994b5cc 100644 --- a/src/data/resources/mixins.woods_and_mires_data.json +++ b/src/data/resources/mixins.woods_and_mires_data.json @@ -5,7 +5,6 @@ "mixins": [ "AbstractTagProviderMixin", "DataProviderMixin", - "GenerationSettingsBuilderAccessor", "RecipeProviderMixin" ], "injectors": { diff --git a/src/main/resources/woods_and_mires.accesswidener b/src/main/resources/woods_and_mires.accesswidener index 88f297b..9c9e8af 100644 --- a/src/main/resources/woods_and_mires.accesswidener +++ b/src/main/resources/woods_and_mires.accesswidener @@ -17,6 +17,7 @@ accessible method net/minecraft/world/gen/feature/VegetationConfiguredFeatures c # Data generation accessible field net/minecraft/data/server/BlockLootTableGenerator SAPLING_DROP_CHANCE [F accessible field net/minecraft/data/server/BlockLootTableGenerator WITHOUT_SILK_TOUCH_NOR_SHEARS Lnet/minecraft/loot/condition/LootCondition$Builder; +accessible field net/minecraft/world/biome/GenerationSettings$Builder features Ljava/util/List; # Rendering accessible field net/minecraft/client/render/entity/BoatEntityRenderer texturesAndModels Ljava/util/Map; From acb2d2bef24610fffaf50a77880c29ea64fd04b1 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Fri, 21 Jul 2023 01:16:00 +0300 Subject: [PATCH 04/10] WamGenerationSettingsBuilder: Move "before" instead of "after" Postponing causes more unwanted changes that lead to more cycles. --- .../data/builtin/WamGenerationSettingsBuilder.java | 6 +++--- .../woods_and_mires/worldgen/biome/lush_pine_forest.json | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java b/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java index 8723e1a..7da87a5 100644 --- a/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java +++ b/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java @@ -76,9 +76,9 @@ private void order() { int afterIndex = features.indexOf(after); if (beforeIndex <= afterIndex) continue; - // Move "after" to be after the "before" entry - features.add(beforeIndex + 1, after); - features.remove(afterIndex); + // Move "before" to be before the "after" entry + features.remove(beforeIndex); + features.add(afterIndex, before); } } }); diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json index dac89ca..d08bfaf 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json @@ -72,16 +72,16 @@ ], [ "minecraft:glow_lichen", - "minecraft:patch_large_fern", - "woods_and_mires:fallen_pine", "minecraft:patch_tall_grass", "minecraft:forest_flowers", + "minecraft:patch_large_fern", + "woods_and_mires:fallen_pine", "woods_and_mires:lush_pine_forest_trees", "woods_and_mires:lush_pine_forest_flowers", - "minecraft:flower_default", - "woods_and_mires:pine_forest_heather_patch", "minecraft:patch_grass_forest", "minecraft:flower_warm", + "minecraft:flower_default", + "woods_and_mires:pine_forest_heather_patch", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane", From 6c7176427549ca0acb69d585cec5013c21dc4ed1 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Fri, 21 Jul 2023 14:13:54 +0300 Subject: [PATCH 05/10] Automatically solve feature order cycles with the power of graph theory ...in other words, use JGraphT to prevent FOCs by creating a DAG of all features, adding preexisting order constraints and combining that with a. the manual ordering between features for mod compat b. the ordering present in a registered mod biome. This also removes my custom sorting impl from WamGenerationSettingsBuilder. --- build.gradle | 2 + gradle.properties | 1 + .../woodsandmires/data/builtin/WamBiomes.java | 50 ++++++++++++--- .../builtin/WamGenerationSettingsBuilder.java | 61 ++++++++++--------- .../woods_and_mires/worldgen/biome/fell.json | 2 +- .../worldgen/biome/lush_pine_forest.json | 14 ++--- .../biome/old_growth_pine_forest.json | 8 +-- .../worldgen/biome/pine_forest.json | 8 +-- .../worldgen/biome/pine_mire.json | 2 +- .../worldgen/biome/piny_grove.json | 4 +- .../worldgen/biome/snowy_pine_forest.json | 6 +- 11 files changed, 98 insertions(+), 60 deletions(-) diff --git a/build.gradle b/build.gradle index 53c20c4..dd0bbe6 100644 --- a/build.gradle +++ b/build.gradle @@ -73,6 +73,8 @@ dependencies { modImplementation include("com.terraformersmc.terraform-api:terraform-wood-api-v1:$project.terraform_version") dataImplementation sourceSets.main.output + // Used for sorting features in the data generator + dataImplementation "org.jgrapht:jgrapht-core:$project.jgrapht_version" } processResources { diff --git a/gradle.properties b/gradle.properties index 9a4eeb8..1537ae4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,3 +17,4 @@ fabric_version = 0.76.0+1.18.2 terrablender_version = 1.18.2-1.2.0.126 typesafe_config_version = 1.4.2 terraform_version = 3.1.0 +jgrapht_version = 1.5.2 diff --git a/src/data/java/juuxel/woodsandmires/data/builtin/WamBiomes.java b/src/data/java/juuxel/woodsandmires/data/builtin/WamBiomes.java index 150b1ec..05abfd2 100644 --- a/src/data/java/juuxel/woodsandmires/data/builtin/WamBiomes.java +++ b/src/data/java/juuxel/woodsandmires/data/builtin/WamBiomes.java @@ -14,17 +14,24 @@ import net.minecraft.world.biome.SpawnSettings; import net.minecraft.world.gen.GenerationStep; import net.minecraft.world.gen.feature.DefaultBiomeFeatures; +import net.minecraft.world.gen.feature.PlacedFeature; import net.minecraft.world.gen.feature.VegetationPlacedFeatures; +import org.jgrapht.graph.DefaultEdge; +import org.jgrapht.graph.DirectedAcyclicGraph; +import org.jgrapht.graph.GraphCycleProhibitedException; import java.util.function.Consumer; public final class WamBiomes { public static final RegistryCollector> BIOMES = new RegistryCollector<>(); + private static final DirectedAcyclicGraph, DefaultEdge> FEATURE_GRAPH = + new DirectedAcyclicGraph<>(DefaultEdge.class); private WamBiomes() { } public static void register() { + initGraph(); register(WamBiomeKeys.PINE_FOREST, pineForest()); register(WamBiomeKeys.SNOWY_PINE_FOREST, snowyPineForest()); register(WamBiomeKeys.OLD_GROWTH_PINE_FOREST, oldGrowthPineForest()); @@ -35,8 +42,42 @@ public static void register() { register(WamBiomeKeys.PINY_GROVE, pinyGrove()); } + private static void initGraph() { + for (var biome : BuiltinRegistries.BIOME) { + addBiomeToGraph(biome); + } + } + + private static void addBiomeToGraph(Biome biome) { + for (var features : biome.getGenerationSettings().getFeatures()) { + if (features.size() == 0) continue; + + var before = features.get(0); + FEATURE_GRAPH.addVertex(before); + + for (int i = 1; i < features.size(); i++) { + var after = features.get(i); + FEATURE_GRAPH.addVertex(after); + + try { + FEATURE_GRAPH.addEdge(before, after); + } catch (GraphCycleProhibitedException e) { + throw new IllegalStateException("Feature order cycle found between " + before.getKey() + " and " + after.getKey(), e); + } + + before = after; + } + } + } + private static void register(RegistryKey key, Biome biome) { BIOMES.add(BuiltinRegistries.add(BuiltinRegistries.BIOME, key, biome)); + + try { + addBiomeToGraph(biome); + } catch (Exception e) { + throw new IllegalStateException(e.getMessage() + " [biome=" + key.getValue() + "]", e); + } } private static int getSkyColor(float temperature) { @@ -123,13 +164,6 @@ private static Biome lushPineForest() { builder.feature(GenerationStep.Feature.VEGETAL_DECORATION, WamPlacedFeatures.LUSH_PINE_FOREST_FLOWERS); DefaultBiomeFeatures.addExtraDefaultFlowers(builder); - // Required to keep vanilla order for savanna tall grass - builder.addOrdering( - GenerationStep.Feature.VEGETAL_DECORATION, - VegetationPlacedFeatures.PATCH_TALL_GRASS, - VegetationPlacedFeatures.FOREST_FLOWERS - ); - // https://github.com/Juuxel/WoodsAndMires/issues/14 builder.addOrdering( GenerationStep.Feature.VEGETAL_DECORATION, @@ -274,7 +308,7 @@ private static Biome pinyGrove() { private static GenerationSettings generationSettings(Consumer configurator) { WamGenerationSettingsBuilder builder = new WamGenerationSettingsBuilder(); configurator.accept(builder); - return builder.build(); + return builder.build(FEATURE_GRAPH); } private static SpawnSettings spawnSettings(Consumer configurator) { diff --git a/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java b/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java index 7da87a5..10b5953 100644 --- a/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java +++ b/src/data/java/juuxel/woodsandmires/data/builtin/WamGenerationSettingsBuilder.java @@ -1,19 +1,21 @@ package juuxel.woodsandmires.data.builtin; -import net.minecraft.util.TopologicalSorts; import net.minecraft.util.registry.RegistryEntry; import net.minecraft.world.biome.GenerationSettings; import net.minecraft.world.gen.GenerationStep; import net.minecraft.world.gen.carver.ConfiguredCarver; import net.minecraft.world.gen.feature.PlacedFeature; +import org.jgrapht.Graphs; +import org.jgrapht.graph.DefaultEdge; +import org.jgrapht.graph.DirectedAcyclicGraph; +import java.util.ArrayList; +import java.util.Comparator; import java.util.EnumMap; import java.util.HashMap; import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Set; -import java.util.function.Consumer; public class WamGenerationSettingsBuilder extends GenerationSettings.Builder { // step -> before -> [after] @@ -45,42 +47,41 @@ public WamGenerationSettingsBuilder addOrdering(GenerationStep.Feature step, Reg return this; } + @Deprecated @Override public GenerationSettings build() { - order(); + throw new UnsupportedOperationException("Use build(DirectedAcyclicGraph) instead"); + } + + public GenerationSettings build(DirectedAcyclicGraph, DefaultEdge> globalGraph) { + order(globalGraph); return super.build(); } - private void order() { - orderingsByStep.forEach((step, orderings) -> { - List> features = this.features.get(step.ordinal()); + private void order(DirectedAcyclicGraph, DefaultEdge> globalGraph) { + var steps = GenerationStep.Feature.values(); + for (int i = 0; i < this.features.size(); i++) { + var features = this.features.get(i); + var localGraph = new DirectedAcyclicGraph, DefaultEdge>(DefaultEdge.class); + Graphs.addGraph(localGraph, globalGraph); - Set> visited = new HashSet<>(); - Set> visiting = new HashSet<>(); - Consumer> noopConsumer = x -> {}; + for (var feature : features) { + localGraph.addVertex(feature); + } - // Iterate over all constraints - for (var before : orderings.keySet()) { - // Check that the ordering is consistent - if (TopologicalSorts.sort(orderings, visited, visiting, noopConsumer, before)) { - throw new IllegalStateException("Found inconsistent order in step " + step + "; cycle starting from " + before); + var step = steps[i]; + orderingsByStep.getOrDefault(step, Map.of()).forEach((before, allAfter) -> { + for (var after : allAfter) { + localGraph.addEdge(before, after); } - visited.clear(); - visiting.clear(); + }); - // Add the order - // Note: we won't use the mc toposort here since we want to keep the general order. - // It's still useful for checking for cycles. - for (var after : orderings.get(before)) { - int beforeIndex = features.indexOf(before); - int afterIndex = features.indexOf(after); - if (beforeIndex <= afterIndex) continue; - - // Move "before" to be before the "after" entry - features.remove(beforeIndex); - features.add(afterIndex, before); - } + var orderProvider = new ArrayList>(localGraph.vertexSet().size()); + for (var feature : localGraph) { + orderProvider.add(feature); } - }); + + features.sort(Comparator.comparingInt(orderProvider::indexOf)); + } } } diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/fell.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/fell.json index f3f905f..f311324 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/fell.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/fell.json @@ -73,12 +73,12 @@ [ "minecraft:glow_lichen", "minecraft:flower_default", - "woods_and_mires:fell_heather_patch", "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "woods_and_mires:fell_heather_patch", "woods_and_mires:fell_lichen", "woods_and_mires:fell_moss_patch", "woods_and_mires:fell_vegetation", diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json index d08bfaf..6061c3f 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json @@ -72,21 +72,21 @@ ], [ "minecraft:glow_lichen", - "minecraft:patch_tall_grass", "minecraft:forest_flowers", "minecraft:patch_large_fern", - "woods_and_mires:fallen_pine", - "woods_and_mires:lush_pine_forest_trees", - "woods_and_mires:lush_pine_forest_flowers", + "minecraft:flower_default", "minecraft:patch_grass_forest", + "minecraft:patch_tall_grass", "minecraft:flower_warm", - "minecraft:flower_default", - "woods_and_mires:pine_forest_heather_patch", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", - "minecraft:patch_berry_common" + "minecraft:patch_berry_common", + "woods_and_mires:fallen_pine", + "woods_and_mires:pine_forest_heather_patch", + "woods_and_mires:lush_pine_forest_trees", + "woods_and_mires:lush_pine_forest_flowers" ], [ "minecraft:freeze_top_layer" diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json index a8ac00f..b546c6f 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json @@ -74,16 +74,16 @@ "minecraft:glow_lichen", "minecraft:forest_flowers", "minecraft:patch_large_fern", - "woods_and_mires:fallen_pine", - "woods_and_mires:old_growth_pine_forest_trees", "minecraft:flower_default", - "woods_and_mires:pine_forest_heather_patch", "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", - "minecraft:patch_berry_common" + "minecraft:patch_berry_common", + "woods_and_mires:fallen_pine", + "woods_and_mires:pine_forest_heather_patch", + "woods_and_mires:old_growth_pine_forest_trees" ], [ "minecraft:freeze_top_layer" diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json index 149c960..085ce9b 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json @@ -74,16 +74,16 @@ "minecraft:glow_lichen", "minecraft:forest_flowers", "minecraft:patch_large_fern", - "woods_and_mires:fallen_pine", - "woods_and_mires:forest_pine", "minecraft:flower_default", - "woods_and_mires:pine_forest_heather_patch", "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", - "minecraft:patch_berry_common" + "minecraft:patch_berry_common", + "woods_and_mires:fallen_pine", + "woods_and_mires:forest_pine", + "woods_and_mires:pine_forest_heather_patch" ], [ "minecraft:freeze_top_layer" diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_mire.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_mire.json index 302fee9..18c0344 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_mire.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_mire.json @@ -54,9 +54,9 @@ ], [ "minecraft:glow_lichen", + "minecraft:patch_waterlily", "woods_and_mires:mire_pine_shrub", "woods_and_mires:mire_flowers", - "minecraft:patch_waterlily", "woods_and_mires:mire_pine_snag" ], [ diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/piny_grove.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/piny_grove.json index 8739928..63f6357 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/piny_grove.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/piny_grove.json @@ -74,9 +74,9 @@ ], [ "minecraft:glow_lichen", - "woods_and_mires:piny_grove_trees", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_pumpkin", + "woods_and_mires:piny_grove_trees" ], [ "minecraft:freeze_top_layer" diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_pine_forest.json index abba96c..9123384 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/snowy_pine_forest.json @@ -74,14 +74,14 @@ "minecraft:glow_lichen", "minecraft:forest_flowers", "minecraft:patch_large_fern", - "woods_and_mires:fallen_pine", - "woods_and_mires:snowy_pine_forest_trees", "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", - "minecraft:patch_berry_common" + "minecraft:patch_berry_common", + "woods_and_mires:fallen_pine", + "woods_and_mires:snowy_pine_forest_trees" ], [ "minecraft:freeze_top_layer" From 32785974dc3b51a12f1717d6c4f2600660c05457 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Fri, 21 Jul 2023 14:34:38 +0300 Subject: [PATCH 06/10] Improve pine cone texture --- .../textures/item/pine_cone.png | Bin 837 -> 5685 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/woods_and_mires/textures/item/pine_cone.png b/src/main/resources/assets/woods_and_mires/textures/item/pine_cone.png index 140f2e6570110064b8a8bffaa3e7d51326b9669c..38bf50eead501fc923c461567b5a7378691dbee6 100644 GIT binary patch literal 5685 zcmeHKdpML^7as~8RHLF4nlsZCb02eykV_^FiZ7(nJ2UT$!Cabo#|(AkHQ|YEs(f7{iqUSr$^F2M!cm8YUd1v0e_FBKa)^D%9_TGtp zKJ!N#Pc}v%5TjXM?u+4nr1lwQ2>(uf^$9>A493R<1VM`dB}yuj@P&~e3W}D3C{QKj zBM_?Ar-8v~(`K3ubWfP8pB7ZLDhRV?#MFB!(~HlqFNhem*{!e|~ zgtZ#Lv8MmvuL&z(ly;31Aj9AK-^2%(#5Pu~sA@h_=1kZ&GVh77qqzO}n5-*~*3+RE zq3gtK%Z#;aF7_YE?Cz6|JaKL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5X&a5>4n2@);0)>TRs;{Oio^=GxP?J**b#NFW^~swVddJQk09xC(Hf%t5%y%(N8(8XlHe~M1 h=698cG@rUgw_5H#dL^4U9-bQn%frXLXx_?o{{h>&!MXqd delta 752 zcmVEX>4Tx04R}tkv&MmKpe$iQ>7x6B6bjQ z$WS|35EXHhDi*;)X)CnqU~=gfG-*guTpR`0f`cE6RRs^dzd7t}p3@8PY0X~st?f%Ws@Z4huXp zY-H2(#9?Bw)Wvcav$CNQPZLKJRik_%=d!|ii?dp-v-Umt3xfr1CBt=^qex&0Nu(e` zMjaJYVIfAVMt_QlH0{Sd{3DJ(MJ}0K6)&@IM1rTE|~&0<)i_H#%D62ncNh7uOw4-UBXofZ-=yG9*Xx(-ewD z;QfrgDGvb2T>?d>QHnj4qXdf>|40{7LGoE58>`AI0XVu5+p-Hhe#3vDGf9b(!eDU2e~0_ zN$n1y^3fy9?(RzF;El$h7~XwX~dbtaTjPO zM_im8?}W7K58d{K7bO^0KrRcsD8Y0>a#;ZI_VHEu*^#Jf99CtyTNXgzCpxeF} z_Is5Jb)BorQvggS+#j$_p+02knt8ZFw|&tlaa%NKx6|I(-0l4AtDm*i6rkI_$Yp`) igqTiPZB|16QGElWpr78iDC`0N0000rb<=- From 9464bfad30d5dc6164872f53e7bc3212301ea3e8 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Fri, 21 Jul 2023 15:11:58 +0300 Subject: [PATCH 07/10] Fix tree decorators modifying the ground - Fixes pine trees extending underground - Fixes dirt growing branches in mires --- .../juuxel/woodsandmires/tree/AgedTrunkTreeDecorator.java | 4 ++++ .../java/juuxel/woodsandmires/tree/BranchTreeDecorator.java | 3 +++ .../juuxel/woodsandmires/tree/ReplaceTrunkTreeDecorator.java | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/main/java/juuxel/woodsandmires/tree/AgedTrunkTreeDecorator.java b/src/main/java/juuxel/woodsandmires/tree/AgedTrunkTreeDecorator.java index 97277b2..6cab856 100644 --- a/src/main/java/juuxel/woodsandmires/tree/AgedTrunkTreeDecorator.java +++ b/src/main/java/juuxel/woodsandmires/tree/AgedTrunkTreeDecorator.java @@ -12,6 +12,7 @@ import net.minecraft.util.math.floatprovider.FloatProvider; import net.minecraft.util.registry.Registry; import net.minecraft.world.TestableWorld; +import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.treedecorator.TreeDecorator; import net.minecraft.world.gen.treedecorator.TreeDecoratorType; @@ -65,6 +66,9 @@ public void generate(TestableWorld world, BiConsumer repla for (BlockPos pos : sortedLogPositions) { if (pos.getY() > midY) { break; + } else if (world.testBlockState(pos, Feature::isSoil)) { + // Don't replace the dirt underneath the trunk + continue; } BlockState state = log.getDefaultState().with(AgedLogBlock.MID, pos.getY() == midY); diff --git a/src/main/java/juuxel/woodsandmires/tree/BranchTreeDecorator.java b/src/main/java/juuxel/woodsandmires/tree/BranchTreeDecorator.java index c221b3b..93b09db 100644 --- a/src/main/java/juuxel/woodsandmires/tree/BranchTreeDecorator.java +++ b/src/main/java/juuxel/woodsandmires/tree/BranchTreeDecorator.java @@ -51,6 +51,9 @@ public void generate(TestableWorld world, BiConsumer repla BlockPos.Mutable mut = new BlockPos.Mutable(); for (BlockPos pos : logPositions) { + // Don't replace the dirt underneath the trunk + if (world.testBlockState(pos, Feature::isSoil)) continue; + mut.set(pos); for (Direction side : Direction.Type.HORIZONTAL) { diff --git a/src/main/java/juuxel/woodsandmires/tree/ReplaceTrunkTreeDecorator.java b/src/main/java/juuxel/woodsandmires/tree/ReplaceTrunkTreeDecorator.java index 259dce3..ffd9423 100644 --- a/src/main/java/juuxel/woodsandmires/tree/ReplaceTrunkTreeDecorator.java +++ b/src/main/java/juuxel/woodsandmires/tree/ReplaceTrunkTreeDecorator.java @@ -5,6 +5,7 @@ import net.minecraft.block.BlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.TestableWorld; +import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.stateprovider.BlockStateProvider; import net.minecraft.world.gen.treedecorator.TreeDecorator; import net.minecraft.world.gen.treedecorator.TreeDecoratorType; @@ -38,6 +39,9 @@ protected TreeDecoratorType getType() { @Override public void generate(TestableWorld world, BiConsumer replacer, Random random, List logPositions, List leavesPositions) { for (BlockPos pos : logPositions) { + // Don't replace the dirt underneath the trunk + if (world.testBlockState(pos, Feature::isSoil)) continue; + replacer.accept(pos, trunk.getBlockState(random, pos)); } } From bf92005934b4a1477f0eccf9cf122b41e7517e1a Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Fri, 21 Jul 2023 15:12:15 +0300 Subject: [PATCH 08/10] Decrease pine cone drop rate --- .../juuxel/woodsandmires/data/WamBlockLootTableProvider.java | 2 +- .../data/woods_and_mires/loot_tables/blocks/pine_leaves.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/java/juuxel/woodsandmires/data/WamBlockLootTableProvider.java b/src/data/java/juuxel/woodsandmires/data/WamBlockLootTableProvider.java index 9afdbd4..50546c1 100644 --- a/src/data/java/juuxel/woodsandmires/data/WamBlockLootTableProvider.java +++ b/src/data/java/juuxel/woodsandmires/data/WamBlockLootTableProvider.java @@ -38,7 +38,7 @@ protected void generateBlockLootTables() { .pool(addSurvivesExplosionCondition(WamItems.PINE_CONE, LootPool.builder() .conditionally(WITHOUT_SILK_TOUCH_NOR_SHEARS) .with(ItemEntry.builder(WamItems.PINE_CONE) - .apply(SetCountLootFunction.builder(BinomialLootNumberProvider.create(3, 0.07f))) + .apply(SetCountLootFunction.builder(BinomialLootNumberProvider.create(3, 0.04f))) ) )) ); diff --git a/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json b/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json index c7c1659..d564f7c 100644 --- a/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json +++ b/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json @@ -143,7 +143,7 @@ "count": { "type": "minecraft:binomial", "n": 3.0, - "p": 0.07 + "p": 0.04 }, "add": false } From 6b64b66d78708db48fa2bc16a7dd1f24e89d1de4 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Fri, 21 Jul 2023 15:52:10 +0300 Subject: [PATCH 09/10] Add pine cone jam --- .../data/WamItemTagProvider.java | 8 +++++ .../woodsandmires/data/WamRecipeProvider.java | 10 ++++++ .../data/builtin/CommonItemTags.java | 4 +++ .../resources/data/c/tags/items/honey.json | 6 ++++ .../resources/data/c/tags/items/jams.json | 6 ++++ .../data/c/tags/items/pine_cones.json | 6 ++++ .../resources/data/c/tags/items/sugar.json | 6 ++++ .../recipes/food/pine_cone_jam.json | 34 ++++++++++++++++++ .../recipes/pine_cone_jam.json | 20 +++++++++++ .../juuxel/woodsandmires/item/WamItems.java | 8 +++++ .../assets/woods_and_mires/lang/en_us.json | 5 +++ .../assets/woods_and_mires/lang/fi_fi.json | 5 +++ .../models/item/pine_cone_jam.json | 6 ++++ .../textures/item/pine_cone_jam.png | Bin 0 -> 5506 bytes unused_assets/jar.png | Bin 0 -> 5270 bytes 15 files changed, 124 insertions(+) create mode 100644 src/generated/resources/data/c/tags/items/honey.json create mode 100644 src/generated/resources/data/c/tags/items/jams.json create mode 100644 src/generated/resources/data/c/tags/items/pine_cones.json create mode 100644 src/generated/resources/data/c/tags/items/sugar.json create mode 100644 src/generated/resources/data/woods_and_mires/advancements/recipes/food/pine_cone_jam.json create mode 100644 src/generated/resources/data/woods_and_mires/recipes/pine_cone_jam.json create mode 100644 src/main/resources/assets/woods_and_mires/models/item/pine_cone_jam.json create mode 100644 src/main/resources/assets/woods_and_mires/textures/item/pine_cone_jam.png create mode 100644 unused_assets/jar.png diff --git a/src/data/java/juuxel/woodsandmires/data/WamItemTagProvider.java b/src/data/java/juuxel/woodsandmires/data/WamItemTagProvider.java index 5560aa0..1b43eec 100644 --- a/src/data/java/juuxel/woodsandmires/data/WamItemTagProvider.java +++ b/src/data/java/juuxel/woodsandmires/data/WamItemTagProvider.java @@ -62,6 +62,14 @@ protected void generateTags() { .add(WamBlocks.PINE_SNAG_LOG, WamBlocks.PINE_SNAG_WOOD); // Common tags + builder(CommonItemTags.HONEY) + .add(WamItems.PINE_CONE_JAM); + builder(CommonItemTags.JAMS) + .add(WamItems.PINE_CONE_JAM); + builder(CommonItemTags.PINE_CONES) + .add(WamItems.PINE_CONE); + builder(CommonItemTags.SUGAR) + .add(Items.SUGAR); builder(CommonItemTags.WOODEN_RODS) .add(Items.STICK); } diff --git a/src/data/java/juuxel/woodsandmires/data/WamRecipeProvider.java b/src/data/java/juuxel/woodsandmires/data/WamRecipeProvider.java index 93b27f5..4740c03 100644 --- a/src/data/java/juuxel/woodsandmires/data/WamRecipeProvider.java +++ b/src/data/java/juuxel/woodsandmires/data/WamRecipeProvider.java @@ -2,6 +2,7 @@ import juuxel.woodsandmires.WoodsAndMires; import juuxel.woodsandmires.block.WamBlocks; +import juuxel.woodsandmires.data.builtin.CommonItemTags; import juuxel.woodsandmires.item.WamItemTags; import juuxel.woodsandmires.item.WamItems; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; @@ -12,6 +13,7 @@ import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder; import net.minecraft.item.ItemConvertible; import net.minecraft.item.Items; +import net.minecraft.recipe.Ingredient; import org.jetbrains.annotations.Nullable; import java.util.function.Consumer; @@ -55,6 +57,14 @@ protected void generateRecipes(Consumer exporter) { offerShapelessRecipe(exporter, Items.MAGENTA_DYE, WamBlocks.FIREWEED, "magenta_dye", 2); offerShapelessRecipe(exporter, Items.PINK_DYE, WamBlocks.HEATHER, "pink_dye", 1); offerShapelessRecipe(exporter, Items.YELLOW_DYE, WamBlocks.TANSY, "yellow_dye", 1); + + // Other + ShapelessRecipeJsonBuilder.create(WamItems.PINE_CONE_JAM) + .input(Items.GLASS_BOTTLE) + .input(Ingredient.fromTag(CommonItemTags.PINE_CONES), 2) + .input(CommonItemTags.SUGAR) + .criterion(hasItem(WamItems.PINE_CONE), conditionsFromItem(WamItems.PINE_CONE)) + .offerTo(exporter); } public static void offerShapelessRecipe(Consumer exporter, ItemConvertible output, ItemConvertible input, @Nullable String group, int outputCount) { diff --git a/src/data/java/juuxel/woodsandmires/data/builtin/CommonItemTags.java b/src/data/java/juuxel/woodsandmires/data/builtin/CommonItemTags.java index dc00197..a002f3d 100644 --- a/src/data/java/juuxel/woodsandmires/data/builtin/CommonItemTags.java +++ b/src/data/java/juuxel/woodsandmires/data/builtin/CommonItemTags.java @@ -6,6 +6,10 @@ import net.minecraft.util.registry.Registry; public final class CommonItemTags { + public static final TagKey HONEY = of("honey"); + public static final TagKey JAMS = of("jams"); + public static final TagKey PINE_CONES = of("pine_cones"); + public static final TagKey SUGAR = of("sugar"); public static final TagKey WOODEN_RODS = of("wooden_rods"); private static TagKey of(String path) { diff --git a/src/generated/resources/data/c/tags/items/honey.json b/src/generated/resources/data/c/tags/items/honey.json new file mode 100644 index 0000000..78800ce --- /dev/null +++ b/src/generated/resources/data/c/tags/items/honey.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "woods_and_mires:pine_cone_jam" + ] +} diff --git a/src/generated/resources/data/c/tags/items/jams.json b/src/generated/resources/data/c/tags/items/jams.json new file mode 100644 index 0000000..78800ce --- /dev/null +++ b/src/generated/resources/data/c/tags/items/jams.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "woods_and_mires:pine_cone_jam" + ] +} diff --git a/src/generated/resources/data/c/tags/items/pine_cones.json b/src/generated/resources/data/c/tags/items/pine_cones.json new file mode 100644 index 0000000..d224bb8 --- /dev/null +++ b/src/generated/resources/data/c/tags/items/pine_cones.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "woods_and_mires:pine_cone" + ] +} diff --git a/src/generated/resources/data/c/tags/items/sugar.json b/src/generated/resources/data/c/tags/items/sugar.json new file mode 100644 index 0000000..bc87462 --- /dev/null +++ b/src/generated/resources/data/c/tags/items/sugar.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "minecraft:sugar" + ] +} diff --git a/src/generated/resources/data/woods_and_mires/advancements/recipes/food/pine_cone_jam.json b/src/generated/resources/data/woods_and_mires/advancements/recipes/food/pine_cone_jam.json new file mode 100644 index 0000000..4235ba0 --- /dev/null +++ b/src/generated/resources/data/woods_and_mires/advancements/recipes/food/pine_cone_jam.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "woods_and_mires:pine_cone_jam" + ] + }, + "criteria": { + "has_pine_cone": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "woods_and_mires:pine_cone" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "woods_and_mires:pine_cone_jam" + } + } + }, + "requirements": [ + [ + "has_pine_cone", + "has_the_recipe" + ] + ] +} diff --git a/src/generated/resources/data/woods_and_mires/recipes/pine_cone_jam.json b/src/generated/resources/data/woods_and_mires/recipes/pine_cone_jam.json new file mode 100644 index 0000000..01e6ef4 --- /dev/null +++ b/src/generated/resources/data/woods_and_mires/recipes/pine_cone_jam.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "minecraft:glass_bottle" + }, + { + "tag": "c:pine_cones" + }, + { + "tag": "c:pine_cones" + }, + { + "tag": "c:sugar" + } + ], + "result": { + "item": "woods_and_mires:pine_cone_jam" + } +} diff --git a/src/main/java/juuxel/woodsandmires/item/WamItems.java b/src/main/java/juuxel/woodsandmires/item/WamItems.java index 81c9f9e..5fc2037 100644 --- a/src/main/java/juuxel/woodsandmires/item/WamItems.java +++ b/src/main/java/juuxel/woodsandmires/item/WamItems.java @@ -3,13 +3,21 @@ import juuxel.woodsandmires.WoodsAndMires; import juuxel.woodsandmires.entity.WamBoat; import net.minecraft.block.DispenserBlock; +import net.minecraft.item.FoodComponent; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; +import net.minecraft.item.Items; import net.minecraft.util.registry.Registry; public final class WamItems { public static final Item PINE_BOAT = register("pine_boat", new WamBoatItem(WamBoat.PINE, new Item.Settings().group(ItemGroup.TRANSPORTATION))); public static final Item PINE_CONE = register("pine_cone", new Item(new Item.Settings().group(ItemGroup.MATERIALS))); + public static final Item PINE_CONE_JAM = register("pine_cone_jam", new Item( + new Item.Settings() + .group(ItemGroup.FOOD) + .recipeRemainder(Items.GLASS_BOTTLE) + .food(new FoodComponent.Builder().hunger(3).saturationModifier(0.25f).build()) + )); public static void init() { for (WamBoat boat : WamBoat.values()) { diff --git a/src/main/resources/assets/woods_and_mires/lang/en_us.json b/src/main/resources/assets/woods_and_mires/lang/en_us.json index 6dabbda..849b3fe 100644 --- a/src/main/resources/assets/woods_and_mires/lang/en_us.json +++ b/src/main/resources/assets/woods_and_mires/lang/en_us.json @@ -40,9 +40,14 @@ "item.woods_and_mires.pine_boat": "Pine Boat", "item.woods_and_mires.pine_cone": "Pine Cone", + "item.woods_and_mires.pine_cone_jam": "Pine Cone Jam", "entity.woods_and_mires.pine_boat": "Pine Boat", + "tag.item.c.honey": "Honey", + "tag.item.c.jams": "Jams", + "tag.item.c.pine_cones": "Pine Cones", + "tag.item.c.sugar": "Sugar", "tag.item.c.wooden_rods": "Wooden Rods", "tag.item.woods_and_mires.pine_logs": "Pine Logs", "tag.item.woods_and_mires.thick_pine_logs": "Thick Pine Logs" diff --git a/src/main/resources/assets/woods_and_mires/lang/fi_fi.json b/src/main/resources/assets/woods_and_mires/lang/fi_fi.json index e703914..9c0439b 100644 --- a/src/main/resources/assets/woods_and_mires/lang/fi_fi.json +++ b/src/main/resources/assets/woods_and_mires/lang/fi_fi.json @@ -40,9 +40,14 @@ "item.woods_and_mires.pine_boat": "Mäntyvene", "item.woods_and_mires.pine_cone": "Männynkäpy", + "item.woods_and_mires.pine_cone_jam": "Männynkäpyhillo", "entity.woods_and_mires.pine_boat": "Mäntyvene", + "tag.item.c.honey": "Hunaja", + "tag.item.c.jams": "Hillot", + "tag.item.c.pine_cones": "Männynkävyt", + "tag.item.c.sugar": "Sokeri", "tag.item.c.wooden_rods": "Puusauvat", "tag.item.woods_and_mires.pine_logs": "Mäntyhalot", "tag.item.woods_and_mires.thick_pine_logs": "Paksut mäntyhalot" diff --git a/src/main/resources/assets/woods_and_mires/models/item/pine_cone_jam.json b/src/main/resources/assets/woods_and_mires/models/item/pine_cone_jam.json new file mode 100644 index 0000000..9baa15c --- /dev/null +++ b/src/main/resources/assets/woods_and_mires/models/item/pine_cone_jam.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "woods_and_mires:item/pine_cone_jam" + } +} diff --git a/src/main/resources/assets/woods_and_mires/textures/item/pine_cone_jam.png b/src/main/resources/assets/woods_and_mires/textures/item/pine_cone_jam.png new file mode 100644 index 0000000000000000000000000000000000000000..4a6ba8d0538353efdf17cede14b3bb3f32467863 GIT binary patch literal 5506 zcmeHKdsK{D8y})lgF>a$F(wXH=04TTXu3{n%2c}Pu6JhMsj22-W@@Gjp+rho2_-5W z9JxeD<&s3v5epa=wD0msH;N13txQ(V6bVIV?2E%?tl~_6bU%o2oNEO7J>*+#^u0Z zvW^#P{j>U(!N&&Y#ZFuNQtQSe{WA0RUIFveb6l54EA`_U?eHSF?$oT+Gpbg99vlWf zU9B5xCoMERq_qN_8}K+asUtF{*QL$q?Z@Dj>j_-}M)2%|yGQrPI#&*b$~U^iYEwS8 zB%jE^`+aK5e046@A@=^<)0VE~+Um!1c%3S5Xjd0x`nNN)MT%1os^ZnjlTTl~vx zmwD1Tln>lGimG~PuLReyF?_sP;xzrSmmS$J7h9iaBjl%}Qw5H0BXf0o# zqYvln8W=92+qs>(Yn+rnvUO`3C@%|Ga<-{`l@PqjPF&QD9tgaFS@aj*+7$-W!CK`gt_%%p)$AX`;+{ zNBdoj3hxHKrM_-Id$>T&mRB#VO~)4LQ|{E~hW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--- .../recipes/food/pine_cone_jam.json | 20 +++---- .../loot_tables/blocks/pine_leaves.json | 55 +++++++++++++++++++ .../worldgen/biome/lush_pine_forest.json | 14 ++--- .../biome/old_growth_pine_forest.json | 8 +-- .../worldgen/biome/pine_forest.json | 8 +-- 5 files changed, 80 insertions(+), 25 deletions(-) diff --git a/src/generated/resources/data/woods_and_mires/advancements/recipes/food/pine_cone_jam.json b/src/generated/resources/data/woods_and_mires/advancements/recipes/food/pine_cone_jam.json index 4235ba0..b951ffb 100644 --- a/src/generated/resources/data/woods_and_mires/advancements/recipes/food/pine_cone_jam.json +++ b/src/generated/resources/data/woods_and_mires/advancements/recipes/food/pine_cone_jam.json @@ -1,13 +1,7 @@ { "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "woods_and_mires:pine_cone_jam" - ] - }, "criteria": { "has_pine_cone": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -16,13 +10,14 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" }, "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", "conditions": { "recipe": "woods_and_mires:pine_cone_jam" - } + }, + "trigger": "minecraft:recipe_unlocked" } }, "requirements": [ @@ -30,5 +25,10 @@ "has_pine_cone", "has_the_recipe" ] - ] + ], + "rewards": { + "recipes": [ + "woods_and_mires:pine_cone_jam" + ] + } } diff --git a/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json b/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json index 865b9dc..a119c54 100644 --- a/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json +++ b/src/generated/resources/data/woods_and_mires/loot_tables/blocks/pine_leaves.json @@ -130,6 +130,61 @@ } ], "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:alternative", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": [ + "minecraft:shears" + ] + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ] + } + }, + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:binomial", + "n": 3.0, + "p": 0.04 + }, + "function": "minecraft:set_count" + } + ], + "name": "woods_and_mires:pine_cone" + } + ], + "rolls": 1.0 } ] } diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json index deec0ac..45979d4 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/lush_pine_forest.json @@ -73,21 +73,21 @@ ], [ "minecraft:glow_lichen", + "minecraft:forest_flowers", "minecraft:patch_large_fern", - "woods_and_mires:fallen_pine", "minecraft:flower_default", - "woods_and_mires:pine_forest_heather_patch", - "minecraft:patch_tall_grass", - "minecraft:forest_flowers", - "woods_and_mires:lush_pine_forest_trees", - "woods_and_mires:lush_pine_forest_flowers", "minecraft:patch_grass_forest", + "minecraft:patch_tall_grass", "minecraft:flower_warm", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", - "minecraft:patch_berry_common" + "minecraft:patch_berry_common", + "woods_and_mires:fallen_pine", + "woods_and_mires:pine_forest_heather_patch", + "woods_and_mires:lush_pine_forest_trees", + "woods_and_mires:lush_pine_forest_flowers" ], [ "minecraft:freeze_top_layer" diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json index 13da085..50c34d8 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/old_growth_pine_forest.json @@ -75,16 +75,16 @@ "minecraft:glow_lichen", "minecraft:forest_flowers", "minecraft:patch_large_fern", - "woods_and_mires:fallen_pine", "minecraft:flower_default", - "woods_and_mires:pine_forest_heather_patch", - "woods_and_mires:old_growth_pine_forest_trees", "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", - "minecraft:patch_berry_common" + "minecraft:patch_berry_common", + "woods_and_mires:fallen_pine", + "woods_and_mires:pine_forest_heather_patch", + "woods_and_mires:old_growth_pine_forest_trees" ], [ "minecraft:freeze_top_layer" diff --git a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json index ee2fcb7..ac9d35c 100644 --- a/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json +++ b/src/generated/resources/data/woods_and_mires/worldgen/biome/pine_forest.json @@ -75,16 +75,16 @@ "minecraft:glow_lichen", "minecraft:forest_flowers", "minecraft:patch_large_fern", - "woods_and_mires:fallen_pine", "minecraft:flower_default", - "woods_and_mires:pine_forest_heather_patch", - "woods_and_mires:forest_pine", "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", - "minecraft:patch_berry_common" + "minecraft:patch_berry_common", + "woods_and_mires:fallen_pine", + "woods_and_mires:pine_forest_heather_patch", + "woods_and_mires:forest_pine" ], [ "minecraft:freeze_top_layer"