From b21e4cbb21960981541f0fdc13b7ae2845d49c0b Mon Sep 17 00:00:00 2001 From: Eugene <59817721+SKZGx@users.noreply.github.com> Date: Thu, 20 Jun 2024 21:08:06 +0300 Subject: [PATCH] SALT_CAVES ADDED --- .../ukrainian_dlight/UkrainianDelight.java | 8 +- .../ukrainian_dlight/features/Features.java | 27 +++ .../features/features/SaltCavesFeature.java | 108 +++++++++++ .../config/SaltCavesFeatureConfig.java | 20 +++ .../ukrainian_dlight/gen/BiomeKeys.java | 16 ++ .../ukrainian_dlight/gen/CaveBiomes.java | 51 ++++++ .../mixin/VanillaBiomeParametersMixin.java | 26 +++ .../ukrainian_dlight/util/Config.java | 7 + .../util/VanillaBiomeParametersHelper.java | 26 +++ .../assets/ukrainian_delight/lang/en_us.json | 1 + .../tags/worldgen/biome/salt_caves.json | 6 + .../worldgen/biome/salt_caves.json | 168 ++++++++++++++++++ .../worldgen/configured_feature/ore_salt.json | 18 ++ .../worldgen/placed_feature/ore_salt.json | 27 +++ .../resources/ukrainian-delight.mixins.json | 3 +- 15 files changed, 510 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/megatrex4/ukrainian_dlight/features/Features.java create mode 100644 src/main/java/com/megatrex4/ukrainian_dlight/features/features/SaltCavesFeature.java create mode 100644 src/main/java/com/megatrex4/ukrainian_dlight/features/features/config/SaltCavesFeatureConfig.java create mode 100644 src/main/java/com/megatrex4/ukrainian_dlight/gen/BiomeKeys.java create mode 100644 src/main/java/com/megatrex4/ukrainian_dlight/gen/CaveBiomes.java create mode 100644 src/main/java/com/megatrex4/ukrainian_dlight/mixin/VanillaBiomeParametersMixin.java create mode 100644 src/main/java/com/megatrex4/ukrainian_dlight/util/Config.java create mode 100644 src/main/java/com/megatrex4/ukrainian_dlight/util/VanillaBiomeParametersHelper.java create mode 100644 src/main/resources/data/ukrainian_delight/tags/worldgen/biome/salt_caves.json create mode 100644 src/main/resources/data/ukrainian_delight/worldgen/biome/salt_caves.json create mode 100644 src/main/resources/data/ukrainian_delight/worldgen/configured_feature/ore_salt.json create mode 100644 src/main/resources/data/ukrainian_delight/worldgen/placed_feature/ore_salt.json diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/UkrainianDelight.java b/src/main/java/com/megatrex4/ukrainian_dlight/UkrainianDelight.java index dfa9e62..a54ccfd 100644 --- a/src/main/java/com/megatrex4/ukrainian_dlight/UkrainianDelight.java +++ b/src/main/java/com/megatrex4/ukrainian_dlight/UkrainianDelight.java @@ -6,6 +6,7 @@ import com.megatrex4.ukrainian_dlight.item.ModItemGroups; import com.megatrex4.ukrainian_dlight.item.ModItems; import com.megatrex4.ukrainian_dlight.item.ToolTipHelper; +import com.megatrex4.ukrainian_dlight.util.Config; import net.fabricmc.api.ModInitializer; import net.minecraft.entity.damage.DamageType; @@ -14,13 +15,18 @@ import net.minecraft.util.Identifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Objects; public class UkrainianDelight implements ModInitializer { public static final String MOD_ID = "ukrainian_delight"; public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); - public static final RegistryKey GLASS_DAMAGE = RegistryKey.of(RegistryKeys.DAMAGE_TYPE, new Identifier("ukrainian_delight", "glass_damage")); + + public static Identifier id(String id) { + return new Identifier(MOD_ID, id); + } + @Override public void onInitialize() { RegistryKey GLASS_DAMAGE; diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/features/Features.java b/src/main/java/com/megatrex4/ukrainian_dlight/features/Features.java new file mode 100644 index 0000000..df782ec --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/features/Features.java @@ -0,0 +1,27 @@ +package com.megatrex4.ukrainian_dlight.features; + +import com.megatrex4.ukrainian_dlight.UkrainianDelight; +import com.megatrex4.ukrainian_dlight.features.features.SaltCavesFeature; +import com.megatrex4.ukrainian_dlight.features.features.config.SaltCavesFeatureConfig; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.world.gen.feature.Feature; +import net.minecraft.world.gen.feature.FeatureConfig; + +public class Features { + + private static > F register(String id, F feature) { + return (F) Registry.register(Registries.FEATURE, UkrainianDelight.id(id), feature); + } + + public final static Feature SALT_CAVES_FEATURE; + + static { + SALT_CAVES_FEATURE = register("salt_caves_feature", new SaltCavesFeature(SaltCavesFeatureConfig.CODEC)); + } + + public static void init() { + new Features(); + } + +} diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/features/features/SaltCavesFeature.java b/src/main/java/com/megatrex4/ukrainian_dlight/features/features/SaltCavesFeature.java new file mode 100644 index 0000000..33567c0 --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/features/features/SaltCavesFeature.java @@ -0,0 +1,108 @@ +package com.megatrex4.ukrainian_dlight.features.features; + + +import com.megatrex4.ukrainian_dlight.features.features.config.SaltCavesFeatureConfig; +import com.mojang.serialization.Codec; +import net.minecraft.block.BlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.StructureWorldAccess; +import net.minecraft.world.gen.feature.Feature; +import net.minecraft.world.gen.feature.util.FeatureContext; + +public class SaltCavesFeature extends Feature { + public SaltCavesFeature(Codec configCodec) { + super(configCodec); + } + + private static final Direction[] DIRECTIONS = {Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST}; + + @Override + public boolean generate(FeatureContext context) { + BlockPos origin = context.getOrigin(); + StructureWorldAccess world = context.getWorld(); + Random random = context.getRandom(); + + SaltCavesFeatureConfig config = context.getConfig(); + int minSize = config.size().getMin(); + int size = config.size().get(random); + int amount = config.amount().get(random); + int spread = config.spread().get(random) / 2; + BlockState innerState = config.innerState(); + BlockState outerState = config.outerState(); + + spread = spread < 16 ? spread : 16; + + if (!world.isAir(origin) || world.isAir(origin.up())) { + return false; + } + + makeOneIcicle(world, origin, size, innerState, outerState, random); + amount -= 1; + + while (amount > 0) { + amount -= 1; + BlockPos.Mutable mutable = origin.mutableCopy(); + mutable = mutable.add(random.nextInt(1 + spread * 2) - spread, 0, random.nextInt(1 + spread * 2) - spread).mutableCopy(); + + boolean bl = false; + + if (world.isAir(mutable) && world.isAir(mutable.up())) { + for (int i = 0; i < 3 && !bl; i += 1) { + mutable = mutable.add(0, 1, 0).mutableCopy(); + + if (world.isAir(mutable) && !world.isAir(mutable.up()) && !world.isAir(mutable.up(2))) { + bl = true; + } + } + } else if (!world.isAir(mutable)) { + for (int i = 0; i < 3 && !bl; i += 1) { + mutable = mutable.add(0, -1, 0).mutableCopy(); + + if (world.isAir(mutable) && !world.isAir(mutable.up()) && !world.isAir(mutable.up(2))) { + bl = true; + } + } + } + + int nextSize = random.nextInt(size) + 1; + nextSize = nextSize > minSize ? nextSize : minSize; + + if (!world.isAir(mutable.up()) && !world.isAir(mutable.up(2))) makeOneIcicle(world, mutable, nextSize, innerState, outerState, random); + } + + return true; + } + + public static void makeOneIcicle(StructureWorldAccess world, BlockPos origin, int size, BlockState innerState, BlockState outerState, Random random) { + BlockPos.Mutable cursor = origin.mutableCopy(); + + for (int i = 0; i < -1 + (2 * size / 3); i += 1) { + if (world.isAir(cursor)) { + world.setBlockState(cursor, innerState, 0); + } else { + break; + } + + cursor = cursor.down().mutableCopy(); + } + + for (int i = 0; i < 1 + (size / 3); i += 1) { + if (world.isAir(cursor)) { + world.setBlockState(cursor, outerState, 0); + } else { + break; + } + + cursor = cursor.down().mutableCopy(); + } + + if (size > 3) { + for (Direction d : DIRECTIONS) { + if (world.isAir(origin.offset(d)) && !world.isAir(origin.offset(d).up())) makeOneIcicle(world, origin.offset(d), random.nextInt(2 + (size / 3)), innerState, outerState, random); + } + } + } + +} diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/features/features/config/SaltCavesFeatureConfig.java b/src/main/java/com/megatrex4/ukrainian_dlight/features/features/config/SaltCavesFeatureConfig.java new file mode 100644 index 0000000..2c37132 --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/features/features/config/SaltCavesFeatureConfig.java @@ -0,0 +1,20 @@ +package com.megatrex4.ukrainian_dlight.features.features.config; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; + +import net.minecraft.block.BlockState; +import net.minecraft.util.math.intprovider.IntProvider; +import net.minecraft.world.gen.feature.FeatureConfig; + +public record SaltCavesFeatureConfig(IntProvider size, IntProvider amount, IntProvider spread, BlockState innerState, + BlockState outerState) implements FeatureConfig +{ + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + IntProvider.VALUE_CODEC.fieldOf("size").forGetter(SaltCavesFeatureConfig::size), + IntProvider.VALUE_CODEC.fieldOf("amount").forGetter(SaltCavesFeatureConfig::amount), + IntProvider.VALUE_CODEC.fieldOf("spread").forGetter(SaltCavesFeatureConfig::spread), + BlockState.CODEC.fieldOf("inner_state").forGetter(SaltCavesFeatureConfig::innerState), + BlockState.CODEC.fieldOf("outer_state").forGetter(SaltCavesFeatureConfig::outerState) + ).apply(instance, instance.stable(SaltCavesFeatureConfig::new))); +} diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/gen/BiomeKeys.java b/src/main/java/com/megatrex4/ukrainian_dlight/gen/BiomeKeys.java new file mode 100644 index 0000000..e24df52 --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/gen/BiomeKeys.java @@ -0,0 +1,16 @@ +package com.megatrex4.ukrainian_dlight.gen; + +import com.megatrex4.ukrainian_dlight.UkrainianDelight; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.world.biome.Biome; + +public class BiomeKeys { + + private static RegistryKey register(String name) { + return RegistryKey.of(RegistryKeys.BIOME, UkrainianDelight.id(name)); + } + + public static final RegistryKey SALT_CAVES = register("salt_caves"); + +} diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/gen/CaveBiomes.java b/src/main/java/com/megatrex4/ukrainian_dlight/gen/CaveBiomes.java new file mode 100644 index 0000000..09bdca8 --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/gen/CaveBiomes.java @@ -0,0 +1,51 @@ +package com.megatrex4.ukrainian_dlight.gen; + +import com.google.common.collect.ImmutableList; +import net.minecraft.registry.RegistryKey; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.source.util.MultiNoiseUtil; +import net.minecraft.world.biome.source.util.MultiNoiseUtil.ParameterRange; + +public class CaveBiomes { + + public static class CaveBiome { + public final ParameterRange temperature, humidity, continentalness, erosion, depth, weirdness; + public final float offset; + public final RegistryKey biome; + + public CaveBiome(ParameterRange temperature, ParameterRange humidity, ParameterRange continentalness, ParameterRange erosion, ParameterRange depth, ParameterRange weirdness, float offset, RegistryKey biome) { + this.temperature = temperature; + this.humidity = humidity; + this.continentalness = continentalness; + this.erosion = erosion; + this.depth = depth; + this.weirdness = weirdness; + this.offset = offset; + this.biome = biome; + } + + public static CaveBiome of(ParameterRange temperature, ParameterRange humidity, ParameterRange continentalness, ParameterRange erosion, ParameterRange depth, ParameterRange weirdness, float offset, RegistryKey biome) { + return new CaveBiome(temperature, humidity, continentalness, erosion, depth, weirdness, offset, biome); + } + } + + private static final MultiNoiseUtil.ParameterRange DEFAULT_PARAMETER = MultiNoiseUtil.ParameterRange.of(-1.0f, 1.0f); + static final ParameterRange ALL_HEIGHT_RANGE = ParameterRange.of(0.2f, 0.9f); + static final ParameterRange ALL_HEIGHT_RANGE_DEEPER = ParameterRange.of(-0.2f, 0.9f); + static final ParameterRange HIGH_RANGE = ParameterRange.of(0.55f, 0.9f); + + public final static ImmutableList DEFAULT_CAVE_BIOMES = ImmutableList.of( + // Existing biomes + CaveBiome.of( + ParameterRange.of(-1.0f, -0.6f), + DEFAULT_PARAMETER, + DEFAULT_PARAMETER, + DEFAULT_PARAMETER, + ALL_HEIGHT_RANGE, + ParameterRange.of(0.8f, 1.0f), + 0f, + BiomeKeys.SALT_CAVES + ) + ); + +} diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/mixin/VanillaBiomeParametersMixin.java b/src/main/java/com/megatrex4/ukrainian_dlight/mixin/VanillaBiomeParametersMixin.java new file mode 100644 index 0000000..4ad4da4 --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/mixin/VanillaBiomeParametersMixin.java @@ -0,0 +1,26 @@ +package com.megatrex4.ukrainian_dlight.mixin; + +import com.megatrex4.ukrainian_dlight.gen.CaveBiomes; +import com.megatrex4.ukrainian_dlight.gen.CaveBiomes.CaveBiome; +import com.megatrex4.ukrainian_dlight.util.VanillaBiomeParametersHelper; +import com.mojang.datafixers.util.Pair; +import net.minecraft.registry.RegistryKey; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.source.util.MultiNoiseUtil; +import net.minecraft.world.biome.source.util.VanillaBiomeParameters; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import java.util.function.Consumer; + +@Mixin(VanillaBiomeParameters.class) +public class VanillaBiomeParametersMixin { + @Inject(at = @At("RETURN"), method = "writeCaveBiomes") + private void init(Consumer>> parameters, CallbackInfo info) { + for (CaveBiome b : CaveBiomes.DEFAULT_CAVE_BIOMES) { + VanillaBiomeParametersHelper.writeCaveBiomeParameters(parameters, b.temperature, b.humidity, b.continentalness, b.erosion, b.depth, b.weirdness, b.offset, b.biome); + } + } +} diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/util/Config.java b/src/main/java/com/megatrex4/ukrainian_dlight/util/Config.java new file mode 100644 index 0000000..ca09dd5 --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/util/Config.java @@ -0,0 +1,7 @@ +package com.megatrex4.ukrainian_dlight.util; + +public class Config { + + public boolean generateSaltCaves = true; + +} diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/util/VanillaBiomeParametersHelper.java b/src/main/java/com/megatrex4/ukrainian_dlight/util/VanillaBiomeParametersHelper.java new file mode 100644 index 0000000..5a60960 --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/util/VanillaBiomeParametersHelper.java @@ -0,0 +1,26 @@ +package com.megatrex4.ukrainian_dlight.util; + +import com.megatrex4.ukrainian_dlight.gen.BiomeKeys; +import com.mojang.datafixers.util.Pair; +import net.minecraft.registry.RegistryKey; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.source.util.MultiNoiseUtil; + +public class VanillaBiomeParametersHelper { + public static void writeCaveBiomeParameters( + java.util.function.Consumer>> parameters, + MultiNoiseUtil.ParameterRange temperature, + MultiNoiseUtil.ParameterRange humidity, + MultiNoiseUtil.ParameterRange continentalness, + MultiNoiseUtil.ParameterRange erosion, + MultiNoiseUtil.ParameterRange depth, + MultiNoiseUtil.ParameterRange weirdness, + float offset, + RegistryKey biome) { + + parameters.accept(Pair.of( + MultiNoiseUtil.createNoiseHypercube(temperature, humidity, continentalness, erosion, depth, weirdness, offset), + biome + )); + } +} diff --git a/src/main/resources/assets/ukrainian_delight/lang/en_us.json b/src/main/resources/assets/ukrainian_delight/lang/en_us.json index 214e59f..0859f44 100644 --- a/src/main/resources/assets/ukrainian_delight/lang/en_us.json +++ b/src/main/resources/assets/ukrainian_delight/lang/en_us.json @@ -49,6 +49,7 @@ "_comment8": "misc", "death.attack.glass_damage": "%s was not careful with glass", "tooltip.ukrainian_delight.no_effects": "No effects", + "biome.ukrainian_delight.salt_caves": "Salt Caves", "amplifier.none": "", "amplifier.1": "", diff --git a/src/main/resources/data/ukrainian_delight/tags/worldgen/biome/salt_caves.json b/src/main/resources/data/ukrainian_delight/tags/worldgen/biome/salt_caves.json new file mode 100644 index 0000000..4232f6a --- /dev/null +++ b/src/main/resources/data/ukrainian_delight/tags/worldgen/biome/salt_caves.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "ukrainian_delight:salt_caves" + ] +} diff --git a/src/main/resources/data/ukrainian_delight/worldgen/biome/salt_caves.json b/src/main/resources/data/ukrainian_delight/worldgen/biome/salt_caves.json new file mode 100644 index 0000000..d0f917a --- /dev/null +++ b/src/main/resources/data/ukrainian_delight/worldgen/biome/salt_caves.json @@ -0,0 +1,168 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "minecraft:cave_extra_underground", + "minecraft:canyon" + ] + }, + "downfall": 0.5, + "effects": { + "fog_color": 12638463, + "mood_sound": { + "block_search_extent": 8, + "offset": 2.0, + "sound": "minecraft:ambient.cave", + "tick_delay": 6000 + }, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.lush_caves" + }, + "sky_color": 8103167, + "water_color": 4159204, + "water_fog_color": 329011 + }, + "features": [ + [], + [ + "minecraft:lake_lava_underground", + "minecraft:lake_lava_surface" + ], + [ + "minecraft:amethyst_geode" + ], + [ + "minecraft:monster_room", + "minecraft:monster_room_deep" + ], + [], + [], + [ + "minecraft:ore_dirt", + "minecraft:ore_gravel", + "minecraft:ore_granite_upper", + "minecraft:ore_granite_lower", + "minecraft:ore_diorite_upper", + "minecraft:ore_diorite_lower", + "minecraft:ore_andesite_upper", + "minecraft:ore_andesite_lower", + "minecraft:ore_tuff", + "minecraft:ore_coal_upper", + "minecraft:ore_coal_lower", + "minecraft:ore_iron_upper", + "minecraft:ore_iron_middle", + "minecraft:ore_iron_small", + "minecraft:ore_gold", + "minecraft:ore_gold_lower", + "minecraft:ore_redstone", + "minecraft:ore_redstone_lower", + "minecraft:ore_diamond", + "minecraft:ore_diamond_large", + "minecraft:ore_diamond_buried", + "minecraft:ore_lapis", + "minecraft:ore_lapis_buried", + "minecraft:ore_copper", + "minecraft:underwater_magma", + "ukrainian_delight:ore_salt", + "minecraft:disk_sand", + "minecraft:disk_gravel" + ], + [], + [ + "minecraft:spring_water", + "minecraft:spring_lava" + ], + [ + "minecraft:glow_lichen", + "minecraft:patch_tall_grass_2", + "minecraft:cave_vines", + "minecraft:rooted_azalea_tree", + "minecraft:spore_blossom", + "minecraft:classic_vines_cave_feature" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [ + { + "type": "minecraft:bat", + "maxCount": 8, + "minCount": 8, + "weight": 10 + } + ], + "axolotls": [ + { + "type": "minecraft:axolotl", + "maxCount": 6, + "minCount": 4, + "weight": 10 + } + ], + "creature": [], + "misc": [], + "monster": [ + { + "type": "minecraft:spider", + "maxCount": 4, + "minCount": 4, + "weight": 100 + }, + { + "type": "minecraft:zombie", + "maxCount": 4, + "minCount": 4, + "weight": 95 + }, + { + "type": "minecraft:zombie_villager", + "maxCount": 1, + "minCount": 1, + "weight": 5 + }, + { + "type": "minecraft:skeleton", + "maxCount": 4, + "minCount": 4, + "weight": 100 + }, + { + "type": "minecraft:creeper", + "maxCount": 4, + "minCount": 4, + "weight": 100 + }, + { + "type": "minecraft:witch", + "maxCount": 1, + "minCount": 1, + "weight": 5 + } + ], + "underground_water_creature": [ + { + "type": "minecraft:glow_squid", + "maxCount": 6, + "minCount": 4, + "weight": 10 + } + ], + "water_ambient": [ + { + "type": "minecraft:tropical_fish", + "maxCount": 8, + "minCount": 8, + "weight": 25 + } + ], + "water_creature": [] + }, + "temperature": 0.5 +} \ No newline at end of file diff --git a/src/main/resources/data/ukrainian_delight/worldgen/configured_feature/ore_salt.json b/src/main/resources/data/ukrainian_delight/worldgen/configured_feature/ore_salt.json new file mode 100644 index 0000000..f1cc995 --- /dev/null +++ b/src/main/resources/data/ukrainian_delight/worldgen/configured_feature/ore_salt.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:ore", + "config": { + "discard_chance_on_air_exposure": 0.0, + "size": 33, + "targets": [ + { + "state": { + "Name": "ukrainian_delight:salt_block" + }, + "target": { + "predicate_type": "minecraft:tag_match", + "tag": "minecraft:base_stone_overworld" + } + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/ukrainian_delight/worldgen/placed_feature/ore_salt.json b/src/main/resources/data/ukrainian_delight/worldgen/placed_feature/ore_salt.json new file mode 100644 index 0000000..7d2b860 --- /dev/null +++ b/src/main/resources/data/ukrainian_delight/worldgen/placed_feature/ore_salt.json @@ -0,0 +1,27 @@ +{ + "feature": "ukrainian_delight:ore_salt", + "placement": [ + { + "type": "minecraft:count", + "count": 46 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 256 + }, + "min_inclusive": { + "above_bottom": 0 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/ukrainian-delight.mixins.json b/src/main/resources/ukrainian-delight.mixins.json index 84398c2..427a2ac 100644 --- a/src/main/resources/ukrainian-delight.mixins.json +++ b/src/main/resources/ukrainian-delight.mixins.json @@ -8,7 +8,8 @@ "client": [ "ItemRendererAccessor", "ItemRendererMixin", - "ModelLoaderMixin" + "ModelLoaderMixin", + "VanillaBiomeParametersMixin" ], "injectors": { "defaultRequire": 1