From db3251b0486edcac1590b5895e5e279825e728e8 Mon Sep 17 00:00:00 2001 From: Noaaan Date: Sun, 29 Sep 2024 18:51:37 +0200 Subject: [PATCH] Migrate Aquarium to use convention tags Fixes #265 --- .../java/nourl/mythicmetals/MythicMetals.java | 3 +- .../mythicmetals/data/MythicOreKeys.java | 2 +- .../nourl/mythicmetals/data/MythicTags.java | 48 ++++++++++--------- .../tags/worldgen/biome/aquarium_biomes.json | 6 +++ 4 files changed, 34 insertions(+), 25 deletions(-) create mode 100644 src/main/resources/data/mythicmetals/tags/worldgen/biome/aquarium_biomes.json diff --git a/src/main/java/nourl/mythicmetals/MythicMetals.java b/src/main/java/nourl/mythicmetals/MythicMetals.java index a31b4c5f8..607b19567 100644 --- a/src/main/java/nourl/mythicmetals/MythicMetals.java +++ b/src/main/java/nourl/mythicmetals/MythicMetals.java @@ -131,8 +131,7 @@ public void onInitialize() { LOGGER.info("[Mythic Metals] Is that Jello? Here comes the colors, weeeeeee!"); } if (FabricLoader.getInstance().isModLoaded("terralith")) { - LOGGER.info("[Mythic Metals] Terralith detected. Please go over the config and disable Overworld Nether Ores"); - LOGGER.info("[Mythic Metals] Many ores spawn in unexpected ways due to the new overworld. Modpack devs, take note of this"); + LOGGER.info("[Mythic Metals] Terralith detected. Many ores can spawn in unexpected ways due to the new overworld. Modpack devs, take note of this"); } LOGGER.info("[Mythic Metals] Mythic Metals is now initialized."); } diff --git a/src/main/java/nourl/mythicmetals/data/MythicOreKeys.java b/src/main/java/nourl/mythicmetals/data/MythicOreKeys.java index 04d09e9ac..1e04505be 100644 --- a/src/main/java/nourl/mythicmetals/data/MythicOreKeys.java +++ b/src/main/java/nourl/mythicmetals/data/MythicOreKeys.java @@ -138,7 +138,7 @@ public static void init() { // Add Aquarium to Aquatic Biomes if (CONFIG.aquarium()) { - BiomeModifications.addFeature(BiomeSelectors.tag(ConventionalBiomeTags.AQUATIC), GenerationStep.Feature.UNDERGROUND_ORES, AQUARIUM); + BiomeModifications.addFeature(BiomeSelectors.tag(MythicTags.AQUARIUM_BIOMES), GenerationStep.Feature.UNDERGROUND_ORES, AQUARIUM); } // Add Prometheum to hot biomes if (CONFIG.prometheum()) { diff --git a/src/main/java/nourl/mythicmetals/data/MythicTags.java b/src/main/java/nourl/mythicmetals/data/MythicTags.java index 7f82b8de2..40fd20367 100644 --- a/src/main/java/nourl/mythicmetals/data/MythicTags.java +++ b/src/main/java/nourl/mythicmetals/data/MythicTags.java @@ -7,33 +7,37 @@ import net.minecraft.registry.tag.TagKey; import net.minecraft.util.Identifier; import net.minecraft.world.biome.Biome; -import nourl.mythicmetals.misc.RegistryHelper; + +import static net.minecraft.registry.RegistryKeys.BIOME; +import static net.minecraft.registry.RegistryKeys.ENCHANTMENT; +import static nourl.mythicmetals.misc.RegistryHelper.id; public class MythicTags { - public static final TagKey AUTO_REPAIR = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("abilities/auto_repair")); - public static final TagKey BONUS_FORTUNE = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("abilities/bonus_fortune")); - public static final TagKey BONUS_LOOTING = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("abilities/bonus_looting")); - public static final TagKey MIDAS_TOUCH = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("abilities/midas_touch")); - public static final TagKey CARMOT_STAFF_BLOCKS = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("carmot_staff_blocks")); + public static final TagKey AUTO_REPAIR = TagKey.of(RegistryKeys.ITEM, id("abilities/auto_repair")); + public static final TagKey BONUS_FORTUNE = TagKey.of(RegistryKeys.ITEM, id("abilities/bonus_fortune")); + public static final TagKey BONUS_LOOTING = TagKey.of(RegistryKeys.ITEM, id("abilities/bonus_looting")); + public static final TagKey MIDAS_TOUCH = TagKey.of(RegistryKeys.ITEM, id("abilities/midas_touch")); + public static final TagKey CARMOT_STAFF_BLOCKS = TagKey.of(RegistryKeys.ITEM, id("carmot_staff_blocks")); public static final TagKey COMMON_ARMOR = TagKey.of(RegistryKeys.ITEM, Identifier.of("c", "armor")); public static final TagKey COMMON_TOOLS = TagKey.of(RegistryKeys.ITEM, Identifier.of("c", "tools")); - public static final TagKey TIDESINGER_CORAL = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("tidesinger_coral")); - - public static final TagKey ANVILS = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("anvils")); - public static final TagKey MYTHIC_ORES = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("ores")); - public static final TagKey NUKE_CORES = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("nuke_cores")); - public static final TagKey CARMOT_NUKE_IGNORED = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("carmot_nuke_ignored")); - public static final TagKey SPONGABLES = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("spongables")); - public static final TagKey INCORRECT_FOR_UNOBTAINIUM_ALLOY_TOOLS = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("incorrect_for_unobtainium_alloy_tools")); - - public static final TagKey PROMETHEUM_BIOMES = TagKey.of(RegistryKeys.BIOME, RegistryHelper.id("prometheum_biomes")); - public static final TagKey OSMIUM_BIOMES = TagKey.of(RegistryKeys.BIOME, RegistryHelper.id("osmium_biomes")); - public static final TagKey MYTHIC_ORE_BIOMES = TagKey.of(RegistryKeys.BIOME, RegistryHelper.id("mythic_ore_biomes")); - public static final TagKey MINEABLE_MYTHRIL_DRILL = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("mineable/mythril_drill")); - - public static final TagKey SILK_TOUCH_LIKE = TagKey.of(RegistryKeys.ENCHANTMENT, RegistryHelper.id("silk_touch_like")); - public static final TagKey INCREASES_MINING_SPEED = TagKey.of(RegistryKeys.ENCHANTMENT, RegistryHelper.id("increases_mining_speed")); + public static final TagKey TIDESINGER_CORAL = TagKey.of(RegistryKeys.ITEM, id("tidesinger_coral")); + + public static final TagKey ANVILS = TagKey.of(RegistryKeys.BLOCK, id("anvils")); + public static final TagKey CARMOT_NUKE_IGNORED = TagKey.of(RegistryKeys.BLOCK, id("carmot_nuke_ignored")); + public static final TagKey INCORRECT_FOR_UNOBTAINIUM_ALLOY_TOOLS = TagKey.of(RegistryKeys.BLOCK, id("incorrect_for_unobtainium_alloy_tools")); + public static final TagKey NUKE_CORES = TagKey.of(RegistryKeys.BLOCK, id("nuke_cores")); + public static final TagKey MYTHIC_ORES = TagKey.of(RegistryKeys.BLOCK, id("ores")); + public static final TagKey SPONGABLES = TagKey.of(RegistryKeys.BLOCK, id("spongables")); + + public static final TagKey AQUARIUM_BIOMES = TagKey.of(BIOME, id("aquarium_biomes")); + public static final TagKey MINEABLE_MYTHRIL_DRILL = TagKey.of(RegistryKeys.BLOCK, id("mineable/mythril_drill")); + public static final TagKey MYTHIC_ORE_BIOMES = TagKey.of(BIOME, id("mythic_ore_biomes")); + public static final TagKey OSMIUM_BIOMES = TagKey.of(BIOME, id("osmium_biomes")); + public static final TagKey PROMETHEUM_BIOMES = TagKey.of(BIOME, id("prometheum_biomes")); + + public static final TagKey SILK_TOUCH_LIKE = TagKey.of(ENCHANTMENT, id("silk_touch_like")); + public static final TagKey INCREASES_MINING_SPEED = TagKey.of(ENCHANTMENT, id("increases_mining_speed")); } diff --git a/src/main/resources/data/mythicmetals/tags/worldgen/biome/aquarium_biomes.json b/src/main/resources/data/mythicmetals/tags/worldgen/biome/aquarium_biomes.json new file mode 100644 index 000000000..f67d32200 --- /dev/null +++ b/src/main/resources/data/mythicmetals/tags/worldgen/biome/aquarium_biomes.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "#c:is_aquatic" + ] +} \ No newline at end of file