From 58d29a644e1385bf82250bfa8a67c8854335a764 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 15:48:49 +0100 Subject: [PATCH 01/26] Overhaul vein infrastructure to work with biome tags --- .../api/excavator/ExcavatorHandler.java | 20 ++++++-- .../api/excavator/MineralMix.java | 43 ++++++++++++---- .../recipes/builder/MineralMixBuilder.java | 26 +++++++--- .../serializers/MineralMixSerializer.java | 49 ++++++++++++++----- .../common/world/FeatureMineralVein.java | 2 +- 5 files changed, 105 insertions(+), 35 deletions(-) diff --git a/src/api/java/blusunrize/immersiveengineering/api/excavator/ExcavatorHandler.java b/src/api/java/blusunrize/immersiveengineering/api/excavator/ExcavatorHandler.java index 23cdc4deac..d4d2745ad5 100644 --- a/src/api/java/blusunrize/immersiveengineering/api/excavator/ExcavatorHandler.java +++ b/src/api/java/blusunrize/immersiveengineering/api/excavator/ExcavatorHandler.java @@ -15,12 +15,17 @@ import com.google.common.collect.Multimap; import com.mojang.datafixers.util.Pair; import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; import net.minecraft.resources.ResourceKey; import net.minecraft.server.level.ColumnPos; import net.minecraft.util.RandomSource; import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.Level; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.biome.BiomeManager; +import net.minecraft.world.level.levelgen.Heightmap.Types; import net.minecraft.world.level.levelgen.synth.PerlinSimplexNoise; import javax.annotation.Nullable; @@ -130,7 +135,7 @@ public static List findVeinsForVillager( return foundVeins; } - public static void generatePotentialVein(Level world, ChunkPos chunkpos, RandomSource rand) + public static void generatePotentialVein(Level world, WorldGenLevel worldGenLevel, ChunkPos chunkpos, RandomSource rand) { int xStart = chunkpos.getMinBlockX(); int zStart = chunkpos.getMinBlockZ(); @@ -168,7 +173,12 @@ public static void generatePotentialVein(Level world, ChunkPos chunkpos, RandomS if(!crossover) { RecipeHolder mineralMix = null; - MineralSelection selection = new MineralSelection(world); + Set> biomes = new HashSet<>(); + BiomeManager biomeManager = worldGenLevel.getBiomeManager(); + int surfaceHeight = worldGenLevel.getHeight(Types.WORLD_SURFACE_WG, finalPos.x(), finalPos.z()); + for(int i = worldGenLevel.getMinBuildHeight(); i <= surfaceHeight; i++) + biomes.add(biomeManager.getNoiseBiomeAtPosition(pos.x(), i, pos.z())); + MineralSelection selection = new MineralSelection(world, biomes); if(selection.getTotalWeight() > 0) { int weight = selection.getRandomWeight(rand); @@ -222,12 +232,12 @@ public static class MineralSelection private final int totalWeight; private final Set> validMinerals; - public MineralSelection(Level dimension) + public MineralSelection(Level world, Set> biomes) { int weight = 0; this.validMinerals = new HashSet<>(); - for(RecipeHolder e : MineralMix.RECIPES.getRecipes(dimension)) - if(e.value().validDimension(dimension.dimensionTypeId())) + for(RecipeHolder e : MineralMix.RECIPES.getRecipes(world)) + if(biomes.stream().anyMatch(biome -> e.value().validBiome(biome))) { validMinerals.add(e); weight += e.value().weight; diff --git a/src/api/java/blusunrize/immersiveengineering/api/excavator/MineralMix.java b/src/api/java/blusunrize/immersiveengineering/api/excavator/MineralMix.java index e505adec0c..6b3d225916 100644 --- a/src/api/java/blusunrize/immersiveengineering/api/excavator/MineralMix.java +++ b/src/api/java/blusunrize/immersiveengineering/api/excavator/MineralMix.java @@ -13,18 +13,21 @@ import blusunrize.immersiveengineering.api.crafting.*; import blusunrize.immersiveengineering.api.crafting.cache.CachedRecipeList; import com.google.common.collect.ImmutableSet; +import net.minecraft.core.Holder; import net.minecraft.core.RegistryAccess; -import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.level.Level; +import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.dimension.DimensionType; import net.neoforged.neoforge.registries.DeferredHolder; +import java.util.Collection; import java.util.List; import java.util.Random; +import java.util.Set; +import java.util.function.Predicate; public class MineralMix extends IESerializableRecipe { @@ -36,18 +39,18 @@ public class MineralMix extends IESerializableRecipe public final List spoils; public final int weight; public final float failChance; - public final ImmutableSet> dimensions; + public final ImmutableSet biomeTagPredicates; public final Block background; public MineralMix(List outputs, List spoils, int weight, - float failChance, List> dimensions, Block background) + float failChance, Collection biomeTagPredicates, Block background) { super(TagOutput.EMPTY, IERecipeTypes.MINERAL_MIX); this.weight = weight; this.failChance = failChance; this.outputs = outputs; this.spoils = spoils; - this.dimensions = ImmutableSet.copyOf(dimensions); + this.biomeTagPredicates = ImmutableSet.copyOf(biomeTagPredicates); this.background = background; } @@ -100,10 +103,30 @@ public ItemStack getRandomSpoil(Random rand) return ItemStack.EMPTY; } - public boolean validDimension(ResourceKey dim) + public boolean validBiome(Holder biome) { - if(dimensions!=null&&!dimensions.isEmpty()) - return dimensions.contains(dim); - return true; + if(biomeTagPredicates.isEmpty()) + return true; + return biomeTagPredicates.stream().allMatch( + predicate -> predicate.test(biome) + ); + } + + /** + * A predicate for checking a biome against multiple tags. + * Returns true if ANY of the tags match. + */ + public record BiomeTagPredicate(Set> tags) implements Predicate> + { + public BiomeTagPredicate(TagKey singular) + { + this(ImmutableSet.of(singular)); + } + + @Override + public boolean test(Holder biomeHolder) + { + return this.tags().stream().anyMatch(biomeHolder::is); + } } } diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java index 7869a58476..d30a92b365 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java @@ -11,21 +11,23 @@ import blusunrize.immersiveengineering.api.crafting.StackWithChance; import blusunrize.immersiveengineering.api.crafting.TagOutput; import blusunrize.immersiveengineering.api.excavator.MineralMix; +import blusunrize.immersiveengineering.api.excavator.MineralMix.BiomeTagPredicate; import net.minecraft.data.recipes.RecipeOutput; -import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.BiomeTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.dimension.DimensionType; import net.neoforged.neoforge.common.conditions.ICondition; import java.util.ArrayList; import java.util.List; +import java.util.Set; public class MineralMixBuilder extends IERecipeBuilder { @@ -33,7 +35,7 @@ public class MineralMixBuilder extends IERecipeBuilder private final List spoils = new ArrayList<>(); private int weight; private float failChance; - private ResourceKey dimension; + private List biomeTagPredicates = new ArrayList<>(); private Block background = Blocks.STONE; private MineralMixBuilder() @@ -45,9 +47,21 @@ public static MineralMixBuilder builder() return new MineralMixBuilder(); } - public MineralMixBuilder dimension(ResourceKey dimension) + public MineralMixBuilder biomeCondition(Set> tags) { - this.dimension = dimension; + this.biomeTagPredicates.add(new BiomeTagPredicate(tags)); + return this; + } + + public MineralMixBuilder dimensionOverworld() + { + this.biomeTagPredicates.add(new BiomeTagPredicate(BiomeTags.IS_OVERWORLD)); + return this; + } + + public MineralMixBuilder dimensionNether() + { + this.biomeTagPredicates.add(new BiomeTagPredicate(BiomeTags.IS_NETHER)); return this; } @@ -118,7 +132,7 @@ public MineralMixBuilder addNetherSpoils() public void build(RecipeOutput out, ResourceLocation name) { MineralMix recipe = new MineralMix( - outputs, spoils, weight, failChance, List.of(dimension), background + outputs, spoils, weight, failChance, biomeTagPredicates, background ); out.accept(name, recipe, null, getConditions()); } diff --git a/src/main/java/blusunrize/immersiveengineering/common/crafting/serializers/MineralMixSerializer.java b/src/main/java/blusunrize/immersiveengineering/common/crafting/serializers/MineralMixSerializer.java index 8d56903324..18091dbf5a 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/crafting/serializers/MineralMixSerializer.java +++ b/src/main/java/blusunrize/immersiveengineering/common/crafting/serializers/MineralMixSerializer.java @@ -11,6 +11,7 @@ import blusunrize.immersiveengineering.api.crafting.IERecipeSerializer; import blusunrize.immersiveengineering.api.crafting.StackWithChance; import blusunrize.immersiveengineering.api.excavator.MineralMix; +import blusunrize.immersiveengineering.api.excavator.MineralMix.BiomeTagPredicate; import blusunrize.immersiveengineering.common.network.PacketUtils; import blusunrize.immersiveengineering.common.register.IEMultiblockLogic; import com.mojang.serialization.Codec; @@ -18,33 +19,38 @@ import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceKey; +import net.minecraft.tags.TagKey; import net.minecraft.util.ExtraCodecs; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.dimension.DimensionType; +import net.neoforged.neoforge.common.util.NeoForgeExtraCodecs; import javax.annotation.Nullable; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; public class MineralMixSerializer extends IERecipeSerializer { + public static final Codec BIOME_TAG_PREDICATE_CODEC = makeBiomePredicateCodec(); + private static final Codec CODEC = RecordCodecBuilder.create( inst -> inst.group( CHANCE_LIST.fieldOf("ores").forGetter(r -> r.outputs), CHANCE_LIST.fieldOf("spoils").forGetter(r -> r.spoils), Codec.INT.fieldOf("weight").forGetter(r -> r.weight), ExtraCodecs.strictOptionalField(Codec.FLOAT, "fail_chance", 0f).forGetter(r -> r.failChance), - ResourceKey.codec(Registries.DIMENSION_TYPE).listOf().fieldOf("dimensions").forGetter(r -> List.copyOf(r.dimensions)), + NeoForgeExtraCodecs.setOf(BIOME_TAG_PREDICATE_CODEC).fieldOf("biome_predicates").forGetter(r -> r.biomeTagPredicates), ExtraCodecs.strictOptionalField(BuiltInRegistries.BLOCK.byNameCodec(), "sample_background", Blocks.STONE).forGetter(r -> r.background) - ).apply(inst, (ores, spoils, weight, failChance, dimensions, background) -> { + ).apply(inst, (ores, spoils, weight, failChance, biomes, background) -> { double finalTotalChance = ores.stream().mapToDouble(StackWithChance::chance).sum(); ores = ores.stream().map(stack -> stack.recalculate(finalTotalChance)).toList(); double finalSpoilChance = spoils.stream().mapToDouble(StackWithChance::chance).sum(); spoils = spoils.stream().map(stack -> stack.recalculate(finalSpoilChance)).toList(); - return new MineralMix(ores, spoils, weight, failChance, dimensions, background); + return new MineralMix(ores, spoils, weight, failChance, biomes, background); }) ); @@ -68,12 +74,18 @@ public MineralMix fromNetwork(FriendlyByteBuf buffer) List spoils = PacketUtils.readList(buffer, StackWithChance::read); int weight = buffer.readInt(); float failChance = buffer.readFloat(); - int count = buffer.readInt(); - List> dimensions = new ArrayList<>(); - for(int i = 0; i < count; i++) - dimensions.add(ResourceKey.create(Registries.DIMENSION_TYPE, buffer.readResourceLocation())); + int totalPredicates = buffer.readInt(); + List biomes = new ArrayList<>(totalPredicates); + for(int i = 0; i < totalPredicates; i++) + { + int count = buffer.readInt(); + Set> tags = new HashSet<>(count); + for(int j = 0; j < count; j++) + tags.add(TagKey.create(Registries.BIOME, buffer.readResourceLocation())); + biomes.add(new BiomeTagPredicate(tags)); + } Block bg = PacketUtils.readRegistryElement(buffer, BuiltInRegistries.BLOCK); - return new MineralMix(outputs, spoils, weight, failChance, dimensions, bg); + return new MineralMix(outputs, spoils, weight, failChance, biomes, bg); } @Override @@ -83,9 +95,20 @@ public void toNetwork(FriendlyByteBuf buffer, MineralMix recipe) PacketUtils.writeList(buffer, recipe.spoils, StackWithChance::write); buffer.writeInt(recipe.weight); buffer.writeFloat(recipe.failChance); - buffer.writeInt(recipe.dimensions.size()); - for(ResourceKey dimension : recipe.dimensions) - buffer.writeResourceLocation(dimension.location()); + buffer.writeInt(recipe.biomeTagPredicates.size()); + for(BiomeTagPredicate biomes : recipe.biomeTagPredicates) + { + buffer.writeInt(biomes.tags().size()); + for(TagKey tag : biomes.tags()) + buffer.writeResourceLocation(tag.location()); + } PacketUtils.writeRegistryElement(buffer, BuiltInRegistries.BLOCK, recipe.background); } + + private static Codec makeBiomePredicateCodec() + { + return RecordCodecBuilder.create(inst -> inst.group( + NeoForgeExtraCodecs.setOf(TagKey.codec(Registries.BIOME)).fieldOf("biome_tags").forGetter(BiomeTagPredicate::tags) + ).apply(inst, BiomeTagPredicate::new)); + } } diff --git a/src/main/java/blusunrize/immersiveengineering/common/world/FeatureMineralVein.java b/src/main/java/blusunrize/immersiveengineering/common/world/FeatureMineralVein.java index cd48340163..7e8c3ae89f 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/world/FeatureMineralVein.java +++ b/src/main/java/blusunrize/immersiveengineering/common/world/FeatureMineralVein.java @@ -50,7 +50,7 @@ public boolean place(@Nonnull FeaturePlaceContext ctx) if(!veinGeneratedChunks.containsEntry(dimension, chunkPos)) { veinGeneratedChunks.put(dimension, chunkPos); - ExcavatorHandler.generatePotentialVein(realLevel, chunkPos, ctx.random()); + ExcavatorHandler.generatePotentialVein(realLevel, ctx.level(), chunkPos, ctx.random()); return true; } return false; From 579b7f6ded87ff572223bf01b1732afb3f8f2491 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 15:49:56 +0100 Subject: [PATCH 02/26] Adjust datagen to match --- .../data/recipes/MiscRecipes.java | 42 +++++----- .../9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e | 80 +++++++++---------- .../recipes/mineral/amethyst_crevasse.json | 8 +- .../recipes/mineral/ancient_debris.json | 8 +- .../recipes/mineral/ancient_seabed.json | 8 +- .../recipes/mineral/auricupride.json | 8 +- .../recipes/mineral/beryl.json | 8 +- .../recipes/mineral/bituminous_coal.json | 8 +- .../recipes/mineral/cassiterite.json | 8 +- .../recipes/mineral/chalcopyrite.json | 8 +- .../recipes/mineral/cinnabar.json | 8 +- .../recipes/mineral/cooled_lava_tube.json | 8 +- .../recipes/mineral/cooperite.json | 8 +- .../recipes/mineral/galena.json | 8 +- .../recipes/mineral/hardened_clay_pan.json | 8 +- .../recipes/mineral/igneous_rock.json | 8 +- .../recipes/mineral/laterite.json | 8 +- .../recipes/mineral/mephitic_quarzite.json | 8 +- .../recipes/mineral/nether_silt.json | 8 +- .../recipes/mineral/pentlandite.json | 8 +- .../recipes/mineral/silt.json | 8 +- .../recipes/mineral/uraninite.json | 8 +- .../recipes/mineral/wolframite.json | 8 +- 23 files changed, 187 insertions(+), 103 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index b8b9aa9e98..d2c5403f79 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -336,7 +336,7 @@ private void mineralMixes(RecipeOutput out) ResourceKey overworld = BuiltinDimensionTypes.OVERWORLD; ResourceKey nether = BuiltinDimensionTypes.NETHER; MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(Tags.Items.ORES_COAL, .8f) .ore(sulfur, .2f) @@ -345,7 +345,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/bituminous_coal")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addSoilSpoils() .ore(Items.CLAY, .5f) .ore(Items.SAND, .3f) @@ -354,7 +354,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/silt")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(Blocks.GRANITE, .3f) .ore(Blocks.DIORITE, .3f) @@ -364,7 +364,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/igneous_rock")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addSoilSpoils() .ore(Items.TERRACOTTA, .6f) .ore(Items.RED_SANDSTONE, .3f) @@ -373,7 +373,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/hardened_clay_pan")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addSeabedSpoils() .ore(Blocks.CALCITE, .65f) .ore(Blocks.DRIPSTONE_BLOCK, .3f) @@ -382,7 +382,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/ancient_seabed")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(Blocks.AMETHYST_BLOCK, .4f) .ore(Blocks.CALCITE, .3f) @@ -392,7 +392,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/amethyst_crevasse")); // Metals MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(iron, .35f) .ore(nickel, .35f) @@ -401,7 +401,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/pentlandite")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(iron, .35f) .ore(copper, .35f) @@ -410,7 +410,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/chalcopyrite")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(aluminum, .7f) .ore(iron, .2f) @@ -419,7 +419,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/laterite")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(copper, .75f) .ore(gold, .25f) @@ -427,7 +427,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.1f) .build(out, toRL("mineral/auricupride")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(lead, .4f) .ore(sulfur, .4f) @@ -436,7 +436,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/galena")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(redstone, .6f) .ore(sulfur, .4f) @@ -446,7 +446,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/cinnabar")); // Rare MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(uranium, .7f) .ore(lead, .3f) @@ -455,7 +455,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.15f) .build(out, toRL("mineral/uraninite")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .ore(emerald, .3f) .ore(prismarine, .7f) @@ -465,7 +465,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/beryl")); // Nether MineralMixBuilder.builder() - .dimension(nether) + .dimensionNether() .addNetherSpoils() .ore(Blocks.NETHER_QUARTZ_ORE, .6f) .ore(Blocks.NETHER_GOLD_ORE, .2f) @@ -475,7 +475,7 @@ private void mineralMixes(RecipeOutput out) .background(Blocks.NETHERRACK) .build(out, toRL("mineral/mephitic_quarzite")); MineralMixBuilder.builder() - .dimension(nether) + .dimensionNether() .addNetherSpoils() .ore(Blocks.POLISHED_BLACKSTONE_BRICKS, .4f) .ore(Blocks.POLISHED_BLACKSTONE, .3f) @@ -486,7 +486,7 @@ private void mineralMixes(RecipeOutput out) .background(Blocks.POLISHED_BLACKSTONE) .build(out, toRL("mineral/ancient_debris")); MineralMixBuilder.builder() - .dimension(nether) + .dimensionNether() .addNetherSpoils() .ore(Items.SOUL_SOIL, .5f) .ore(Items.SOUL_SAND, .3f) @@ -496,7 +496,7 @@ private void mineralMixes(RecipeOutput out) .background(Blocks.SOUL_SOIL) .build(out, toRL("mineral/nether_silt")); MineralMixBuilder.builder() - .dimension(nether) + .dimensionNether() .addNetherSpoils() .ore(Items.MAGMA_BLOCK, .5f) .ore(Items.SMOOTH_BASALT, .3f) @@ -508,7 +508,7 @@ private void mineralMixes(RecipeOutput out) // Compat MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .addCondition(getTagCondition(tin)) .ore(tin, 1) @@ -516,7 +516,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .build(out, toRL("mineral/cassiterite")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .addCondition(getTagCondition(platinum)) .ore(platinum, .5f) @@ -526,7 +526,7 @@ private void mineralMixes(RecipeOutput out) .failchance(.1f) .build(out, toRL("mineral/cooperite")); MineralMixBuilder.builder() - .dimension(overworld) + .dimensionOverworld() .addOverworldSpoils() .addCondition(getTagCondition(tungsten)) .ore(tungsten, .5f) diff --git a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e index 43727684dd..71a0193dfc 100644 --- a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -58,12 +58,12 @@ f84646d067f3c644f3fce44c7f5c4a6cc6a5c37f data/immersiveengineering/advancements/ 64ddb3e2d6284e68c07c62f16ba0f59faafd1970 data/immersiveengineering/advancements/recipes/misc/crafting/coil_hv.json f0d4fcdbfd2eb320acaec3c3e64ee2642689cee4 data/immersiveengineering/advancements/recipes/misc/crafting/coil_lv.json 0a2d7a09660e0aeb6c94883f60b463f6960b1428 data/immersiveengineering/advancements/recipes/misc/crafting/coil_mv.json -c6aa5037b1c61fed620baf2f0f14580e947850be data/immersiveengineering/advancements/recipes/misc/crafting/coke_from_slab.json -fe4a1be1e59336871a98fbea5bdb3d04cc2a0ff3 data/immersiveengineering/advancements/recipes/misc/crafting/coke_to_coal_coke.json -ea07f6304d61f834e71900acf7c1c3954552ec59 data/immersiveengineering/advancements/recipes/misc/crafting/coke_to_slab.json 8c6e3c5ea5f2bcf64b3657280d9eb633266ddc6a data/immersiveengineering/advancements/recipes/misc/crafting/cokebrick.json dcdd01c41ada01ae050ffe748082d18f8f7f33c9 data/immersiveengineering/advancements/recipes/misc/crafting/cokebrick_from_slab.json 5914dcf4650bcf0d48811ebbdce89cd6f517a67f data/immersiveengineering/advancements/recipes/misc/crafting/cokebrick_to_slab.json +c6aa5037b1c61fed620baf2f0f14580e947850be data/immersiveengineering/advancements/recipes/misc/crafting/coke_from_slab.json +fe4a1be1e59336871a98fbea5bdb3d04cc2a0ff3 data/immersiveengineering/advancements/recipes/misc/crafting/coke_to_coal_coke.json +ea07f6304d61f834e71900acf7c1c3954552ec59 data/immersiveengineering/advancements/recipes/misc/crafting/coke_to_slab.json 4e49b0226a18a5f20ddf94b1a6399eb23757bd0f data/immersiveengineering/advancements/recipes/misc/crafting/component_iron.json 5c15561a0eb67d531a6b1d3f793df87062dafb0f data/immersiveengineering/advancements/recipes/misc/crafting/component_steel.json e1fa87d2b7fa49b2282fe28788d0d7fa90a7fb3a data/immersiveengineering/advancements/recipes/misc/crafting/concrete.json @@ -137,7 +137,6 @@ ff9f8d886f3bba267ec5d405331baed7b958e05e data/immersiveengineering/advancements/ 8f3adb01da09ffc2306e41e9c41bf094ce650110 data/immersiveengineering/advancements/recipes/misc/crafting/gunpowder_from_dusts.json 1bfe610229f84ac4dee1bf21fffe85bfd655df62 data/immersiveengineering/advancements/recipes/misc/crafting/hammer.json 0052463437825d4d24cc0410dc061a981f7f6149 data/immersiveengineering/advancements/recipes/misc/crafting/heavy_engineering.json -d5d12a4b8538167afbe6d864c0bbaf94db45ad6e data/immersiveengineering/advancements/recipes/misc/crafting/hemp_fabric.json f579560b1651705c001a14bdb36c700e35a4db8b data/immersiveengineering/advancements/recipes/misc/crafting/hempcrete.json 632be721ac625a8c033dd403860ea6c9678dddf9 data/immersiveengineering/advancements/recipes/misc/crafting/hempcrete_brick.json de675c0d96f1091a7f8abd014f557cb3b2227760 data/immersiveengineering/advancements/recipes/misc/crafting/hempcrete_brick_from_slab.json @@ -145,6 +144,7 @@ de675c0d96f1091a7f8abd014f557cb3b2227760 data/immersiveengineering/advancements/ 3dacb8097d27f76af37c36510e29c8e6361ca86d data/immersiveengineering/advancements/recipes/misc/crafting/hempcrete_from_slab.json 1b3987af42b4b571df8f71c930bbe7748c6667ac data/immersiveengineering/advancements/recipes/misc/crafting/hempcrete_pillar.json 239090b6869d989b5629fbc332dbfba8147449f7 data/immersiveengineering/advancements/recipes/misc/crafting/hempcrete_to_slab.json +d5d12a4b8538167afbe6d864c0bbaf94db45ad6e data/immersiveengineering/advancements/recipes/misc/crafting/hemp_fabric.json a18d5ffad6285131eb6f132b7039233d1e6bebfe data/immersiveengineering/advancements/recipes/misc/crafting/hoe_steel.json c38fa8f3b7bcc6bdfd16b6013ec55efd76ec7c50 data/immersiveengineering/advancements/recipes/misc/crafting/ingot_aluminum_to_nugget_aluminum.json 6fd7cfe15cdb9e1f176ae3293225fabb8d0004c7 data/immersiveengineering/advancements/recipes/misc/crafting/ingot_aluminum_to_storage_aluminum.json @@ -432,11 +432,6 @@ d3fcb2e7cb133e5982f76473198abad941d2644f data/immersiveengineering/advancements/ e17be8fa078d540468db2c74a2df1ef9753a355d data/immersiveengineering/advancements/recipes/misc/crafting/windmill.json 841f785d4ee2096576b94ed6a1e8644be1bfa10d data/immersiveengineering/advancements/recipes/misc/crafting/windmill_blade.json ecad670d4dbeed2978409354d004070596b6f2ae data/immersiveengineering/advancements/recipes/misc/crafting/windmill_sail.json -18e3cfb84f2f6824c4f6ca74554a0c7e4dc9c831 data/immersiveengineering/advancements/recipes/misc/crafting/wire_aluminum.json -3a792d3d19a57487077fd58cfba3fbc30cbfd853 data/immersiveengineering/advancements/recipes/misc/crafting/wire_copper.json -9bc58d965efd7f3d2647101c499f4af4e068f0ff data/immersiveengineering/advancements/recipes/misc/crafting/wire_electrum.json -febf0a61ae55708b3e173d2d326f4ff82497eb86 data/immersiveengineering/advancements/recipes/misc/crafting/wire_lead.json -afcd34a5fecb3d084360759fb82449636e05e0d8 data/immersiveengineering/advancements/recipes/misc/crafting/wire_steel.json 626bbb6e01ef6c9a2957cdc2091cdf04782b6edf data/immersiveengineering/advancements/recipes/misc/crafting/wirecoil_copper.json f7fa7db6728717aedcef0c4cdec270e55acf40e7 data/immersiveengineering/advancements/recipes/misc/crafting/wirecoil_copper_ins.json 20736d3dab32e11c1a5db6b08acd4b476d5a1e99 data/immersiveengineering/advancements/recipes/misc/crafting/wirecoil_electrum.json @@ -446,6 +441,11 @@ aace424f1f0ab9789e8d48da94584460d0c75019 data/immersiveengineering/advancements/ 98280ecd74e105eaafb904588222f7f0b636f436 data/immersiveengineering/advancements/recipes/misc/crafting/wirecoil_structure_rope.json 491e1e8c6cb2fbfa60f4c290a836a9386026b192 data/immersiveengineering/advancements/recipes/misc/crafting/wirecoil_structure_steel.json 2cbc4bbe332634cfc37129e78588cf4a8f5723a3 data/immersiveengineering/advancements/recipes/misc/crafting/wirecutter.json +18e3cfb84f2f6824c4f6ca74554a0c7e4dc9c831 data/immersiveengineering/advancements/recipes/misc/crafting/wire_aluminum.json +3a792d3d19a57487077fd58cfba3fbc30cbfd853 data/immersiveengineering/advancements/recipes/misc/crafting/wire_copper.json +9bc58d965efd7f3d2647101c499f4af4e068f0ff data/immersiveengineering/advancements/recipes/misc/crafting/wire_electrum.json +febf0a61ae55708b3e173d2d326f4ff82497eb86 data/immersiveengineering/advancements/recipes/misc/crafting/wire_lead.json +afcd34a5fecb3d084360759fb82449636e05e0d8 data/immersiveengineering/advancements/recipes/misc/crafting/wire_steel.json bc481b97287ce29813871efa40566f10c347053b data/immersiveengineering/advancements/recipes/misc/crafting/wooden_barrel.json ed3baa2742992918096c1568b51cc6ab48aedc46 data/immersiveengineering/advancements/recipes/misc/crafting/wooden_grip.json af7db1f38fee9377cc9a9c623139b52734b0d7e2 data/immersiveengineering/advancements/recipes/misc/crafting/workbench.json @@ -572,7 +572,6 @@ a3f6cee5cc87060fb32b5cdfdaab82f60945e22c data/immersiveengineering/recipes/alloy 39581c670d498b26db6814c3ac0a2a182061a05b data/immersiveengineering/recipes/alloysmelter/invar.json 6473fef49df88ab3d966bfedd18c8dc42348ba6b data/immersiveengineering/recipes/alloysmelter/manyullyn.json 24df0dc3754622e1caa8b255ce550d2440e1c32d data/immersiveengineering/recipes/alloysmelter/rose_gold.json -729fe94b68ff45775d1a82961f1070a89b908ec8 data/immersiveengineering/recipes/arc_recycling_list.json fa4574673334848505f05468f0d5f923d2967082 data/immersiveengineering/recipes/arcfurnace/alloy_brass.json 586653364013f1aa1a772eaaf285114f10c7bb26 data/immersiveengineering/recipes/arcfurnace/alloy_bronze.json ee893dcdd39fd4ae2c41072327911da4af7df43f data/immersiveengineering/recipes/arcfurnace/alloy_constantan.json @@ -651,6 +650,7 @@ da2f06d281cb9c289613f89bd1aadca3678756a1 data/immersiveengineering/recipes/arcfu 6e8f3e32cb7af5921e486093361b8fd067094cca data/immersiveengineering/recipes/arcfurnace/raw_ore_uranium.json 6bc6a56a456761a3e3453590fe97791e21007177 data/immersiveengineering/recipes/arcfurnace/raw_ore_zinc.json fa318281ba90831f00fd96d7a635724521c550e8 data/immersiveengineering/recipes/arcfurnace/steel.json +729fe94b68ff45775d1a82961f1070a89b908ec8 data/immersiveengineering/recipes/arc_recycling_list.json 57cea40c8ea9adda84bfa3db1c41716ca306281a data/immersiveengineering/recipes/blastfurnace/fuel_charcoal.json 41219c534363190f7c920fc57e32fdafb91a115f data/immersiveengineering/recipes/blastfurnace/fuel_charcoal_block.json 17bc8061148739e73c1e94d6fbfd10af552a34dc data/immersiveengineering/recipes/blastfurnace/fuel_coke.json @@ -802,12 +802,12 @@ f321fb83f033e7e95a6378c3d656ac3fefcd191d data/immersiveengineering/recipes/craft c68c5fc78373b5dabdb1cddd0957f6f0144c1368 data/immersiveengineering/recipes/crafting/coil_hv.json a8fea19024e001bdefd1e2ab773d5300f5cd5b08 data/immersiveengineering/recipes/crafting/coil_lv.json 192431d0fd003dbd12ed57996649c56b6bc81e94 data/immersiveengineering/recipes/crafting/coil_mv.json -6a26a7e5f22082a1efd93cfd01dc338b545a980b data/immersiveengineering/recipes/crafting/coke_from_slab.json -4e02aa1fac7f16ee9c2b7d1e17fcd2ab312821c3 data/immersiveengineering/recipes/crafting/coke_to_coal_coke.json -ae030f4b804b178c68a16f605aa981dde4bc6a45 data/immersiveengineering/recipes/crafting/coke_to_slab.json 1c8ef81b99b390cf36e6ba225e8b219f40386316 data/immersiveengineering/recipes/crafting/cokebrick.json 030f491f5b2c06059b16e45ed439ea8c17706245 data/immersiveengineering/recipes/crafting/cokebrick_from_slab.json 55dd6ff7423d09f9c9bb84e230fe57a067853db7 data/immersiveengineering/recipes/crafting/cokebrick_to_slab.json +6a26a7e5f22082a1efd93cfd01dc338b545a980b data/immersiveengineering/recipes/crafting/coke_from_slab.json +4e02aa1fac7f16ee9c2b7d1e17fcd2ab312821c3 data/immersiveengineering/recipes/crafting/coke_to_coal_coke.json +ae030f4b804b178c68a16f605aa981dde4bc6a45 data/immersiveengineering/recipes/crafting/coke_to_slab.json d6ebdb021bf6f06eeed1db1dc5341a8efcc9d7e3 data/immersiveengineering/recipes/crafting/component_iron.json 6061561eaf1c49fd3c118924676caca5ba4753a2 data/immersiveengineering/recipes/crafting/component_steel.json 2ff6d94bd2fd633d0d7a758b6c313af1b9d210dd data/immersiveengineering/recipes/crafting/concrete.json @@ -897,7 +897,6 @@ dd41df5717e3473c7cfc5b3aa9f16d356bee015a data/immersiveengineering/recipes/craft 35b4e1a5ebe1d9ad7be8b57d4b73d60aa7ef3044 data/immersiveengineering/recipes/crafting/hammercrushing_uranium.json 9537925b306abf8b3d7c44e33bf82bc4a686d595 data/immersiveengineering/recipes/crafting/hammercrushing_zinc.json aa3622d5e625263c9f564f26183013d04d51e4d6 data/immersiveengineering/recipes/crafting/heavy_engineering.json -0a87112509cd14cdf7c8ec664572ddb556e18de8 data/immersiveengineering/recipes/crafting/hemp_fabric.json fda1a62a273637813bf76927807f43e5551373ec data/immersiveengineering/recipes/crafting/hempcrete.json d0b79507676f142ad51a5689ae635355d403f93d data/immersiveengineering/recipes/crafting/hempcrete_brick.json 899ad9901675f2e2f150ab7681edcca70954d434 data/immersiveengineering/recipes/crafting/hempcrete_brick_from_slab.json @@ -905,6 +904,7 @@ f824beef88b808eb0e2d7d1d2ee0ce17d8855ccf data/immersiveengineering/recipes/craft 4618189bdd56103de7a16470539a1e739e1b4f81 data/immersiveengineering/recipes/crafting/hempcrete_from_slab.json f61146bb872207693984373f1e684a8569b1ef77 data/immersiveengineering/recipes/crafting/hempcrete_pillar.json 4c3b260c9b1e8588ae48dd2d2e95e7161a85d015 data/immersiveengineering/recipes/crafting/hempcrete_to_slab.json +0a87112509cd14cdf7c8ec664572ddb556e18de8 data/immersiveengineering/recipes/crafting/hemp_fabric.json 2e3ec22e4dd5c2ba3a6b7faf344e92a30d9899ee data/immersiveengineering/recipes/crafting/hoe_steel.json 38da3571b445b66e9a4f65b98c941e287fbbdfa1 data/immersiveengineering/recipes/crafting/ingot_aluminum_to_nugget_aluminum.json 906310786c7099c0ca3c51caa03306d7c0d3ae65 data/immersiveengineering/recipes/crafting/ingot_aluminum_to_storage_aluminum.json @@ -1207,11 +1207,6 @@ fe07179e19b5f0a47cd4d0c0245e43d0401b4a42 data/immersiveengineering/recipes/craft 965950e9d3562910d24d9f54304fe208de8fb20c data/immersiveengineering/recipes/crafting/windmill.json 8d688af33cb129f810d1dced3d5676eed7d4658b data/immersiveengineering/recipes/crafting/windmill_blade.json f906acb60120103ab14394e8dfdd0f3c4e25275b data/immersiveengineering/recipes/crafting/windmill_sail.json -a39c34ef43972ae02546f6228ec45bcf7e170d3b data/immersiveengineering/recipes/crafting/wire_aluminum.json -d81dde817b1d44d656b30ec95ff49987429f97ec data/immersiveengineering/recipes/crafting/wire_copper.json -9197d06d8dbf22366c3b862b3089fcf62f2f3e3e data/immersiveengineering/recipes/crafting/wire_electrum.json -4403f581955620c92d179c20c47527a845b96a82 data/immersiveengineering/recipes/crafting/wire_lead.json -96ab0dc2464f6b818afb438ff2fc1e499f7de718 data/immersiveengineering/recipes/crafting/wire_steel.json 258153ee7002ced906188fd40e2b571e069ccbea data/immersiveengineering/recipes/crafting/wirecoil_copper.json d3218b972c3f98020fe7d9f1d2963855aa9df013 data/immersiveengineering/recipes/crafting/wirecoil_copper_ins.json 0419d104139ea7911e671d8e9384cfd8503fd1fc data/immersiveengineering/recipes/crafting/wirecoil_electrum.json @@ -1221,6 +1216,11 @@ d3218b972c3f98020fe7d9f1d2963855aa9df013 data/immersiveengineering/recipes/craft 6973b8a90c08f9704d00eef5613db7ab8d7a640e data/immersiveengineering/recipes/crafting/wirecoil_structure_rope.json c60c634f18f417d417130b9048a3562188f6fbe0 data/immersiveengineering/recipes/crafting/wirecoil_structure_steel.json 94f3c1a1568dca496cff453a04e53a0a3d597bba data/immersiveengineering/recipes/crafting/wirecutter.json +a39c34ef43972ae02546f6228ec45bcf7e170d3b data/immersiveengineering/recipes/crafting/wire_aluminum.json +d81dde817b1d44d656b30ec95ff49987429f97ec data/immersiveengineering/recipes/crafting/wire_copper.json +9197d06d8dbf22366c3b862b3089fcf62f2f3e3e data/immersiveengineering/recipes/crafting/wire_electrum.json +4403f581955620c92d179c20c47527a845b96a82 data/immersiveengineering/recipes/crafting/wire_lead.json +96ab0dc2464f6b818afb438ff2fc1e499f7de718 data/immersiveengineering/recipes/crafting/wire_steel.json 39204f6844934e082eb4e71ce8cfeb1543fbe703 data/immersiveengineering/recipes/crafting/wooden_barrel.json 6857f0e1fd5292da9d8298d6fcf56cbd6cfb9a7c data/immersiveengineering/recipes/crafting/wooden_grip.json 517cc7a14a92bd5324367f4f4cf1847cb5134d82 data/immersiveengineering/recipes/crafting/workbench.json @@ -1439,27 +1439,27 @@ f2ee6e0647afeb9aca70247a45fc5dee53bdf9be data/immersiveengineering/recipes/metal ead2f5c29c05c8db9adeaa77bdb45444ad3555ee data/immersiveengineering/recipes/metalpress/wire_tungsten.json 0cbfca730c5193359cb65562508e985ef240eef1 data/immersiveengineering/recipes/metalpress/wire_uranium.json 93043898e47c1291c4e383a8201f729e7defae06 data/immersiveengineering/recipes/metalpress/wire_zinc.json -0e921f9aa8c3018f37425ee51d2d1f4561e203ea data/immersiveengineering/recipes/mineral/amethyst_crevasse.json -1ea77b78d2d68da402c7d1c84055b3cadfe2f306 data/immersiveengineering/recipes/mineral/ancient_debris.json -4be2236140850a89d91f0614d6fcf346d6ca2b08 data/immersiveengineering/recipes/mineral/ancient_seabed.json -8572edb442b1427b6fb67f7e996a35ef800b6888 data/immersiveengineering/recipes/mineral/auricupride.json -91bc64a2fd31562fda66fc51740c7e03b500d4ad data/immersiveengineering/recipes/mineral/beryl.json -a9b9df57983084b5938d1c3050875dc9d2868c44 data/immersiveengineering/recipes/mineral/bituminous_coal.json -c635676a3232695f8f96fba503ab957d9d2a658e data/immersiveengineering/recipes/mineral/cassiterite.json -d90176122ef4d2f0b461771abcbcda7184ce4c4d data/immersiveengineering/recipes/mineral/chalcopyrite.json -5f620b2ee76fb9b76db7768c297de05a73fe620e data/immersiveengineering/recipes/mineral/cinnabar.json -15a939676dc4813f40ea7e49d29b6d278fe05cd4 data/immersiveengineering/recipes/mineral/cooled_lava_tube.json -10b17cdd3207853b684a66b3e79b5ccc076dd643 data/immersiveengineering/recipes/mineral/cooperite.json -547fc1a1516122b9aafc5e3a6e17ab11d5a5f66d data/immersiveengineering/recipes/mineral/galena.json -6ba1d9c80cf6e752c3528d2dbe23cfce8a27f3d3 data/immersiveengineering/recipes/mineral/hardened_clay_pan.json -24d514b43d1e5f24066f7d689b7800462fc5cd55 data/immersiveengineering/recipes/mineral/igneous_rock.json -c0c4022da09541dcb761f6d14df49b543cf0ece0 data/immersiveengineering/recipes/mineral/laterite.json -98a8e3e0a59d36eb09bd1ed37824c927caf3fe61 data/immersiveengineering/recipes/mineral/mephitic_quarzite.json -6ef7da9c22d040254f6e74466962bd18491fe214 data/immersiveengineering/recipes/mineral/nether_silt.json -0049c15342d44994fe3e85532a042253f94247f1 data/immersiveengineering/recipes/mineral/pentlandite.json -1ea99c1e1b30f250ee1e045b3aef992050ba5663 data/immersiveengineering/recipes/mineral/silt.json -44f1c71f497a39ab5342aa7ef408cab6c31f08a0 data/immersiveengineering/recipes/mineral/uraninite.json -6e9ff30d0bc319c35e56db27630f974e46ce21bc data/immersiveengineering/recipes/mineral/wolframite.json +07359d45256f73827b809721138626732b1b13da data/immersiveengineering/recipes/mineral/amethyst_crevasse.json +2a4e810fcc07e8c31b390930828d046045465eab data/immersiveengineering/recipes/mineral/ancient_debris.json +7e6b884440ab912610020a26e6ef2fa452260828 data/immersiveengineering/recipes/mineral/ancient_seabed.json +7b59c1cbeb987f14d5b286c516edd0407455dcb9 data/immersiveengineering/recipes/mineral/auricupride.json +25367a44c2ec3a813eed089148cd110777d76c05 data/immersiveengineering/recipes/mineral/beryl.json +88f7d598016e19fa333429f9190dd4ba80d74d6e data/immersiveengineering/recipes/mineral/bituminous_coal.json +b80bccc0d054c6b7e7f74347e5df137cc7c1108d data/immersiveengineering/recipes/mineral/cassiterite.json +17c45d236339ad63c12e8f74de0b3db6e62f1960 data/immersiveengineering/recipes/mineral/chalcopyrite.json +9b3ce8ca5b6f3edd310af58ad2fa76b24089ef78 data/immersiveengineering/recipes/mineral/cinnabar.json +36c6f03e98423627a80a692afdf898e14df3fe33 data/immersiveengineering/recipes/mineral/cooled_lava_tube.json +7fff7021c1bfa22fa7ea305f11778421151ec0d6 data/immersiveengineering/recipes/mineral/cooperite.json +203cb863c65d90df2982a240f2b992b2d1702e16 data/immersiveengineering/recipes/mineral/galena.json +99d362e93d0a3a23da84b1cd4e4ae59caa8adc86 data/immersiveengineering/recipes/mineral/hardened_clay_pan.json +aaae17ec90d6570502f18c9375b9bce8bf0a17fd data/immersiveengineering/recipes/mineral/igneous_rock.json +3b692d0e83da191d4ee9b508b556d795bf5345cd data/immersiveengineering/recipes/mineral/laterite.json +4558a3d58ead280f9b113835e404327625570507 data/immersiveengineering/recipes/mineral/mephitic_quarzite.json +efa5bf69af8f6115ab9eb7117261fe2e110201d0 data/immersiveengineering/recipes/mineral/nether_silt.json +b433023f141edc382d6a4669261c58b065539f09 data/immersiveengineering/recipes/mineral/pentlandite.json +c53e0a17ab50626e86bde74f1ad7ae39f358ebf7 data/immersiveengineering/recipes/mineral/silt.json +ab87809f431a8c88dac00e38a6be88722e5a4e07 data/immersiveengineering/recipes/mineral/uraninite.json +1a9863318fded18fd56a0793d1b33103374ae28a data/immersiveengineering/recipes/mineral/wolframite.json 8194166fddfc71775216dcad285b1b5191d3158f data/immersiveengineering/recipes/mixer/concrete.json 9e2588c33fdfde6ed553f448873b835839c6f9a3 data/immersiveengineering/recipes/mixer/herbicide.json c99c046ee9a58554ecbffdb62b33dba39c856867 data/immersiveengineering/recipes/mixer/redstone_acid.json diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/amethyst_crevasse.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/amethyst_crevasse.json index ed93dc936a..5780ce3e14 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/amethyst_crevasse.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/amethyst_crevasse.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.1, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_debris.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_debris.json index 1256865102..64dca5e118 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_debris.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_debris.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:the_nether" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_nether" + ] + } ], "fail_chance": 0.5, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json index a84069e0e9..d892b5a346 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json index c8fe739c8e..8ea75ccf84 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.1, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json index 5a85947c1e..d3ab39e2c6 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.2, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/bituminous_coal.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/bituminous_coal.json index b7de0c8418..7b1501cd72 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/bituminous_coal.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/bituminous_coal.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/cassiterite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/cassiterite.json index 9393a84ca5..53e22fccf8 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/cassiterite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/cassiterite.json @@ -9,8 +9,12 @@ } ], "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json index 0444ea0fc6..79b4206f86 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json index 0e2987e36c..e81c8d6581 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.1, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/cooled_lava_tube.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/cooled_lava_tube.json index ad0821642b..a8a5b5c2ed 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/cooled_lava_tube.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/cooled_lava_tube.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:the_nether" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_nether" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/cooperite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/cooperite.json index 74c931defc..a6c6f47a77 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/cooperite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/cooperite.json @@ -9,8 +9,12 @@ } ], "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.1, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json index 12b72ad4f6..4a7d9ddd9a 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json index e2ccca9651..98392d9523 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/igneous_rock.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/igneous_rock.json index b839ca7745..6f679b59aa 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/igneous_rock.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/igneous_rock.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json index a25eead2a7..2e3b9bb67a 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/mephitic_quarzite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/mephitic_quarzite.json index 9d124c7c39..6b228f2a87 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/mephitic_quarzite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/mephitic_quarzite.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:the_nether" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_nether" + ] + } ], "fail_chance": 0.15, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/nether_silt.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/nether_silt.json index 64a1af7ee9..bdf8f70bfb 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/nether_silt.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/nether_silt.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:the_nether" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_nether" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json index a4bf5a1471..e7fc14419b 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json index b7ef2e77da..6253673523 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json index 6f36a742b3..a23d744551 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json @@ -1,7 +1,11 @@ { "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.15, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json index 32c00d1132..11fb32b31b 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json @@ -9,8 +9,12 @@ } ], "type": "immersiveengineering:mineral_mix", - "dimensions": [ - "minecraft:overworld" + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } ], "fail_chance": 0.1, "ores": [ From e4aa1c9df95b2fe8d2785bdbe3f16ba49c25a340 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 15:54:45 +0100 Subject: [PATCH 03/26] Change text generation for the manual page on mineral veins --- .../immersiveengineering/client/IEManual.java | 43 +++++++++++-------- .../immersiveengineering/lang/en_us.json | 11 +++-- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/main/java/blusunrize/immersiveengineering/client/IEManual.java b/src/main/java/blusunrize/immersiveengineering/client/IEManual.java index c9cdd37652..52677ebbae 100644 --- a/src/main/java/blusunrize/immersiveengineering/client/IEManual.java +++ b/src/main/java/blusunrize/immersiveengineering/client/IEManual.java @@ -37,20 +37,17 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.resources.language.I18n; import net.minecraft.core.NonNullList; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.GsonHelper; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeHolder; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.dimension.DimensionType; import net.minecraft.world.level.material.Fluid; import net.neoforged.fml.ModLoadingContext; import net.neoforged.fml.VersionChecker; import net.neoforged.fml.VersionChecker.CheckResult; import net.neoforged.fml.VersionChecker.Status; -import net.minecraft.core.registries.BuiltInRegistries; import org.apache.maven.artifact.versioning.ComparableVersion; import java.io.IOException; @@ -189,20 +186,25 @@ private static Pair> getMineralVeinTexts() for(RecipeHolder holder : mineralsToAdd) { final MineralMix mineral = holder.value(); - String dimensionString; - if(mineral.dimensions!=null&&!mineral.dimensions.isEmpty()) - { - StringBuilder validDims = new StringBuilder(); - for(ResourceKey dim : mineral.dimensions) - validDims.append((!validDims.isEmpty())?", ": "") - .append(""); - dimensionString = I18n.get("ie.manual.entry.mineralsDimValid", toName.apply(holder), validDims.toString()); - } - else - dimensionString = I18n.get("ie.manual.entry.mineralsDimAny", toName.apply(holder)); + // Assemble text for biome limitations + String biomeText = mineral.biomeTagPredicates.stream().map( + biomeTagPredicate -> biomeTagPredicate.tags().stream().map(biomeTagKey -> { + // translate biome tags where possible, fall back to location path otherwise + String key = "ie.manual.entry.minerals.biome_tag."+biomeTagKey.location(); + if(I18n.exists(key)) + return I18n.get(key); + else + return biomeTagKey.location().getPath(); + }).reduce((s, s2) -> I18n.get("ie.manual.entry.minerals.biomes_or", s, s2)).orElse("") + ).reduce((s, s2) -> I18n.get("ie.manual.entry.minerals.biomes_and", s, s2)).orElse(""); + // Combine it with the name of the vein + String openingString = I18n.get( + "ie.manual.entry.minerals.biomes", + toName.apply(holder), + biomeText + ); + // Format output and spoils List formattedOutputs = new ArrayList<>(mineral.outputs); List formattedSpoils = new ArrayList<>(mineral.spoils); formattedOutputs.sort(Comparator.comparingDouble(i -> -i.chance())); @@ -238,7 +240,12 @@ private static Pair> getMineralVeinTexts() } specials.add(new SpecialElementData(holder.id().toString(), 0, new ManualElementItem(ManualHelper.getManual(), sortedOres))); - String desc = I18n.get("ie.manual.entry.minerals_desc", dimensionString, outputString.toString(), spoilString.toString()); + String desc = I18n.get( + "ie.manual.entry.minerals_desc", + openingString, + outputString.toString(), + spoilString.toString() + ); if(!text.isEmpty()) text.append(""); diff --git a/src/main/resources/assets/immersiveengineering/lang/en_us.json b/src/main/resources/assets/immersiveengineering/lang/en_us.json index 2f0c76f35f..a019106657 100644 --- a/src/main/resources/assets/immersiveengineering/lang/en_us.json +++ b/src/main/resources/assets/immersiveengineering/lang/en_us.json @@ -1389,11 +1389,16 @@ "ie.manual.entry.shaderList.noInfo": "You have not unlocked this shader yet!", "ie.manual.entry.shaderList.unlock": "Unlock this shader", "ie.manual.entry.shaderList.order": "Acquire:", - "ie.manual.entry.minerals_desc": "%1$s\nIt consists of: %2$s.\n\nIts spoils are:%3$s", - "ie.manual.entry.mineralsDimValid": "§l%1$s§r is a mineral vein that is found in the %2$s.", - "ie.manual.entry.mineralsDimInvalid": "§l%1$s§r is a mineral vein that is found anywhere but in the %2$s.", "ie.manual.entry.mineral_title": "Mineral Deposits", "ie.manual.entry.mineral_subtitle": "Oresome", + "ie.manual.entry.minerals_desc": "%1$s\nIt consists of: %2$s.\n\nIts spoils are:%3$s", + "ie.manual.entry.minerals.biomes": "§l%1$s§r is a mineral vein found in biomes that are %2$s.\n", + "ie.manual.entry.minerals.biomes_or": "%1$s or %2$s", + "ie.manual.entry.minerals.biomes_and": "%1$s and are %2$s", + "ie.manual.entry.minerals.biome_tag.minecraft:is_overworld": "in the overworld", + "ie.manual.entry.minerals.biome_tag.minecraft:is_nether": "in the nether", + "ie.manual.entry.minerals.biome_tag.minecraft:is_mountain": "mountainous", + "ie.manual.entry.minerals.biome_tag.minecraft:is_ocean": "oceanic", "ie.manual.newerVersion": " - New!", "ie.manual.currentVersion": " - Current", "ie.manual.entry.mineralsDimAny": "§l%1$s§r is a mineral vein that can be found in any dimension.", From d3d11ddf078d5010a82c144eaf472b27c2d7ea5f Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 16:07:21 +0100 Subject: [PATCH 04/26] Reorder data-creation for mineral veins No changes to content --- .../data/recipes/MiscRecipes.java | 125 +++++++++--------- 1 file changed, 64 insertions(+), 61 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index d2c5403f79..af89fd49e4 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -335,15 +335,7 @@ private void mineralMixes(RecipeOutput out) // Common things ResourceKey overworld = BuiltinDimensionTypes.OVERWORLD; ResourceKey nether = BuiltinDimensionTypes.NETHER; - MineralMixBuilder.builder() - .dimensionOverworld() - .addOverworldSpoils() - .ore(Tags.Items.ORES_COAL, .8f) - .ore(sulfur, .2f) - .ore(phosphorus, .2f, getTagCondition(phosphorus)) - .weight(25) - .failchance(.05f) - .build(out, toRL("mineral/bituminous_coal")); + // Rocks & decoration MineralMixBuilder.builder() .dimensionOverworld() .addSoilSpoils() @@ -390,16 +382,17 @@ private void mineralMixes(RecipeOutput out) .weight(10) .failchance(.1f) .build(out, toRL("mineral/amethyst_crevasse")); - // Metals + + // Core resources MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() - .ore(iron, .35f) - .ore(nickel, .35f) - .ore(sulfur, .3f) + .ore(Tags.Items.ORES_COAL, .8f) + .ore(sulfur, .2f) + .ore(phosphorus, .2f, getTagCondition(phosphorus)) .weight(25) .failchance(.05f) - .build(out, toRL("mineral/pentlandite")); + .build(out, toRL("mineral/bituminous_coal")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() @@ -412,12 +405,12 @@ private void mineralMixes(RecipeOutput out) MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() - .ore(aluminum, .7f) - .ore(iron, .2f) - .ore(titanium, .1f, getTagCondition(titanium)) - .weight(20) - .failchance(.05f) - .build(out, toRL("mineral/laterite")); + .ore(redstone, .6f) + .ore(sulfur, .4f) + .ore(mercury, .3f, getTagCondition(mercury)) + .weight(15) + .failchance(.1f) + .build(out, toRL("mineral/cinnabar")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() @@ -426,6 +419,15 @@ private void mineralMixes(RecipeOutput out) .weight(30) .failchance(.1f) .build(out, toRL("mineral/auricupride")); + MineralMixBuilder.builder() + .dimensionOverworld() + .addOverworldSpoils() + .ore(aluminum, .7f) + .ore(iron, .2f) + .ore(titanium, .1f, getTagCondition(titanium)) + .weight(20) + .failchance(.05f) + .build(out, toRL("mineral/laterite")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() @@ -438,13 +440,23 @@ private void mineralMixes(RecipeOutput out) MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() - .ore(redstone, .6f) - .ore(sulfur, .4f) - .ore(mercury, .3f, getTagCondition(mercury)) - .weight(15) - .failchance(.1f) - .build(out, toRL("mineral/cinnabar")); - // Rare + .ore(iron, .35f) + .ore(nickel, .35f) + .ore(sulfur, .3f) + .weight(25) + .failchance(.05f) + .build(out, toRL("mineral/pentlandite")); + + // Rare resources + MineralMixBuilder.builder() + .dimensionOverworld() + .addOverworldSpoils() + .ore(emerald, .3f) + .ore(prismarine, .7f) + .ore(aquamarine, .3f, getTagCondition(aquamarine)) + .weight(5) + .failchance(.2f) + .build(out, toRL("mineral/beryl")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() @@ -457,12 +469,32 @@ private void mineralMixes(RecipeOutput out) MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() - .ore(emerald, .3f) - .ore(prismarine, .7f) - .ore(aquamarine, .3f, getTagCondition(aquamarine)) + .addCondition(getTagCondition(tungsten)) // Vein is only found when tungsten is present + .ore(tungsten, .5f) + .ore(iron, .5f) + .ore(manganese, .5f, getTagCondition(manganese)) .weight(5) - .failchance(.2f) - .build(out, toRL("mineral/beryl")); + .failchance(.1f) + .build(out, toRL("mineral/wolframite")); + MineralMixBuilder.builder() + .dimensionOverworld() + .addOverworldSpoils() + .addCondition(getTagCondition(tin)) // Vein is only found when tungsten is present + .ore(tin, 1) + .weight(20) + .failchance(.05f) + .build(out, toRL("mineral/cassiterite")); + MineralMixBuilder.builder() + .dimensionOverworld() + .addOverworldSpoils() + .addCondition(getTagCondition(platinum)) // Vein is only found when platinum is present + .ore(platinum, .5f) + .ore(paladium, .5f, getTagCondition(paladium)) + .ore(nickel, .5f) + .weight(5) + .failchance(.1f) + .build(out, toRL("mineral/cooperite")); + // Nether MineralMixBuilder.builder() .dimensionNether() @@ -506,35 +538,6 @@ private void mineralMixes(RecipeOutput out) .background(Blocks.NETHERRACK) .build(out, toRL("mineral/cooled_lava_tube")); - // Compat - MineralMixBuilder.builder() - .dimensionOverworld() - .addOverworldSpoils() - .addCondition(getTagCondition(tin)) - .ore(tin, 1) - .weight(20) - .failchance(.05f) - .build(out, toRL("mineral/cassiterite")); - MineralMixBuilder.builder() - .dimensionOverworld() - .addOverworldSpoils() - .addCondition(getTagCondition(platinum)) - .ore(platinum, .5f) - .ore(paladium, .5f, getTagCondition(paladium)) - .ore(nickel, .5f) - .weight(5) - .failchance(.1f) - .build(out, toRL("mineral/cooperite")); - MineralMixBuilder.builder() - .dimensionOverworld() - .addOverworldSpoils() - .addCondition(getTagCondition(tungsten)) - .ore(tungsten, .5f) - .ore(iron, .5f) - .ore(manganese, .5f, getTagCondition(manganese)) - .weight(5) - .failchance(.1f) - .build(out, toRL("mineral/wolframite")); //todo // Lapis // Cinnabar From 8cba02dce9fb19fc7cd207f961eed873b0ca797a Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 16:11:21 +0100 Subject: [PATCH 05/26] Add new mineral vein: Banded Iron --- .../data/recipes/MiscRecipes.java | 8 +++ .../recipes/mineral/banded_iron.json | 55 +++++++++++++++++++ .../immersiveengineering/lang/en_us.json | 1 + 3 files changed, 64 insertions(+) create mode 100644 src/generated/resources/data/immersiveengineering/recipes/mineral/banded_iron.json diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index af89fd49e4..c75308d998 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -393,6 +393,14 @@ private void mineralMixes(RecipeOutput out) .weight(25) .failchance(.05f) .build(out, toRL("mineral/bituminous_coal")); + MineralMixBuilder.builder() + .dimensionOverworld() + .addOverworldSpoils() + .ore(iron, .8f) + .ore(Blocks.DRIPSTONE_BLOCK, .2f) + .weight(25) + .failchance(.05f) + .build(out, toRL("mineral/banded_iron")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/banded_iron.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/banded_iron.json new file mode 100644 index 0000000000..e2f8a10633 --- /dev/null +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/banded_iron.json @@ -0,0 +1,55 @@ +{ + "type": "immersiveengineering:mineral_mix", + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } + ], + "fail_chance": 0.05, + "ores": [ + { + "chance": 0.8, + "conditions": [], + "output": { + "tag": "forge:ores/iron" + } + }, + { + "chance": 0.2, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:dripstone_block" + } + } + ], + "spoils": [ + { + "chance": 0.2, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:gravel" + } + }, + { + "chance": 0.5, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:cobblestone" + } + }, + { + "chance": 0.3, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:cobbled_deepslate" + } + } + ], + "weight": 25 +} \ No newline at end of file diff --git a/src/main/resources/assets/immersiveengineering/lang/en_us.json b/src/main/resources/assets/immersiveengineering/lang/en_us.json index a019106657..d04be000b7 100644 --- a/src/main/resources/assets/immersiveengineering/lang/en_us.json +++ b/src/main/resources/assets/immersiveengineering/lang/en_us.json @@ -243,6 +243,7 @@ "desc.immersiveengineering.info.holdShift": "§6Hold Shift§r", "desc.immersiveengineering.info.holdShiftForInfo": "§8Hold Shift for more info§r", "desc.immersiveengineering.info.mineral.bituminous_coal": "Bituminous Coal", + "desc.immersiveengineering.info.mineral.banded_iron": "Banded Iron", "desc.immersiveengineering.info.mineral.silt": "Silt", "desc.immersiveengineering.info.mineral.igneous_rock": "Igneous Rock", "desc.immersiveengineering.info.mineral.amethyst_crevasse": "Amethyst Crevasse", From 600cd13fa55307d3aab257799fe579240f2f9b4f Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 16:20:17 +0100 Subject: [PATCH 06/26] Add new mineral vein: Lazulitic Intrusion --- .../data/recipes/MiscRecipes.java | 9 +++ .../recipes/mineral/lazulitic_intrusion.json | 61 +++++++++++++++++++ .../immersiveengineering/lang/en_us.json | 1 + 3 files changed, 71 insertions(+) create mode 100644 src/generated/resources/data/immersiveengineering/recipes/mineral/lazulitic_intrusion.json diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index c75308d998..6119dbc9d5 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -456,6 +456,15 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/pentlandite")); // Rare resources + MineralMixBuilder.builder() + .dimensionOverworld() + .addOverworldSpoils() + .ore(Tags.Items.ORES_LAPIS, .75f) + .ore(gold, .15f) + .ore(sulfur, .1f) + .weight(15) + .failchance(.1f) + .build(out, toRL("mineral/lazulitic_intrusion")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/lazulitic_intrusion.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/lazulitic_intrusion.json new file mode 100644 index 0000000000..b62d5f91bf --- /dev/null +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/lazulitic_intrusion.json @@ -0,0 +1,61 @@ +{ + "type": "immersiveengineering:mineral_mix", + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + } + ], + "fail_chance": 0.1, + "ores": [ + { + "chance": 0.75, + "conditions": [], + "output": { + "tag": "forge:ores/lapis" + } + }, + { + "chance": 0.15, + "conditions": [], + "output": { + "tag": "forge:ores/gold" + } + }, + { + "chance": 0.1, + "conditions": [], + "output": { + "tag": "forge:dusts/sulfur" + } + } + ], + "spoils": [ + { + "chance": 0.2, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:gravel" + } + }, + { + "chance": 0.5, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:cobblestone" + } + }, + { + "chance": 0.3, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:cobbled_deepslate" + } + } + ], + "weight": 15 +} \ No newline at end of file diff --git a/src/main/resources/assets/immersiveengineering/lang/en_us.json b/src/main/resources/assets/immersiveengineering/lang/en_us.json index d04be000b7..f58875c933 100644 --- a/src/main/resources/assets/immersiveengineering/lang/en_us.json +++ b/src/main/resources/assets/immersiveengineering/lang/en_us.json @@ -256,6 +256,7 @@ "desc.immersiveengineering.info.mineral.galena": "Galena", "desc.immersiveengineering.info.mineral.cinnabar": "Cinnabar", "desc.immersiveengineering.info.mineral.uraninite": "Uraninite", + "desc.immersiveengineering.info.mineral.lazulitic_intrusion": "Lazulitic Intrusion", "desc.immersiveengineering.info.mineral.beryl": "Beryl", "desc.immersiveengineering.info.mineral.mephitic_quarzite": "Mephitic Quarzite", "desc.immersiveengineering.info.mineral.ancient_debris": "Archaic Digsite", From 3909b8f6b9ed4d5ccb806eda9f13312ba8ea1bac Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 16:20:57 +0100 Subject: [PATCH 07/26] Add new mineral vein: Alluvial Sift --- .../data/recipes/MiscRecipes.java | 12 +++ .../recipes/mineral/alluvial_sift.json | 76 +++++++++++++++++++ .../immersiveengineering/lang/en_us.json | 1 + 3 files changed, 89 insertions(+) create mode 100644 src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index 6119dbc9d5..af7520030f 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -34,6 +34,7 @@ import blusunrize.immersiveengineering.common.util.ItemNBTHelper; import blusunrize.immersiveengineering.data.recipes.builder.BlueprintCraftingRecipeBuilder; import blusunrize.immersiveengineering.data.recipes.builder.MineralMixBuilder; +import com.google.common.collect.ImmutableSet; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.data.recipes.RecipeOutput; @@ -474,6 +475,17 @@ private void mineralMixes(RecipeOutput out) .weight(5) .failchance(.2f) .build(out, toRL("mineral/beryl")); + MineralMixBuilder.builder() + .dimensionOverworld() + .biomeCondition(ImmutableSet.of(BiomeTags.IS_RIVER)) + .addSoilSpoils() + .ore(Tags.Items.GEMS_DIAMOND, .2f) + .ore(Items.CLAY, .3f) + .ore(Items.SAND, .3f) + .ore(Items.GRAVEL, .2f) + .weight(15) + .failchance(.2f) + .build(out, toRL("mineral/alluvial_sift")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json new file mode 100644 index 0000000000..b27c1509c2 --- /dev/null +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json @@ -0,0 +1,76 @@ +{ + "type": "immersiveengineering:mineral_mix", + "biome_predicates": [ + { + "biome_tags": [ + "minecraft:is_overworld" + ] + }, + { + "biome_tags": [ + "minecraft:is_river" + ] + } + ], + "fail_chance": 0.2, + "ores": [ + { + "chance": 0.2, + "conditions": [], + "output": { + "tag": "forge:gems/diamond" + } + }, + { + "chance": 0.3, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:clay" + } + }, + { + "chance": 0.3, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:sand" + } + }, + { + "chance": 0.2, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:gravel" + } + } + ], + "spoils": [ + { + "chance": 0.2, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:coarse_dirt" + } + }, + { + "chance": 0.5, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:cobblestone" + } + }, + { + "chance": 0.3, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:gravel" + } + } + ], + "weight": 15 +} \ No newline at end of file diff --git a/src/main/resources/assets/immersiveengineering/lang/en_us.json b/src/main/resources/assets/immersiveengineering/lang/en_us.json index f58875c933..6c7aca8342 100644 --- a/src/main/resources/assets/immersiveengineering/lang/en_us.json +++ b/src/main/resources/assets/immersiveengineering/lang/en_us.json @@ -258,6 +258,7 @@ "desc.immersiveengineering.info.mineral.uraninite": "Uraninite", "desc.immersiveengineering.info.mineral.lazulitic_intrusion": "Lazulitic Intrusion", "desc.immersiveengineering.info.mineral.beryl": "Beryl", + "desc.immersiveengineering.info.mineral.alluvial_sift": "Alluvial Sift", "desc.immersiveengineering.info.mineral.mephitic_quarzite": "Mephitic Quarzite", "desc.immersiveengineering.info.mineral.ancient_debris": "Archaic Digsite", "desc.immersiveengineering.info.mineral.nether_silt": "Soul Silt", From 1229e3534eab2227c0f63f36c8ba9aab3ae5e321 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 16:39:46 +0100 Subject: [PATCH 08/26] Rebalance a variety of veins to make them more usable, including more ores and less sulfur --- .../data/recipes/MiscRecipes.java | 40 +++++++++++-------- .../recipes/mineral/auricupride.json | 10 ++--- .../recipes/mineral/beryl.json | 8 +++- .../recipes/mineral/chalcopyrite.json | 13 ++++-- .../recipes/mineral/cinnabar.json | 2 +- .../recipes/mineral/galena.json | 17 +++++--- .../recipes/mineral/laterite.json | 11 ++++- .../recipes/mineral/uraninite.json | 12 ++++-- 8 files changed, 75 insertions(+), 38 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index af7520030f..9190912b48 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -323,6 +323,7 @@ private void mineralMixes(RecipeOutput out) TagKey tungsten = createItemWrapper(IETags.getOre("tungsten")); TagKey manganese = createItemWrapper(IETags.getOre("manganese")); TagKey platinum = createItemWrapper(IETags.getOre("platinum")); + TagKey osmium = createItemWrapper(IETags.getOre("osmium")); TagKey paladium = createItemWrapper(IETags.getOre("paladium")); TagKey mercury = createItemWrapper(IETags.getOre("mercury")); // Gems & Dusts @@ -404,11 +405,12 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/banded_iron")); MineralMixBuilder.builder() .dimensionOverworld() + .biomeCondition(ImmutableSet.of(BiomeTags.IS_MOUNTAIN)) .addOverworldSpoils() - .ore(iron, .35f) - .ore(copper, .35f) - .ore(sulfur, .3f) - .weight(20) + .ore(iron, .5f) + .ore(copper, .45f) + .ore(sulfur, .05f) + .weight(25) .failchance(.05f) .build(out, toRL("mineral/chalcopyrite")); MineralMixBuilder.builder() @@ -417,22 +419,23 @@ private void mineralMixes(RecipeOutput out) .ore(redstone, .6f) .ore(sulfur, .4f) .ore(mercury, .3f, getTagCondition(mercury)) - .weight(15) + .weight(20) .failchance(.1f) .build(out, toRL("mineral/cinnabar")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() - .ore(copper, .75f) - .ore(gold, .25f) - .weight(30) + .ore(gold, .6f) + .ore(copper, .4f) + .weight(20) .failchance(.1f) .build(out, toRL("mineral/auricupride")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() - .ore(aluminum, .7f) - .ore(iron, .2f) + .ore(aluminum, .6f) + .ore(iron, .3f) + .ore(nickel, .1f) .ore(titanium, .1f, getTagCondition(titanium)) .weight(20) .failchance(.05f) @@ -441,9 +444,10 @@ private void mineralMixes(RecipeOutput out) .dimensionOverworld() .addOverworldSpoils() .ore(lead, .4f) - .ore(sulfur, .4f) - .ore(silver, .2f) - .weight(15) + .ore(silver, .25f) + .ore(gold, .25f) + .ore(sulfur, .1f) + .weight(20) .failchance(.05f) .build(out, toRL("mineral/galena")); MineralMixBuilder.builder() @@ -468,11 +472,12 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/lazulitic_intrusion")); MineralMixBuilder.builder() .dimensionOverworld() + .biomeCondition(ImmutableSet.of(BiomeTags.IS_MOUNTAIN, BiomeTags.IS_RIVER)) .addOverworldSpoils() .ore(emerald, .3f) .ore(prismarine, .7f) .ore(aquamarine, .3f, getTagCondition(aquamarine)) - .weight(5) + .weight(15) .failchance(.2f) .build(out, toRL("mineral/beryl")); MineralMixBuilder.builder() @@ -488,11 +493,12 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/alluvial_sift")); MineralMixBuilder.builder() .dimensionOverworld() + .biomeCondition(ImmutableSet.of(BiomeTags.IS_BADLANDS, BiomeTags.IS_TAIGA)) .addOverworldSpoils() - .ore(uranium, .7f) - .ore(lead, .3f) + .ore(uranium, .6f) + .ore(lead, .4f) .ore(thorium, .1f, getTagCondition(thorium)) - .weight(10) + .weight(15) .failchance(.15f) .build(out, toRL("mineral/uraninite")); MineralMixBuilder.builder() diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json index 8ea75ccf84..fdfcdc5167 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json @@ -10,17 +10,17 @@ "fail_chance": 0.1, "ores": [ { - "chance": 0.75, + "chance": 0.6, "conditions": [], "output": { - "tag": "forge:ores/copper" + "tag": "forge:ores/gold" } }, { - "chance": 0.25, + "chance": 0.4, "conditions": [], "output": { - "tag": "forge:ores/gold" + "tag": "forge:ores/copper" } } ], @@ -50,5 +50,5 @@ } } ], - "weight": 30 + "weight": 20 } \ No newline at end of file diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json index d3ab39e2c6..6b13179cd3 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json @@ -5,6 +5,12 @@ "biome_tags": [ "minecraft:is_overworld" ] + }, + { + "biome_tags": [ + "minecraft:is_mountain", + "minecraft:is_river" + ] } ], "fail_chance": 0.2, @@ -66,5 +72,5 @@ } } ], - "weight": 5 + "weight": 15 } \ No newline at end of file diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json index 79b4206f86..7ed6c652ff 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json @@ -5,26 +5,31 @@ "biome_tags": [ "minecraft:is_overworld" ] + }, + { + "biome_tags": [ + "minecraft:is_mountain" + ] } ], "fail_chance": 0.05, "ores": [ { - "chance": 0.35, + "chance": 0.5, "conditions": [], "output": { "tag": "forge:ores/iron" } }, { - "chance": 0.35, + "chance": 0.45, "conditions": [], "output": { "tag": "forge:ores/copper" } }, { - "chance": 0.3, + "chance": 0.05, "conditions": [], "output": { "tag": "forge:dusts/sulfur" @@ -57,5 +62,5 @@ } } ], - "weight": 20 + "weight": 25 } \ No newline at end of file diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json index e81c8d6581..80c8a02107 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json @@ -65,5 +65,5 @@ } } ], - "weight": 15 + "weight": 20 } \ No newline at end of file diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json index 4a7d9ddd9a..62bf67c160 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json @@ -17,17 +17,24 @@ } }, { - "chance": 0.4, + "chance": 0.25, "conditions": [], "output": { - "tag": "forge:dusts/sulfur" + "tag": "forge:ores/silver" } }, { - "chance": 0.2, + "chance": 0.25, "conditions": [], "output": { - "tag": "forge:ores/silver" + "tag": "forge:ores/gold" + } + }, + { + "chance": 0.1, + "conditions": [], + "output": { + "tag": "forge:dusts/sulfur" } } ], @@ -57,5 +64,5 @@ } } ], - "weight": 15 + "weight": 20 } \ No newline at end of file diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json index 2e3b9bb67a..1fe54b9455 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json @@ -10,19 +10,26 @@ "fail_chance": 0.05, "ores": [ { - "chance": 0.7, + "chance": 0.6, "conditions": [], "output": { "tag": "forge:ores/aluminum" } }, { - "chance": 0.2, + "chance": 0.3, "conditions": [], "output": { "tag": "forge:ores/iron" } }, + { + "chance": 0.1, + "conditions": [], + "output": { + "tag": "forge:ores/nickel" + } + }, { "chance": 0.1, "conditions": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json index a23d744551..cc117c413e 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json @@ -5,19 +5,25 @@ "biome_tags": [ "minecraft:is_overworld" ] + }, + { + "biome_tags": [ + "minecraft:is_badlands", + "minecraft:is_taiga" + ] } ], "fail_chance": 0.15, "ores": [ { - "chance": 0.7, + "chance": 0.6, "conditions": [], "output": { "tag": "forge:ores/uranium" } }, { - "chance": 0.3, + "chance": 0.4, "conditions": [], "output": { "tag": "forge:ores/lead" @@ -65,5 +71,5 @@ } } ], - "weight": 10 + "weight": 15 } \ No newline at end of file From 75150360768aea4be166a205ccbe2c55c4e1326e Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 16:43:55 +0100 Subject: [PATCH 09/26] Drop old todo note --- .../immersiveengineering/data/recipes/MiscRecipes.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index 9190912b48..17bf7be7ca 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -572,10 +572,6 @@ private void mineralMixes(RecipeOutput out) .failchance(.05f) .background(Blocks.NETHERRACK) .build(out, toRL("mineral/cooled_lava_tube")); - - //todo - // Lapis - // Cinnabar } private void thermoelectricFuels(RecipeOutput out) From 2184f5408b1c2dccd97fae24e5149897bd1cddbf Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 16:47:18 +0100 Subject: [PATCH 10/26] Update Pentandite to be rich in nickel and include platinum and osmium if present. Drop Cooperite as it was the old platinum vein --- .../data/recipes/MiscRecipes.java | 23 ++---- .../recipes/mineral/cooperite.json | 78 ------------------- .../recipes/mineral/pentlandite.json | 44 +++++++++-- 3 files changed, 44 insertions(+), 101 deletions(-) delete mode 100644 src/generated/resources/data/immersiveengineering/recipes/mineral/cooperite.json diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index 17bf7be7ca..cfccbe1447 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -324,7 +324,6 @@ private void mineralMixes(RecipeOutput out) TagKey manganese = createItemWrapper(IETags.getOre("manganese")); TagKey platinum = createItemWrapper(IETags.getOre("platinum")); TagKey osmium = createItemWrapper(IETags.getOre("osmium")); - TagKey paladium = createItemWrapper(IETags.getOre("paladium")); TagKey mercury = createItemWrapper(IETags.getOre("mercury")); // Gems & Dusts TagKey sulfur = IETags.sulfurDust; @@ -453,11 +452,13 @@ private void mineralMixes(RecipeOutput out) MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() - .ore(iron, .35f) - .ore(nickel, .35f) - .ore(sulfur, .3f) - .weight(25) - .failchance(.05f) + .ore(nickel, .65f) + .ore(iron, .25f) + .ore(sulfur, .1f) + .ore(platinum, .1f, getTagCondition(platinum)) + .ore(osmium, .1f, getTagCondition(osmium)) + .weight(15) + .failchance(.1f) .build(out, toRL("mineral/pentlandite")); // Rare resources @@ -519,16 +520,6 @@ private void mineralMixes(RecipeOutput out) .weight(20) .failchance(.05f) .build(out, toRL("mineral/cassiterite")); - MineralMixBuilder.builder() - .dimensionOverworld() - .addOverworldSpoils() - .addCondition(getTagCondition(platinum)) // Vein is only found when platinum is present - .ore(platinum, .5f) - .ore(paladium, .5f, getTagCondition(paladium)) - .ore(nickel, .5f) - .weight(5) - .failchance(.1f) - .build(out, toRL("mineral/cooperite")); // Nether MineralMixBuilder.builder() diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/cooperite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/cooperite.json deleted file mode 100644 index a6c6f47a77..0000000000 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/cooperite.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "neoforge:conditions": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "forge:ores/platinum" - } - } - ], - "type": "immersiveengineering:mineral_mix", - "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } - ], - "fail_chance": 0.1, - "ores": [ - { - "chance": 0.5, - "conditions": [], - "output": { - "tag": "forge:ores/platinum" - } - }, - { - "chance": 0.5, - "conditions": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "forge:ores/paladium" - } - } - ], - "output": { - "tag": "forge:ores/paladium" - } - }, - { - "chance": 0.5, - "conditions": [], - "output": { - "tag": "forge:ores/nickel" - } - } - ], - "spoils": [ - { - "chance": 0.2, - "conditions": [], - "output": { - "Count": 1, - "id": "minecraft:gravel" - } - }, - { - "chance": 0.5, - "conditions": [], - "output": { - "Count": 1, - "id": "minecraft:cobblestone" - } - }, - { - "chance": 0.3, - "conditions": [], - "output": { - "Count": 1, - "id": "minecraft:cobbled_deepslate" - } - } - ], - "weight": 5 -} \ No newline at end of file diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json index e7fc14419b..62362cbe89 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json @@ -7,28 +7,58 @@ ] } ], - "fail_chance": 0.05, + "fail_chance": 0.1, "ores": [ { - "chance": 0.35, + "chance": 0.65, "conditions": [], "output": { - "tag": "forge:ores/iron" + "tag": "forge:ores/nickel" } }, { - "chance": 0.35, + "chance": 0.25, "conditions": [], "output": { - "tag": "forge:ores/nickel" + "tag": "forge:ores/iron" } }, { - "chance": 0.3, + "chance": 0.1, "conditions": [], "output": { "tag": "forge:dusts/sulfur" } + }, + { + "chance": 0.1, + "conditions": [ + { + "type": "neoforge:not", + "value": { + "type": "neoforge:tag_empty", + "tag": "forge:ores/platinum" + } + } + ], + "output": { + "tag": "forge:ores/platinum" + } + }, + { + "chance": 0.1, + "conditions": [ + { + "type": "neoforge:not", + "value": { + "type": "neoforge:tag_empty", + "tag": "forge:ores/osmium" + } + } + ], + "output": { + "tag": "forge:ores/osmium" + } } ], "spoils": [ @@ -57,5 +87,5 @@ } } ], - "weight": 25 + "weight": 15 } \ No newline at end of file From 76c989844505cf176b5227f93b088def44e07c89 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 16:48:43 +0100 Subject: [PATCH 11/26] Update Wolframite to be more focused on tungsten and include tin if present. Drop Cassiterite as a result. --- .../data/recipes/MiscRecipes.java | 19 ++----- .../recipes/mineral/cassiterite.json | 56 ------------------- .../recipes/mineral/wolframite.json | 23 ++++++-- 3 files changed, 25 insertions(+), 73 deletions(-) delete mode 100644 src/generated/resources/data/immersiveengineering/recipes/mineral/cassiterite.json diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index cfccbe1447..ab3e340534 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -503,23 +503,16 @@ private void mineralMixes(RecipeOutput out) .failchance(.15f) .build(out, toRL("mineral/uraninite")); MineralMixBuilder.builder() + .addCondition(getTagCondition(tungsten)) // Vein is only found when tungsten is present .dimensionOverworld() .addOverworldSpoils() - .addCondition(getTagCondition(tungsten)) // Vein is only found when tungsten is present - .ore(tungsten, .5f) - .ore(iron, .5f) - .ore(manganese, .5f, getTagCondition(manganese)) + .ore(tungsten, .7f) + .ore(iron, .3f) + .ore(manganese, .3f, getTagCondition(manganese)) + .ore(tin, .3f, getTagCondition(tin)) .weight(5) - .failchance(.1f) + .failchance(.15f) .build(out, toRL("mineral/wolframite")); - MineralMixBuilder.builder() - .dimensionOverworld() - .addOverworldSpoils() - .addCondition(getTagCondition(tin)) // Vein is only found when tungsten is present - .ore(tin, 1) - .weight(20) - .failchance(.05f) - .build(out, toRL("mineral/cassiterite")); // Nether MineralMixBuilder.builder() diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/cassiterite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/cassiterite.json deleted file mode 100644 index 53e22fccf8..0000000000 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/cassiterite.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "neoforge:conditions": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "forge:ores/tin" - } - } - ], - "type": "immersiveengineering:mineral_mix", - "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } - ], - "fail_chance": 0.05, - "ores": [ - { - "chance": 1.0, - "conditions": [], - "output": { - "tag": "forge:ores/tin" - } - } - ], - "spoils": [ - { - "chance": 0.2, - "conditions": [], - "output": { - "Count": 1, - "id": "minecraft:gravel" - } - }, - { - "chance": 0.5, - "conditions": [], - "output": { - "Count": 1, - "id": "minecraft:cobblestone" - } - }, - { - "chance": 0.3, - "conditions": [], - "output": { - "Count": 1, - "id": "minecraft:cobbled_deepslate" - } - } - ], - "weight": 20 -} \ No newline at end of file diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json index 11fb32b31b..cf37b8d78a 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json @@ -16,24 +16,24 @@ ] } ], - "fail_chance": 0.1, + "fail_chance": 0.15, "ores": [ { - "chance": 0.5, + "chance": 0.7, "conditions": [], "output": { "tag": "forge:ores/tungsten" } }, { - "chance": 0.5, + "chance": 0.3, "conditions": [], "output": { "tag": "forge:ores/iron" } }, { - "chance": 0.5, + "chance": 0.3, "conditions": [ { "type": "neoforge:not", @@ -46,6 +46,21 @@ "output": { "tag": "forge:ores/manganese" } + }, + { + "chance": 0.3, + "conditions": [ + { + "type": "neoforge:not", + "value": { + "type": "neoforge:tag_empty", + "tag": "forge:ores/tin" + } + } + ], + "output": { + "tag": "forge:ores/tin" + } } ], "spoils": [ From f176b2cece6b379e87b0aaade2186d37c0adc534 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 18:03:00 +0100 Subject: [PATCH 12/26] Fix biome condition for Beryl --- .../immersiveengineering/data/recipes/MiscRecipes.java | 2 +- .../data/immersiveengineering/recipes/mineral/beryl.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index ab3e340534..58aaced504 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -473,7 +473,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/lazulitic_intrusion")); MineralMixBuilder.builder() .dimensionOverworld() - .biomeCondition(ImmutableSet.of(BiomeTags.IS_MOUNTAIN, BiomeTags.IS_RIVER)) + .biomeCondition(ImmutableSet.of(BiomeTags.IS_MOUNTAIN, BiomeTags.IS_OCEAN)) .addOverworldSpoils() .ore(emerald, .3f) .ore(prismarine, .7f) diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json index 6b13179cd3..e99c2f09c7 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json @@ -9,7 +9,7 @@ { "biome_tags": [ "minecraft:is_mountain", - "minecraft:is_river" + "minecraft:is_ocean" ] } ], From 9ae8af9a9061bb1fe0d45f38fb2cdb6db90d205c Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 18:13:05 +0100 Subject: [PATCH 13/26] Add biome tags for specific IE veins --- .../immersiveengineering/api/IETags.java | 4 ++ .../immersiveengineering/data/BiomeTags.java | 60 +++++++++++++++++++ .../data/IEDataGenerator.java | 1 + .../d4272b005efbbf8ba3224ba0d84674e2a73e6436 | 3 + .../biome/generate_ancient_seabed.json | 10 ++++ .../biome/generate_hardened_clay_pan.json | 10 ++++ 6 files changed, 88 insertions(+) create mode 100644 src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java create mode 100644 src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 create mode 100644 src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json create mode 100644 src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_hardened_clay_pan.json diff --git a/src/api/java/blusunrize/immersiveengineering/api/IETags.java b/src/api/java/blusunrize/immersiveengineering/api/IETags.java index a193820e51..d4e89a9b4a 100644 --- a/src/api/java/blusunrize/immersiveengineering/api/IETags.java +++ b/src/api/java/blusunrize/immersiveengineering/api/IETags.java @@ -15,6 +15,7 @@ import net.minecraft.tags.TagKey; import net.minecraft.world.entity.EntityType; import net.minecraft.world.item.Item; +import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.material.Fluid; import net.neoforged.neoforge.common.Tags.Blocks; @@ -150,6 +151,9 @@ public class IETags public static final TagKey> shaderbagWhitelist = createEntityWrapper(rl("shaderbag/whitelist")); public static final TagKey> shaderbagBlacklist = createEntityWrapper(rl("shaderbag/blacklist")); + public static final TagKey generateClaypan = createBiomeWrapper(rl("generate_hardened_clay_pan")); + public static final TagKey generateSeabed = createBiomeWrapper(rl("generate_ancient_seabed")); + static { for(EnumMetals m : EnumMetals.values()) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java b/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java new file mode 100644 index 0000000000..657c938713 --- /dev/null +++ b/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java @@ -0,0 +1,60 @@ +/* + * BluSunrize + * Copyright (c) 2022 + * + * This code is licensed under "Blu's License of Common Sense" + * Details can be found in the license file in the root folder of this project + * + */ + +package blusunrize.immersiveengineering.data; + +import blusunrize.immersiveengineering.api.IETags; +import blusunrize.immersiveengineering.api.Lib; +import net.minecraft.core.HolderLookup.Provider; +import net.minecraft.data.PackOutput; +import net.minecraft.data.tags.BiomeTagsProvider; +import net.minecraft.world.level.biome.Biomes; +import net.neoforged.neoforge.common.data.ExistingFileHelper; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.concurrent.CompletableFuture; + +public class BiomeTags extends BiomeTagsProvider +{ + + public BiomeTags(PackOutput output, CompletableFuture lookupProvider, @Nullable ExistingFileHelper existingFileHelper) + { + super(output, lookupProvider, Lib.MODID, existingFileHelper); + } + + @Override + protected void addTags(Provider p_255894_) + { + // deserts, plains, mesas, savannas, ice plains + tag(IETags.generateClaypan) + .add(Biomes.DESERT) + .add(Biomes.PLAINS) + .add(Biomes.SUNFLOWER_PLAINS) + .add(Biomes.BADLANDS) + .add(Biomes.SAVANNA) + .add(Biomes.SNOWY_PLAINS); + // swamps, beaches, coral reefs, stony shore + tag(IETags.generateSeabed) + .add(Biomes.SWAMP) + .add(Biomes.MANGROVE_SWAMP) + .add(Biomes.BEACH) + .add(Biomes.SNOWY_BEACH) + .add(Biomes.WARM_OCEAN) + .add(Biomes.STONY_SHORE); + } + + + @Nonnull + @Override + public String getName() + { + return "IE biome tags"; + } +} diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/IEDataGenerator.java b/src/datagen/java/blusunrize/immersiveengineering/data/IEDataGenerator.java index 7f03f94d50..90f967f79d 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/IEDataGenerator.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/IEDataGenerator.java @@ -47,6 +47,7 @@ public static void gatherData(GatherDataEvent event) gen.addProvider(true, new BannerTags(output, lookup, exHelper)); gen.addProvider(true, new PoiTags(output, lookup, exHelper)); gen.addProvider(true, new EntityTypeTags(output, lookup, exHelper)); + gen.addProvider(true, new BiomeTags(output, lookup, exHelper)); gen.addProvider(true, new RootRecipeProvider(output)); gen.addProvider(true, new AllLoot(output)); gen.addProvider(true, new BlockStates(output, exHelper)); diff --git a/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 b/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 new file mode 100644 index 0000000000..487cb937f2 --- /dev/null +++ b/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 @@ -0,0 +1,3 @@ +// 1.20.4 2024-03-29T18:09:56.2646344 IE biome tags +360a5cc3004bc6313da50efd2a7e9f0a7853dcec data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json +af85e3ac097959db37cc110a60aa2ecd62a3216b data/immersiveengineering/tags/worldgen/biome/generate_hardened_clay_pan.json diff --git a/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json b/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json new file mode 100644 index 0000000000..0f7577c5a7 --- /dev/null +++ b/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json @@ -0,0 +1,10 @@ +{ + "values": [ + "minecraft:swamp", + "minecraft:mangrove_swamp", + "minecraft:beach", + "minecraft:snowy_beach", + "minecraft:warm_ocean", + "minecraft:stony_shore" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_hardened_clay_pan.json b/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_hardened_clay_pan.json new file mode 100644 index 0000000000..82f85a945a --- /dev/null +++ b/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_hardened_clay_pan.json @@ -0,0 +1,10 @@ +{ + "values": [ + "minecraft:desert", + "minecraft:plains", + "minecraft:sunflower_plains", + "minecraft:badlands", + "minecraft:savanna", + "minecraft:snowy_plains" + ] +} \ No newline at end of file From 49c89172a00c8b078183d77c9f063a08ffc62eb6 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 18:14:09 +0100 Subject: [PATCH 14/26] Limit Silt, Claypan and Seabed to specific biomes --- .../immersiveengineering/data/recipes/MiscRecipes.java | 3 +++ .../immersiveengineering/recipes/mineral/ancient_seabed.json | 5 +++++ .../recipes/mineral/hardened_clay_pan.json | 5 +++++ .../data/immersiveengineering/recipes/mineral/silt.json | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index 58aaced504..2604403184 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -339,6 +339,7 @@ private void mineralMixes(RecipeOutput out) // Rocks & decoration MineralMixBuilder.builder() .dimensionOverworld() + .biomeCondition(ImmutableSet.of(BiomeTags.IS_RIVER)) .addSoilSpoils() .ore(Items.CLAY, .5f) .ore(Items.SAND, .3f) @@ -358,6 +359,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/igneous_rock")); MineralMixBuilder.builder() .dimensionOverworld() + .biomeCondition(ImmutableSet.of(IETags.generateClaypan)) .addSoilSpoils() .ore(Items.TERRACOTTA, .6f) .ore(Items.RED_SANDSTONE, .3f) @@ -367,6 +369,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/hardened_clay_pan")); MineralMixBuilder.builder() .dimensionOverworld() + .biomeCondition(ImmutableSet.of(IETags.generateSeabed)) .addSeabedSpoils() .ore(Blocks.CALCITE, .65f) .ore(Blocks.DRIPSTONE_BLOCK, .3f) diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json index d892b5a346..7a24b6bdf7 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json @@ -5,6 +5,11 @@ "biome_tags": [ "minecraft:is_overworld" ] + }, + { + "biome_tags": [ + "immersiveengineering:generate_ancient_seabed" + ] } ], "fail_chance": 0.05, diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json index 98392d9523..f002458c33 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json @@ -5,6 +5,11 @@ "biome_tags": [ "minecraft:is_overworld" ] + }, + { + "biome_tags": [ + "immersiveengineering:generate_hardened_clay_pan" + ] } ], "fail_chance": 0.05, diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json index 6253673523..aeaecd9f41 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json @@ -5,6 +5,11 @@ "biome_tags": [ "minecraft:is_overworld" ] + }, + { + "biome_tags": [ + "minecraft:is_river" + ] } ], "fail_chance": 0.05, From be6373a2bee9a97148137cd913df341e8d952c67 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 18:14:27 +0100 Subject: [PATCH 15/26] Add manual documentation for biome tags --- .../resources/assets/immersiveengineering/lang/en_us.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/assets/immersiveengineering/lang/en_us.json b/src/main/resources/assets/immersiveengineering/lang/en_us.json index 6c7aca8342..5e011eafd7 100644 --- a/src/main/resources/assets/immersiveengineering/lang/en_us.json +++ b/src/main/resources/assets/immersiveengineering/lang/en_us.json @@ -1394,7 +1394,7 @@ "ie.manual.entry.shaderList.order": "Acquire:", "ie.manual.entry.mineral_title": "Mineral Deposits", "ie.manual.entry.mineral_subtitle": "Oresome", - "ie.manual.entry.minerals_desc": "%1$s\nIt consists of: %2$s.\n\nIts spoils are:%3$s", + "ie.manual.entry.minerals_desc": "%1$s\nIt consists of: %2$s\n\nIts spoils are:%3$s", "ie.manual.entry.minerals.biomes": "§l%1$s§r is a mineral vein found in biomes that are %2$s.\n", "ie.manual.entry.minerals.biomes_or": "%1$s or %2$s", "ie.manual.entry.minerals.biomes_and": "%1$s and are %2$s", @@ -1402,6 +1402,11 @@ "ie.manual.entry.minerals.biome_tag.minecraft:is_nether": "in the nether", "ie.manual.entry.minerals.biome_tag.minecraft:is_mountain": "mountainous", "ie.manual.entry.minerals.biome_tag.minecraft:is_ocean": "oceanic", + "ie.manual.entry.minerals.biome_tag.minecraft:is_river": "rivers", + "ie.manual.entry.minerals.biome_tag.minecraft:is_badlands": "badlands", + "ie.manual.entry.minerals.biome_tag.minecraft:is_taiga": "taigas", + "ie.manual.entry.minerals.biome_tag.immersiveengineering:generate_hardened_clay_pan": "flat and dry", + "ie.manual.entry.minerals.biome_tag.immersiveengineering:generate_ancient_seabed": "swampy or growing corals", "ie.manual.newerVersion": " - New!", "ie.manual.currentVersion": " - Current", "ie.manual.entry.mineralsDimAny": "§l%1$s§r is a mineral vein that can be found in any dimension.", From 176d092baf7533d08522265ea9207d0c73a2b441 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 19:14:08 +0100 Subject: [PATCH 16/26] Remove gravel from silt veins, instead increasing it in the spoils --- .../data/recipes/MiscRecipes.java | 12 ++++------ .../recipes/builder/MineralMixBuilder.java | 6 ++--- .../recipes/mineral/alluvial_sift.json | 22 ++++++----------- .../recipes/mineral/hardened_clay_pan.json | 10 ++++---- .../recipes/mineral/silt.json | 24 +++++++------------ 5 files changed, 28 insertions(+), 46 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index 2604403184..f2a06fe4a7 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -341,11 +341,10 @@ private void mineralMixes(RecipeOutput out) .dimensionOverworld() .biomeCondition(ImmutableSet.of(BiomeTags.IS_RIVER)) .addSoilSpoils() - .ore(Items.CLAY, .5f) - .ore(Items.SAND, .3f) - .ore(Items.GRAVEL, .2f) + .ore(Items.CLAY, .6f) + .ore(Items.SAND, .4f) .weight(25) - .failchance(.05f) + .failchance(.2f) .build(out, toRL("mineral/silt")); MineralMixBuilder.builder() .dimensionOverworld() @@ -489,9 +488,8 @@ private void mineralMixes(RecipeOutput out) .biomeCondition(ImmutableSet.of(BiomeTags.IS_RIVER)) .addSoilSpoils() .ore(Tags.Items.GEMS_DIAMOND, .2f) - .ore(Items.CLAY, .3f) - .ore(Items.SAND, .3f) - .ore(Items.GRAVEL, .2f) + .ore(Items.CLAY, .4f) + .ore(Items.SAND, .4f) .weight(15) .failchance(.2f) .build(out, toRL("mineral/alluvial_sift")); diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java index d30a92b365..ca7440ef65 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java @@ -110,9 +110,9 @@ public MineralMixBuilder addOverworldSpoils() public MineralMixBuilder addSoilSpoils() { - return spoil(Items.COARSE_DIRT, 0.2f) - .spoil(Items.COBBLESTONE, 0.5f) - .spoil(Items.GRAVEL, 0.3f); + return spoil(Items.GRAVEL, 0.6f) + .spoil(Items.COBBLESTONE, 0.3f) + .spoil(Items.COARSE_DIRT, 0.1f); } public MineralMixBuilder addSeabedSpoils() diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json index b27c1509c2..6aa3e63083 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json @@ -22,7 +22,7 @@ } }, { - "chance": 0.3, + "chance": 0.4, "conditions": [], "output": { "Count": 1, @@ -30,33 +30,25 @@ } }, { - "chance": 0.3, + "chance": 0.4, "conditions": [], "output": { "Count": 1, "id": "minecraft:sand" } - }, - { - "chance": 0.2, - "conditions": [], - "output": { - "Count": 1, - "id": "minecraft:gravel" - } } ], "spoils": [ { - "chance": 0.2, + "chance": 0.6, "conditions": [], "output": { "Count": 1, - "id": "minecraft:coarse_dirt" + "id": "minecraft:gravel" } }, { - "chance": 0.5, + "chance": 0.3, "conditions": [], "output": { "Count": 1, @@ -64,11 +56,11 @@ } }, { - "chance": 0.3, + "chance": 0.1, "conditions": [], "output": { "Count": 1, - "id": "minecraft:gravel" + "id": "minecraft:coarse_dirt" } } ], diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json index f002458c33..0e03f2638a 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json @@ -41,15 +41,15 @@ ], "spoils": [ { - "chance": 0.2, + "chance": 0.6, "conditions": [], "output": { "Count": 1, - "id": "minecraft:coarse_dirt" + "id": "minecraft:gravel" } }, { - "chance": 0.5, + "chance": 0.3, "conditions": [], "output": { "Count": 1, @@ -57,11 +57,11 @@ } }, { - "chance": 0.3, + "chance": 0.1, "conditions": [], "output": { "Count": 1, - "id": "minecraft:gravel" + "id": "minecraft:coarse_dirt" } } ], diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json index aeaecd9f41..602a6a0e58 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json @@ -12,10 +12,10 @@ ] } ], - "fail_chance": 0.05, + "fail_chance": 0.2, "ores": [ { - "chance": 0.5, + "chance": 0.6, "conditions": [], "output": { "Count": 1, @@ -23,33 +23,25 @@ } }, { - "chance": 0.3, + "chance": 0.4, "conditions": [], "output": { "Count": 1, "id": "minecraft:sand" } - }, - { - "chance": 0.2, - "conditions": [], - "output": { - "Count": 1, - "id": "minecraft:gravel" - } } ], "spoils": [ { - "chance": 0.2, + "chance": 0.6, "conditions": [], "output": { "Count": 1, - "id": "minecraft:coarse_dirt" + "id": "minecraft:gravel" } }, { - "chance": 0.5, + "chance": 0.3, "conditions": [], "output": { "Count": 1, @@ -57,11 +49,11 @@ } }, { - "chance": 0.3, + "chance": 0.1, "conditions": [], "output": { "Count": 1, - "id": "minecraft:gravel" + "id": "minecraft:coarse_dirt" } } ], From cb0d334bf9c4515adb4dee0ed28f54a641fe586d Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 21:30:37 +0100 Subject: [PATCH 17/26] Remove dimension keys, they are no longer needed --- .../immersiveengineering/data/recipes/MiscRecipes.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index f2a06fe4a7..209c44a669 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -333,9 +333,6 @@ private void mineralMixes(RecipeOutput out) Block prismarine = Blocks.PRISMARINE; TagKey aquamarine = createItemWrapper(IETags.getGem("aquamarine")); - // Common things - ResourceKey overworld = BuiltinDimensionTypes.OVERWORLD; - ResourceKey nether = BuiltinDimensionTypes.NETHER; // Rocks & decoration MineralMixBuilder.builder() .dimensionOverworld() From 58244eeebdc07873debe1b6702539992825370fa Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Fri, 29 Mar 2024 21:42:55 +0100 Subject: [PATCH 18/26] Allow survey tools to be used more easily in the nether --- .../common/items/SurveyToolsItem.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/blusunrize/immersiveengineering/common/items/SurveyToolsItem.java b/src/main/java/blusunrize/immersiveengineering/common/items/SurveyToolsItem.java index 985133067a..41d40346d2 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/items/SurveyToolsItem.java +++ b/src/main/java/blusunrize/immersiveengineering/common/items/SurveyToolsItem.java @@ -55,10 +55,14 @@ public SurveyToolsItem() CAN_USE_ON.add((world, pos) -> world.getBlockState(pos).is(IETags.surveyToolTargets)); // Stone, Diorite, Andesite, etc. CAN_USE_ON.add((world, pos) -> world.getBlockState(pos).is(Tags.Blocks.STONE)); - // Stone, Diorite, Andesite, etc. + // Nether materials CAN_USE_ON.add((world, pos) -> { - Block block = world.getBlockState(pos).getBlock(); - return block==Blocks.BLACKSTONE||block==Blocks.BASALT; + BlockState state = world.getBlockState(pos); + Block block = state.getBlock(); + return state.is(Tags.Blocks.NETHERRACK) + ||block==Blocks.SOUL_SAND + ||block==Blocks.BLACKSTONE + ||block==Blocks.BASALT; }); // soft rocks CAN_USE_ON.add((world, pos) -> { @@ -104,7 +108,7 @@ public ItemStack finishUsingItem(ItemStack stack, Level world, LivingEntity enti BlockHitResult rtr = getPlayerPOVHitResult(world, player, Fluid.NONE); BlockPos pos = rtr.getBlockPos(); MineralVein vein = ExcavatorHandler.getRandomMineral(world, pos); - if(vein==null || vein.getMineral(world)==null) + if(vein==null||vein.getMineral(world)==null) { player.displayClientMessage(Component.translatable(Lib.CHAT_INFO+"survey.no_vein"), true); return stack; From 1c14a24967f02436f1880d6cc990267ed66d8951 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Sun, 31 Mar 2024 13:15:05 +0200 Subject: [PATCH 19/26] Simplify codec for BiomeTagPredicates --- .../recipes/mineral/alluvial_sift.json | 16 ++++++---------- .../recipes/mineral/amethyst_crevasse.json | 8 +++----- .../recipes/mineral/ancient_debris.json | 8 +++----- .../recipes/mineral/ancient_seabed.json | 16 ++++++---------- .../recipes/mineral/auricupride.json | 8 +++----- .../recipes/mineral/banded_iron.json | 8 +++----- .../recipes/mineral/beryl.json | 18 +++++++----------- .../recipes/mineral/bituminous_coal.json | 8 +++----- .../recipes/mineral/chalcopyrite.json | 16 ++++++---------- .../recipes/mineral/cinnabar.json | 8 +++----- .../recipes/mineral/cooled_lava_tube.json | 8 +++----- .../recipes/mineral/galena.json | 8 +++----- .../recipes/mineral/hardened_clay_pan.json | 16 ++++++---------- .../recipes/mineral/igneous_rock.json | 8 +++----- .../recipes/mineral/laterite.json | 8 +++----- .../recipes/mineral/lazulitic_intrusion.json | 8 +++----- .../recipes/mineral/mephitic_quarzite.json | 8 +++----- .../recipes/mineral/nether_silt.json | 8 +++----- .../recipes/mineral/pentlandite.json | 8 +++----- .../recipes/mineral/silt.json | 16 ++++++---------- .../recipes/mineral/uraninite.json | 18 +++++++----------- .../recipes/mineral/wolframite.json | 8 +++----- .../serializers/MineralMixSerializer.java | 8 +------- 23 files changed, 90 insertions(+), 154 deletions(-) diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json index 6aa3e63083..5fc7def3e9 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/alluvial_sift.json @@ -1,16 +1,12 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - }, - { - "biome_tags": [ - "minecraft:is_river" - ] - } + [ + "minecraft:is_overworld" + ], + [ + "minecraft:is_river" + ] ], "fail_chance": 0.2, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/amethyst_crevasse.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/amethyst_crevasse.json index 5780ce3e14..dde4a46072 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/amethyst_crevasse.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/amethyst_crevasse.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.1, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_debris.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_debris.json index 64dca5e118..74d6affcc1 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_debris.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_debris.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_nether" - ] - } + [ + "minecraft:is_nether" + ] ], "fail_chance": 0.5, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json index 7a24b6bdf7..f5e30477b6 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/ancient_seabed.json @@ -1,16 +1,12 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - }, - { - "biome_tags": [ - "immersiveengineering:generate_ancient_seabed" - ] - } + [ + "minecraft:is_overworld" + ], + [ + "immersiveengineering:generate_ancient_seabed" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json index fdfcdc5167..e6b5387b99 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.1, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/banded_iron.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/banded_iron.json index e2f8a10633..3fa0fd61af 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/banded_iron.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/banded_iron.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json index e99c2f09c7..afd1756567 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/beryl.json @@ -1,17 +1,13 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - }, - { - "biome_tags": [ - "minecraft:is_mountain", - "minecraft:is_ocean" - ] - } + [ + "minecraft:is_overworld" + ], + [ + "minecraft:is_mountain", + "minecraft:is_ocean" + ] ], "fail_chance": 0.2, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/bituminous_coal.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/bituminous_coal.json index 7b1501cd72..836c03daac 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/bituminous_coal.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/bituminous_coal.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json index 7ed6c652ff..d2a22cd258 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/chalcopyrite.json @@ -1,16 +1,12 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - }, - { - "biome_tags": [ - "minecraft:is_mountain" - ] - } + [ + "minecraft:is_overworld" + ], + [ + "minecraft:is_mountain" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json index 80c8a02107..b85452161c 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/cinnabar.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.1, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/cooled_lava_tube.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/cooled_lava_tube.json index a8a5b5c2ed..737dce8d5e 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/cooled_lava_tube.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/cooled_lava_tube.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_nether" - ] - } + [ + "minecraft:is_nether" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json index 62bf67c160..8a44df0ce3 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/galena.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json index 0e03f2638a..a634cc189d 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/hardened_clay_pan.json @@ -1,16 +1,12 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - }, - { - "biome_tags": [ - "immersiveengineering:generate_hardened_clay_pan" - ] - } + [ + "minecraft:is_overworld" + ], + [ + "immersiveengineering:generate_hardened_clay_pan" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/igneous_rock.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/igneous_rock.json index 6f679b59aa..2356b778c5 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/igneous_rock.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/igneous_rock.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json index 1fe54b9455..56313784e6 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/laterite.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/lazulitic_intrusion.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/lazulitic_intrusion.json index b62d5f91bf..5c7b0ddbc6 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/lazulitic_intrusion.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/lazulitic_intrusion.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.1, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/mephitic_quarzite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/mephitic_quarzite.json index 6b228f2a87..85a39cbe65 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/mephitic_quarzite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/mephitic_quarzite.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_nether" - ] - } + [ + "minecraft:is_nether" + ] ], "fail_chance": 0.15, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/nether_silt.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/nether_silt.json index bdf8f70bfb..3460a005a3 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/nether_silt.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/nether_silt.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_nether" - ] - } + [ + "minecraft:is_nether" + ] ], "fail_chance": 0.05, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json index 62362cbe89..f78f633457 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/pentlandite.json @@ -1,11 +1,9 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.1, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json index 602a6a0e58..ba8d94f767 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json @@ -1,16 +1,12 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - }, - { - "biome_tags": [ - "minecraft:is_river" - ] - } + [ + "minecraft:is_overworld" + ], + [ + "minecraft:is_river" + ] ], "fail_chance": 0.2, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json index cc117c413e..fd47df9e41 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/uraninite.json @@ -1,17 +1,13 @@ { "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - }, - { - "biome_tags": [ - "minecraft:is_badlands", - "minecraft:is_taiga" - ] - } + [ + "minecraft:is_overworld" + ], + [ + "minecraft:is_badlands", + "minecraft:is_taiga" + ] ], "fail_chance": 0.15, "ores": [ diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json index cf37b8d78a..9b9dcaa766 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/wolframite.json @@ -10,11 +10,9 @@ ], "type": "immersiveengineering:mineral_mix", "biome_predicates": [ - { - "biome_tags": [ - "minecraft:is_overworld" - ] - } + [ + "minecraft:is_overworld" + ] ], "fail_chance": 0.15, "ores": [ diff --git a/src/main/java/blusunrize/immersiveengineering/common/crafting/serializers/MineralMixSerializer.java b/src/main/java/blusunrize/immersiveengineering/common/crafting/serializers/MineralMixSerializer.java index 18091dbf5a..ebdbaee6ed 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/crafting/serializers/MineralMixSerializer.java +++ b/src/main/java/blusunrize/immersiveengineering/common/crafting/serializers/MineralMixSerializer.java @@ -35,7 +35,7 @@ public class MineralMixSerializer extends IERecipeSerializer { - public static final Codec BIOME_TAG_PREDICATE_CODEC = makeBiomePredicateCodec(); + public static final Codec BIOME_TAG_PREDICATE_CODEC = NeoForgeExtraCodecs.setOf(TagKey.codec(Registries.BIOME)).xmap(BiomeTagPredicate::new, BiomeTagPredicate::tags); private static final Codec CODEC = RecordCodecBuilder.create( inst -> inst.group( @@ -105,10 +105,4 @@ public void toNetwork(FriendlyByteBuf buffer, MineralMix recipe) PacketUtils.writeRegistryElement(buffer, BuiltInRegistries.BLOCK, recipe.background); } - private static Codec makeBiomePredicateCodec() - { - return RecordCodecBuilder.create(inst -> inst.group( - NeoForgeExtraCodecs.setOf(TagKey.codec(Registries.BIOME)).fieldOf("biome_tags").forGetter(BiomeTagPredicate::tags) - ).apply(inst, BiomeTagPredicate::new)); - } } From b6ca341f394d4264f4d504609209792a8b2e1aef Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Sun, 31 Mar 2024 13:26:07 +0200 Subject: [PATCH 20/26] Change ancient seabed to use is_beach tag --- .../java/blusunrize/immersiveengineering/data/BiomeTags.java | 3 +-- .../resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 | 4 ++-- .../tags/worldgen/biome/generate_ancient_seabed.json | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java b/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java index 657c938713..9d06f17838 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java @@ -44,8 +44,7 @@ protected void addTags(Provider p_255894_) tag(IETags.generateSeabed) .add(Biomes.SWAMP) .add(Biomes.MANGROVE_SWAMP) - .add(Biomes.BEACH) - .add(Biomes.SNOWY_BEACH) + .addTag(net.minecraft.tags.BiomeTags.IS_BEACH) .add(Biomes.WARM_OCEAN) .add(Biomes.STONY_SHORE); } diff --git a/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 b/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 index 487cb937f2..77e3794068 100644 --- a/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 +++ b/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 @@ -1,3 +1,3 @@ -// 1.20.4 2024-03-29T18:09:56.2646344 IE biome tags -360a5cc3004bc6313da50efd2a7e9f0a7853dcec data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json +// 1.20.4 2024-03-31T13:21:55.5779162 IE biome tags +d45ecfba197394907e27e9146636de63184c8c82 data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json af85e3ac097959db37cc110a60aa2ecd62a3216b data/immersiveengineering/tags/worldgen/biome/generate_hardened_clay_pan.json diff --git a/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json b/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json index 0f7577c5a7..131ad6a069 100644 --- a/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json +++ b/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json @@ -2,8 +2,7 @@ "values": [ "minecraft:swamp", "minecraft:mangrove_swamp", - "minecraft:beach", - "minecraft:snowy_beach", + "#minecraft:is_beach", "minecraft:warm_ocean", "minecraft:stony_shore" ] From b8833418d9a280bd209b46dcbec5a16e1259db36 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Sun, 31 Mar 2024 13:36:53 +0200 Subject: [PATCH 21/26] Change localization for biome tags --- .../immersiveengineering/client/IEManual.java | 2 +- .../immersiveengineering/lang/en_us.json | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/blusunrize/immersiveengineering/client/IEManual.java b/src/main/java/blusunrize/immersiveengineering/client/IEManual.java index 52677ebbae..0103f66a12 100644 --- a/src/main/java/blusunrize/immersiveengineering/client/IEManual.java +++ b/src/main/java/blusunrize/immersiveengineering/client/IEManual.java @@ -190,7 +190,7 @@ private static Pair> getMineralVeinTexts() String biomeText = mineral.biomeTagPredicates.stream().map( biomeTagPredicate -> biomeTagPredicate.tags().stream().map(biomeTagKey -> { // translate biome tags where possible, fall back to location path otherwise - String key = "ie.manual.entry.minerals.biome_tag."+biomeTagKey.location(); + String key = biomeTagKey.location().toLanguageKey("tag.biome").replaceAll("/", "."); if(I18n.exists(key)) return I18n.get(key); else diff --git a/src/main/resources/assets/immersiveengineering/lang/en_us.json b/src/main/resources/assets/immersiveengineering/lang/en_us.json index 5e011eafd7..fa869d72f9 100644 --- a/src/main/resources/assets/immersiveengineering/lang/en_us.json +++ b/src/main/resources/assets/immersiveengineering/lang/en_us.json @@ -1395,18 +1395,18 @@ "ie.manual.entry.mineral_title": "Mineral Deposits", "ie.manual.entry.mineral_subtitle": "Oresome", "ie.manual.entry.minerals_desc": "%1$s\nIt consists of: %2$s\n\nIts spoils are:%3$s", - "ie.manual.entry.minerals.biomes": "§l%1$s§r is a mineral vein found in biomes that are %2$s.\n", + "ie.manual.entry.minerals.biomes": "§l%1$s§r is a mineral vein found in biomes that are %2$s.", "ie.manual.entry.minerals.biomes_or": "%1$s or %2$s", "ie.manual.entry.minerals.biomes_and": "%1$s and are %2$s", - "ie.manual.entry.minerals.biome_tag.minecraft:is_overworld": "in the overworld", - "ie.manual.entry.minerals.biome_tag.minecraft:is_nether": "in the nether", - "ie.manual.entry.minerals.biome_tag.minecraft:is_mountain": "mountainous", - "ie.manual.entry.minerals.biome_tag.minecraft:is_ocean": "oceanic", - "ie.manual.entry.minerals.biome_tag.minecraft:is_river": "rivers", - "ie.manual.entry.minerals.biome_tag.minecraft:is_badlands": "badlands", - "ie.manual.entry.minerals.biome_tag.minecraft:is_taiga": "taigas", - "ie.manual.entry.minerals.biome_tag.immersiveengineering:generate_hardened_clay_pan": "flat and dry", - "ie.manual.entry.minerals.biome_tag.immersiveengineering:generate_ancient_seabed": "swampy or growing corals", + "tag.biome.minecraft.is_overworld": "in the overworld", + "tag.biome.minecraft.is_nether": "in the nether", + "tag.biome.minecraft.is_mountain": "mountainous", + "tag.biome.minecraft.is_ocean": "oceanic", + "tag.biome.minecraft.is_river": "rivers", + "tag.biome.minecraft.is_badlands": "badlands", + "tag.biome.minecraft.is_taiga": "taigas", + "tag.biome.immersiveengineering.generate_hardened_clay_pan": "flat and dry", + "tag.biome.immersiveengineering.generate_ancient_seabed": "swampy or growing corals", "ie.manual.newerVersion": " - New!", "ie.manual.currentVersion": " - Current", "ie.manual.entry.mineralsDimAny": "§l%1$s§r is a mineral vein that can be found in any dimension.", From cdee55eb3654cbe7a759592a7b5d34aae3814b6e Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Sun, 31 Mar 2024 13:37:23 +0200 Subject: [PATCH 22/26] Change datagen for minerals to allow varargs --- .../data/recipes/MiscRecipes.java | 14 +++++++------- .../data/recipes/builder/MineralMixBuilder.java | 8 +++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index 209c44a669..cfcefd2ddf 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -336,7 +336,7 @@ private void mineralMixes(RecipeOutput out) // Rocks & decoration MineralMixBuilder.builder() .dimensionOverworld() - .biomeCondition(ImmutableSet.of(BiomeTags.IS_RIVER)) + .biomeCondition(BiomeTags.IS_RIVER) .addSoilSpoils() .ore(Items.CLAY, .6f) .ore(Items.SAND, .4f) @@ -355,7 +355,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/igneous_rock")); MineralMixBuilder.builder() .dimensionOverworld() - .biomeCondition(ImmutableSet.of(IETags.generateClaypan)) + .biomeCondition(IETags.generateClaypan) .addSoilSpoils() .ore(Items.TERRACOTTA, .6f) .ore(Items.RED_SANDSTONE, .3f) @@ -365,7 +365,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/hardened_clay_pan")); MineralMixBuilder.builder() .dimensionOverworld() - .biomeCondition(ImmutableSet.of(IETags.generateSeabed)) + .biomeCondition(IETags.generateSeabed) .addSeabedSpoils() .ore(Blocks.CALCITE, .65f) .ore(Blocks.DRIPSTONE_BLOCK, .3f) @@ -403,7 +403,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/banded_iron")); MineralMixBuilder.builder() .dimensionOverworld() - .biomeCondition(ImmutableSet.of(BiomeTags.IS_MOUNTAIN)) + .biomeCondition(BiomeTags.IS_MOUNTAIN) .addOverworldSpoils() .ore(iron, .5f) .ore(copper, .45f) @@ -472,7 +472,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/lazulitic_intrusion")); MineralMixBuilder.builder() .dimensionOverworld() - .biomeCondition(ImmutableSet.of(BiomeTags.IS_MOUNTAIN, BiomeTags.IS_OCEAN)) + .biomeCondition(BiomeTags.IS_MOUNTAIN, BiomeTags.IS_OCEAN) .addOverworldSpoils() .ore(emerald, .3f) .ore(prismarine, .7f) @@ -482,7 +482,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/beryl")); MineralMixBuilder.builder() .dimensionOverworld() - .biomeCondition(ImmutableSet.of(BiomeTags.IS_RIVER)) + .biomeCondition(BiomeTags.IS_RIVER) .addSoilSpoils() .ore(Tags.Items.GEMS_DIAMOND, .2f) .ore(Items.CLAY, .4f) @@ -492,7 +492,7 @@ private void mineralMixes(RecipeOutput out) .build(out, toRL("mineral/alluvial_sift")); MineralMixBuilder.builder() .dimensionOverworld() - .biomeCondition(ImmutableSet.of(BiomeTags.IS_BADLANDS, BiomeTags.IS_TAIGA)) + .biomeCondition(BiomeTags.IS_BADLANDS, BiomeTags.IS_TAIGA) .addOverworldSpoils() .ore(uranium, .6f) .ore(lead, .4f) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java index ca7440ef65..6dfd20f0d1 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/builder/MineralMixBuilder.java @@ -12,6 +12,7 @@ import blusunrize.immersiveengineering.api.crafting.TagOutput; import blusunrize.immersiveengineering.api.excavator.MineralMix; import blusunrize.immersiveengineering.api.excavator.MineralMix.BiomeTagPredicate; +import com.google.common.collect.ImmutableSet; import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BiomeTags; @@ -27,7 +28,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.Set; public class MineralMixBuilder extends IERecipeBuilder { @@ -47,9 +47,11 @@ public static MineralMixBuilder builder() return new MineralMixBuilder(); } - public MineralMixBuilder biomeCondition(Set> tags) + @SafeVarargs + public final MineralMixBuilder biomeCondition(TagKey... tags) { - this.biomeTagPredicates.add(new BiomeTagPredicate(tags)); + // normal Set.of results in varying order of elements during datagen + this.biomeTagPredicates.add(new BiomeTagPredicate(ImmutableSet.copyOf(tags))); return this; } From 243bc09c7e36354e53fb7a90bf44dce76b0dc919 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Sun, 31 Mar 2024 13:43:07 +0200 Subject: [PATCH 23/26] Add a forge-namespace tag for swamps --- .../java/blusunrize/immersiveengineering/api/IETags.java | 1 + .../blusunrize/immersiveengineering/data/BiomeTags.java | 7 +++++-- .../.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 | 5 +++-- .../resources/data/forge/tags/worldgen/biome/is_swamp.json | 6 ++++++ .../tags/worldgen/biome/generate_ancient_seabed.json | 3 +-- 5 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 src/generated/resources/data/forge/tags/worldgen/biome/is_swamp.json diff --git a/src/api/java/blusunrize/immersiveengineering/api/IETags.java b/src/api/java/blusunrize/immersiveengineering/api/IETags.java index d4e89a9b4a..f9ba5b9389 100644 --- a/src/api/java/blusunrize/immersiveengineering/api/IETags.java +++ b/src/api/java/blusunrize/immersiveengineering/api/IETags.java @@ -151,6 +151,7 @@ public class IETags public static final TagKey> shaderbagWhitelist = createEntityWrapper(rl("shaderbag/whitelist")); public static final TagKey> shaderbagBlacklist = createEntityWrapper(rl("shaderbag/blacklist")); + public static final TagKey is_swamp = createBiomeWrapper(forgeLoc("is_swamp")); public static final TagKey generateClaypan = createBiomeWrapper(rl("generate_hardened_clay_pan")); public static final TagKey generateSeabed = createBiomeWrapper(rl("generate_ancient_seabed")); diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java b/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java index 9d06f17838..d89d8e335e 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/BiomeTags.java @@ -32,6 +32,10 @@ public BiomeTags(PackOutput output, CompletableFuture lookupProvider, @Override protected void addTags(Provider p_255894_) { + // swamps + tag(IETags.is_swamp) + .add(Biomes.SWAMP) + .add(Biomes.MANGROVE_SWAMP); // deserts, plains, mesas, savannas, ice plains tag(IETags.generateClaypan) .add(Biomes.DESERT) @@ -42,8 +46,7 @@ protected void addTags(Provider p_255894_) .add(Biomes.SNOWY_PLAINS); // swamps, beaches, coral reefs, stony shore tag(IETags.generateSeabed) - .add(Biomes.SWAMP) - .add(Biomes.MANGROVE_SWAMP) + .addTag(IETags.is_swamp) .addTag(net.minecraft.tags.BiomeTags.IS_BEACH) .add(Biomes.WARM_OCEAN) .add(Biomes.STONY_SHORE); diff --git a/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 b/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 index 77e3794068..68cc2f0400 100644 --- a/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 +++ b/src/generated/resources/.cache/d4272b005efbbf8ba3224ba0d84674e2a73e6436 @@ -1,3 +1,4 @@ -// 1.20.4 2024-03-31T13:21:55.5779162 IE biome tags -d45ecfba197394907e27e9146636de63184c8c82 data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json +// 1.20.4 2024-03-31T13:39:54.2309202 IE biome tags +6525dda69924a36f16797ed873bffc083e1f4de5 data/forge/tags/worldgen/biome/is_swamp.json +c0c470427a11897933a7e68932e0d3cb25c14915 data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json af85e3ac097959db37cc110a60aa2ecd62a3216b data/immersiveengineering/tags/worldgen/biome/generate_hardened_clay_pan.json diff --git a/src/generated/resources/data/forge/tags/worldgen/biome/is_swamp.json b/src/generated/resources/data/forge/tags/worldgen/biome/is_swamp.json new file mode 100644 index 0000000000..0f5eb22e0c --- /dev/null +++ b/src/generated/resources/data/forge/tags/worldgen/biome/is_swamp.json @@ -0,0 +1,6 @@ +{ + "values": [ + "minecraft:swamp", + "minecraft:mangrove_swamp" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json b/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json index 131ad6a069..cfe1724ed9 100644 --- a/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json +++ b/src/generated/resources/data/immersiveengineering/tags/worldgen/biome/generate_ancient_seabed.json @@ -1,7 +1,6 @@ { "values": [ - "minecraft:swamp", - "minecraft:mangrove_swamp", + "#forge:is_swamp", "#minecraft:is_beach", "minecraft:warm_ocean", "minecraft:stony_shore" From 834ed6205ab0b9027b8f4cc7472cc2420c1cf5bb Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Sun, 31 Mar 2024 13:43:39 +0200 Subject: [PATCH 24/26] Put Silt in swamps and oceans as well --- .../immersiveengineering/data/recipes/MiscRecipes.java | 2 +- .../data/immersiveengineering/recipes/mineral/silt.json | 4 +++- .../resources/assets/immersiveengineering/lang/en_us.json | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index cfcefd2ddf..6747330092 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -336,7 +336,7 @@ private void mineralMixes(RecipeOutput out) // Rocks & decoration MineralMixBuilder.builder() .dimensionOverworld() - .biomeCondition(BiomeTags.IS_RIVER) + .biomeCondition(BiomeTags.IS_RIVER, IETags.is_swamp, BiomeTags.IS_OCEAN) .addSoilSpoils() .ore(Items.CLAY, .6f) .ore(Items.SAND, .4f) diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json index ba8d94f767..767510c421 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/silt.json @@ -5,7 +5,9 @@ "minecraft:is_overworld" ], [ - "minecraft:is_river" + "minecraft:is_river", + "forge:is_swamp", + "minecraft:is_ocean" ] ], "fail_chance": 0.2, diff --git a/src/main/resources/assets/immersiveengineering/lang/en_us.json b/src/main/resources/assets/immersiveengineering/lang/en_us.json index fa869d72f9..5d3d0a57e3 100644 --- a/src/main/resources/assets/immersiveengineering/lang/en_us.json +++ b/src/main/resources/assets/immersiveengineering/lang/en_us.json @@ -1405,6 +1405,7 @@ "tag.biome.minecraft.is_river": "rivers", "tag.biome.minecraft.is_badlands": "badlands", "tag.biome.minecraft.is_taiga": "taigas", + "tag.biome.forge.is_swamp": "swamps", "tag.biome.immersiveengineering.generate_hardened_clay_pan": "flat and dry", "tag.biome.immersiveengineering.generate_ancient_seabed": "swampy or growing corals", "ie.manual.newerVersion": " - New!", From b3ea4b35803005d7c901569e280a4d2093ac4215 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Sun, 31 Mar 2024 13:51:09 +0200 Subject: [PATCH 25/26] Add Rich Auricupride in mesa biomes, reduce gold content in normal Auricupride --- .../data/recipes/MiscRecipes.java | 11 +++- .../recipes/mineral/auricupride.json | 8 +-- .../recipes/mineral/rich_auricupride.json | 55 +++++++++++++++++++ .../immersiveengineering/lang/en_us.json | 1 + 4 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 src/generated/resources/data/immersiveengineering/recipes/mineral/rich_auricupride.json diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java index 6747330092..c9786de467 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/recipes/MiscRecipes.java @@ -423,11 +423,20 @@ private void mineralMixes(RecipeOutput out) MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() + .ore(copper, .7f) + .ore(gold, .3f) + .weight(20) + .failchance(.1f) + .build(out, toRL("mineral/auricupride")); + MineralMixBuilder.builder() + .dimensionOverworld() + .biomeCondition(BiomeTags.IS_BADLANDS) + .addOverworldSpoils() .ore(gold, .6f) .ore(copper, .4f) .weight(20) .failchance(.1f) - .build(out, toRL("mineral/auricupride")); + .build(out, toRL("mineral/rich_auricupride")); MineralMixBuilder.builder() .dimensionOverworld() .addOverworldSpoils() diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json index e6b5387b99..183d5d7ea4 100644 --- a/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/auricupride.json @@ -8,17 +8,17 @@ "fail_chance": 0.1, "ores": [ { - "chance": 0.6, + "chance": 0.7, "conditions": [], "output": { - "tag": "forge:ores/gold" + "tag": "forge:ores/copper" } }, { - "chance": 0.4, + "chance": 0.3, "conditions": [], "output": { - "tag": "forge:ores/copper" + "tag": "forge:ores/gold" } } ], diff --git a/src/generated/resources/data/immersiveengineering/recipes/mineral/rich_auricupride.json b/src/generated/resources/data/immersiveengineering/recipes/mineral/rich_auricupride.json new file mode 100644 index 0000000000..7585e10b2d --- /dev/null +++ b/src/generated/resources/data/immersiveengineering/recipes/mineral/rich_auricupride.json @@ -0,0 +1,55 @@ +{ + "type": "immersiveengineering:mineral_mix", + "biome_predicates": [ + [ + "minecraft:is_overworld" + ], + [ + "minecraft:is_badlands" + ] + ], + "fail_chance": 0.1, + "ores": [ + { + "chance": 0.6, + "conditions": [], + "output": { + "tag": "forge:ores/gold" + } + }, + { + "chance": 0.4, + "conditions": [], + "output": { + "tag": "forge:ores/copper" + } + } + ], + "spoils": [ + { + "chance": 0.2, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:gravel" + } + }, + { + "chance": 0.5, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:cobblestone" + } + }, + { + "chance": 0.3, + "conditions": [], + "output": { + "Count": 1, + "id": "minecraft:cobbled_deepslate" + } + } + ], + "weight": 20 +} \ No newline at end of file diff --git a/src/main/resources/assets/immersiveengineering/lang/en_us.json b/src/main/resources/assets/immersiveengineering/lang/en_us.json index 5d3d0a57e3..182ff1ca98 100644 --- a/src/main/resources/assets/immersiveengineering/lang/en_us.json +++ b/src/main/resources/assets/immersiveengineering/lang/en_us.json @@ -253,6 +253,7 @@ "desc.immersiveengineering.info.mineral.chalcopyrite": "Chalcopyrite", "desc.immersiveengineering.info.mineral.laterite": "Laterite", "desc.immersiveengineering.info.mineral.auricupride": "Auricupride", + "desc.immersiveengineering.info.mineral.rich_auricupride": "Rich Auricupride", "desc.immersiveengineering.info.mineral.galena": "Galena", "desc.immersiveengineering.info.mineral.cinnabar": "Cinnabar", "desc.immersiveengineering.info.mineral.uraninite": "Uraninite", From 2f44dae89c77e4f9ff38612c60c6d4515ad15e93 Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Mon, 1 Apr 2024 10:50:09 +0200 Subject: [PATCH 26/26] Fix datagen after rebase --- .../9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e index 71a0193dfc..d1264ab5e0 100644 --- a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -1,4 +1,4 @@ -// 1.20.4 2024-03-31T21:07:25.015347824 Recipes +// 1.20.4 2024-04-01T10:49:35.9333709 Recipes d26086952b40806bc38c90c09b98813f12205a0d data/immersiveengineering/advancements/recipes/misc/crafting/alloybrick.json b9b65ae84fb439073534ac46e2e74644d1239f0a data/immersiveengineering/advancements/recipes/misc/crafting/alloybrick_from_slab.json 5dd470beb97dbd63fc44761ae16283bf3e542d5b data/immersiveengineering/advancements/recipes/misc/crafting/alloybrick_to_slab.json @@ -1439,27 +1439,29 @@ f2ee6e0647afeb9aca70247a45fc5dee53bdf9be data/immersiveengineering/recipes/metal ead2f5c29c05c8db9adeaa77bdb45444ad3555ee data/immersiveengineering/recipes/metalpress/wire_tungsten.json 0cbfca730c5193359cb65562508e985ef240eef1 data/immersiveengineering/recipes/metalpress/wire_uranium.json 93043898e47c1291c4e383a8201f729e7defae06 data/immersiveengineering/recipes/metalpress/wire_zinc.json -07359d45256f73827b809721138626732b1b13da data/immersiveengineering/recipes/mineral/amethyst_crevasse.json -2a4e810fcc07e8c31b390930828d046045465eab data/immersiveengineering/recipes/mineral/ancient_debris.json -7e6b884440ab912610020a26e6ef2fa452260828 data/immersiveengineering/recipes/mineral/ancient_seabed.json -7b59c1cbeb987f14d5b286c516edd0407455dcb9 data/immersiveengineering/recipes/mineral/auricupride.json -25367a44c2ec3a813eed089148cd110777d76c05 data/immersiveengineering/recipes/mineral/beryl.json -88f7d598016e19fa333429f9190dd4ba80d74d6e data/immersiveengineering/recipes/mineral/bituminous_coal.json -b80bccc0d054c6b7e7f74347e5df137cc7c1108d data/immersiveengineering/recipes/mineral/cassiterite.json -17c45d236339ad63c12e8f74de0b3db6e62f1960 data/immersiveengineering/recipes/mineral/chalcopyrite.json -9b3ce8ca5b6f3edd310af58ad2fa76b24089ef78 data/immersiveengineering/recipes/mineral/cinnabar.json -36c6f03e98423627a80a692afdf898e14df3fe33 data/immersiveengineering/recipes/mineral/cooled_lava_tube.json -7fff7021c1bfa22fa7ea305f11778421151ec0d6 data/immersiveengineering/recipes/mineral/cooperite.json -203cb863c65d90df2982a240f2b992b2d1702e16 data/immersiveengineering/recipes/mineral/galena.json -99d362e93d0a3a23da84b1cd4e4ae59caa8adc86 data/immersiveengineering/recipes/mineral/hardened_clay_pan.json -aaae17ec90d6570502f18c9375b9bce8bf0a17fd data/immersiveengineering/recipes/mineral/igneous_rock.json -3b692d0e83da191d4ee9b508b556d795bf5345cd data/immersiveengineering/recipes/mineral/laterite.json -4558a3d58ead280f9b113835e404327625570507 data/immersiveengineering/recipes/mineral/mephitic_quarzite.json -efa5bf69af8f6115ab9eb7117261fe2e110201d0 data/immersiveengineering/recipes/mineral/nether_silt.json -b433023f141edc382d6a4669261c58b065539f09 data/immersiveengineering/recipes/mineral/pentlandite.json -c53e0a17ab50626e86bde74f1ad7ae39f358ebf7 data/immersiveengineering/recipes/mineral/silt.json -ab87809f431a8c88dac00e38a6be88722e5a4e07 data/immersiveengineering/recipes/mineral/uraninite.json -1a9863318fded18fd56a0793d1b33103374ae28a data/immersiveengineering/recipes/mineral/wolframite.json +ae47c1cba794eb985b7d11810acbcfad7fe594ef data/immersiveengineering/recipes/mineral/alluvial_sift.json +e0964ea0049199c73ca3091443adfe6147a8d5e9 data/immersiveengineering/recipes/mineral/amethyst_crevasse.json +e4c235d2fbbfd137ba187e9d0dd5c023470c593c data/immersiveengineering/recipes/mineral/ancient_debris.json +0d12de50910586f58bd932569ff35ec62fb3fc09 data/immersiveengineering/recipes/mineral/ancient_seabed.json +2fc85132d541135f9650806615cc87f37f81ef11 data/immersiveengineering/recipes/mineral/auricupride.json +769a0f57b52e52daf4250975f79d36f0c0b6bd26 data/immersiveengineering/recipes/mineral/banded_iron.json +ab7db906b54f740468bc92e601a8d4919d5bef8b data/immersiveengineering/recipes/mineral/beryl.json +fc0393d3cae80c2916d641b1f246ad16e5bdce83 data/immersiveengineering/recipes/mineral/bituminous_coal.json +663e5bb45ce2df2328f907923888f7826021627f data/immersiveengineering/recipes/mineral/chalcopyrite.json +7e89087768c576b17303be1015b1a3e0e1e19d7d data/immersiveengineering/recipes/mineral/cinnabar.json +4acac84fb45c0571f4c001aa34d1ac8c58cc3896 data/immersiveengineering/recipes/mineral/cooled_lava_tube.json +15d63c970c5c2f92ec8e85636e0c4b5c3f3d3a61 data/immersiveengineering/recipes/mineral/galena.json +c62ff0905e49bf7435354c99364e42dc3786d230 data/immersiveengineering/recipes/mineral/hardened_clay_pan.json +2593adfb428580b31c3c32292c285510fc7d2893 data/immersiveengineering/recipes/mineral/igneous_rock.json +292b2281aae9a85953373fb4a2b3391573894664 data/immersiveengineering/recipes/mineral/laterite.json +24e9c909c2bcf9b8093f64e4a77ab30ee21fc76d data/immersiveengineering/recipes/mineral/lazulitic_intrusion.json +5c7136d546630f9ed87eb408141f38573e873c4c data/immersiveengineering/recipes/mineral/mephitic_quarzite.json +6e94253f875893a021d13944c9a26ac90a04a316 data/immersiveengineering/recipes/mineral/nether_silt.json +6b0503f7830a9b804f2d3bc51c1fa70019f53e61 data/immersiveengineering/recipes/mineral/pentlandite.json +84ec716ae3e4be2b08c07fee9a6f586f4968f852 data/immersiveengineering/recipes/mineral/rich_auricupride.json +042d15fda3ce9dbc51c130f0dd3654479c9028f2 data/immersiveengineering/recipes/mineral/silt.json +5588a4da17d6fe91d6bdd0f0197a8917b9477c21 data/immersiveengineering/recipes/mineral/uraninite.json +063fb4a978684f34bbaa9afb477daf5f778521c6 data/immersiveengineering/recipes/mineral/wolframite.json 8194166fddfc71775216dcad285b1b5191d3158f data/immersiveengineering/recipes/mixer/concrete.json 9e2588c33fdfde6ed553f448873b835839c6f9a3 data/immersiveengineering/recipes/mixer/herbicide.json c99c046ee9a58554ecbffdb62b33dba39c856867 data/immersiveengineering/recipes/mixer/redstone_acid.json