From 07cf685ae9c9eb9cb5244de97b7fad59a6404655 Mon Sep 17 00:00:00 2001 From: PinkGoosik Date: Sat, 13 Jul 2024 13:44:01 +0500 Subject: [PATCH] fixes --- .../blocks/raw_cryomarble_shard.json | 18 ++++++++++-------- .../fabric/registry/WinterlyFeatures.java | 9 +++------ .../biome_modifier/underground_icicle.json | 4 ++-- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/winterly-common/src/main/resources/data/winterly/loot_table/blocks/raw_cryomarble_shard.json b/winterly-common/src/main/resources/data/winterly/loot_table/blocks/raw_cryomarble_shard.json index 540a6c5..e8aab09 100644 --- a/winterly-common/src/main/resources/data/winterly/loot_table/blocks/raw_cryomarble_shard.json +++ b/winterly-common/src/main/resources/data/winterly/loot_table/blocks/raw_cryomarble_shard.json @@ -14,14 +14,16 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], @@ -41,4 +43,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/winterly-fabric/src/main/java/ru/pinkgoosik/winterly/fabric/registry/WinterlyFeatures.java b/winterly-fabric/src/main/java/ru/pinkgoosik/winterly/fabric/registry/WinterlyFeatures.java index 47f1dd1..60327dd 100644 --- a/winterly-fabric/src/main/java/ru/pinkgoosik/winterly/fabric/registry/WinterlyFeatures.java +++ b/winterly-fabric/src/main/java/ru/pinkgoosik/winterly/fabric/registry/WinterlyFeatures.java @@ -2,13 +2,11 @@ import net.fabricmc.fabric.api.biome.v1.BiomeModifications; import net.fabricmc.fabric.api.biome.v1.ModificationPhase; +import net.fabricmc.fabric.api.tag.convention.v2.ConventionalBiomeTags; import net.minecraft.core.Registry; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.BiomeTags; -import net.minecraft.tags.TagKey; import net.minecraft.world.level.levelgen.GenerationStep; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.feature.Feature; @@ -37,14 +35,13 @@ public static void init() { BiomeModifications.create(Winterly.id("features")) .add(ModificationPhase.ADDITIONS, ctx -> { var entry = ctx.getBiomeRegistryEntry(); - var coldTag = TagKey.create(Registries.BIOME, ResourceLocation.fromNamespaceAndPath("c", "climate_cold")); - return !entry.is(BiomeTags.IS_NETHER) && !entry.is(BiomeTags.IS_END) && entry.is(coldTag); + return !entry.is(ConventionalBiomeTags.IS_NETHER) && !entry.is(ConventionalBiomeTags.IS_END) && entry.is(ConventionalBiomeTags.IS_COLD_OVERWORLD); }, ctx -> { ctx.getGenerationSettings().addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, UNDERGROUND_ICICLE_PLACED); }) .add(ModificationPhase.ADDITIONS, ctx -> { var entry = ctx.getBiomeRegistryEntry(); - return !entry.is(BiomeTags.IS_NETHER) && !entry.is(BiomeTags.IS_END); + return !entry.is(ConventionalBiomeTags.IS_NETHER) && !entry.is(ConventionalBiomeTags.IS_END); }, ctx -> { ctx.getGenerationSettings().addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, CRYOMARBLE_PLACED); }); diff --git a/winterly-neoforge/src/main/resources/data/winterly/neoforge/biome_modifier/underground_icicle.json b/winterly-neoforge/src/main/resources/data/winterly/neoforge/biome_modifier/underground_icicle.json index 759d169..143f33c 100644 --- a/winterly-neoforge/src/main/resources/data/winterly/neoforge/biome_modifier/underground_icicle.json +++ b/winterly-neoforge/src/main/resources/data/winterly/neoforge/biome_modifier/underground_icicle.json @@ -1,6 +1,6 @@ { "type": "neoforge:add_features", - "biomes": "#forge:is_cold/overworld", + "biomes": "#c:is_cold/overworld", "features": "winterly:underground_icicle", "step": "underground_decoration" -} \ No newline at end of file +}