Skip to content

Commit

Permalink
Migrate Aquarium to use convention tags
Browse files Browse the repository at this point in the history
Fixes #265
  • Loading branch information
Noaaan committed Sep 29, 2024
1 parent 0410aec commit db3251b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 25 deletions.
3 changes: 1 addition & 2 deletions src/main/java/nourl/mythicmetals/MythicMetals.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/nourl/mythicmetals/data/MythicOreKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
48 changes: 26 additions & 22 deletions src/main/java/nourl/mythicmetals/data/MythicTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Item> AUTO_REPAIR = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("abilities/auto_repair"));
public static final TagKey<Item> BONUS_FORTUNE = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("abilities/bonus_fortune"));
public static final TagKey<Item> BONUS_LOOTING = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("abilities/bonus_looting"));
public static final TagKey<Item> MIDAS_TOUCH = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("abilities/midas_touch"));
public static final TagKey<Item> CARMOT_STAFF_BLOCKS = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("carmot_staff_blocks"));
public static final TagKey<Item> AUTO_REPAIR = TagKey.of(RegistryKeys.ITEM, id("abilities/auto_repair"));
public static final TagKey<Item> BONUS_FORTUNE = TagKey.of(RegistryKeys.ITEM, id("abilities/bonus_fortune"));
public static final TagKey<Item> BONUS_LOOTING = TagKey.of(RegistryKeys.ITEM, id("abilities/bonus_looting"));
public static final TagKey<Item> MIDAS_TOUCH = TagKey.of(RegistryKeys.ITEM, id("abilities/midas_touch"));
public static final TagKey<Item> CARMOT_STAFF_BLOCKS = TagKey.of(RegistryKeys.ITEM, id("carmot_staff_blocks"));
public static final TagKey<Item> COMMON_ARMOR = TagKey.of(RegistryKeys.ITEM, Identifier.of("c", "armor"));
public static final TagKey<Item> COMMON_TOOLS = TagKey.of(RegistryKeys.ITEM, Identifier.of("c", "tools"));
public static final TagKey<Item> TIDESINGER_CORAL = TagKey.of(RegistryKeys.ITEM, RegistryHelper.id("tidesinger_coral"));

public static final TagKey<Block> ANVILS = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("anvils"));
public static final TagKey<Block> MYTHIC_ORES = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("ores"));
public static final TagKey<Block> NUKE_CORES = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("nuke_cores"));
public static final TagKey<Block> CARMOT_NUKE_IGNORED = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("carmot_nuke_ignored"));
public static final TagKey<Block> SPONGABLES = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("spongables"));
public static final TagKey<Block> INCORRECT_FOR_UNOBTAINIUM_ALLOY_TOOLS = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("incorrect_for_unobtainium_alloy_tools"));

public static final TagKey<Biome> PROMETHEUM_BIOMES = TagKey.of(RegistryKeys.BIOME, RegistryHelper.id("prometheum_biomes"));
public static final TagKey<Biome> OSMIUM_BIOMES = TagKey.of(RegistryKeys.BIOME, RegistryHelper.id("osmium_biomes"));
public static final TagKey<Biome> MYTHIC_ORE_BIOMES = TagKey.of(RegistryKeys.BIOME, RegistryHelper.id("mythic_ore_biomes"));
public static final TagKey<Block> MINEABLE_MYTHRIL_DRILL = TagKey.of(RegistryKeys.BLOCK, RegistryHelper.id("mineable/mythril_drill"));

public static final TagKey<Enchantment> SILK_TOUCH_LIKE = TagKey.of(RegistryKeys.ENCHANTMENT, RegistryHelper.id("silk_touch_like"));
public static final TagKey<Enchantment> INCREASES_MINING_SPEED = TagKey.of(RegistryKeys.ENCHANTMENT, RegistryHelper.id("increases_mining_speed"));
public static final TagKey<Item> TIDESINGER_CORAL = TagKey.of(RegistryKeys.ITEM, id("tidesinger_coral"));

public static final TagKey<Block> ANVILS = TagKey.of(RegistryKeys.BLOCK, id("anvils"));
public static final TagKey<Block> CARMOT_NUKE_IGNORED = TagKey.of(RegistryKeys.BLOCK, id("carmot_nuke_ignored"));
public static final TagKey<Block> INCORRECT_FOR_UNOBTAINIUM_ALLOY_TOOLS = TagKey.of(RegistryKeys.BLOCK, id("incorrect_for_unobtainium_alloy_tools"));
public static final TagKey<Block> NUKE_CORES = TagKey.of(RegistryKeys.BLOCK, id("nuke_cores"));
public static final TagKey<Block> MYTHIC_ORES = TagKey.of(RegistryKeys.BLOCK, id("ores"));
public static final TagKey<Block> SPONGABLES = TagKey.of(RegistryKeys.BLOCK, id("spongables"));

public static final TagKey<Biome> AQUARIUM_BIOMES = TagKey.of(BIOME, id("aquarium_biomes"));
public static final TagKey<Block> MINEABLE_MYTHRIL_DRILL = TagKey.of(RegistryKeys.BLOCK, id("mineable/mythril_drill"));
public static final TagKey<Biome> MYTHIC_ORE_BIOMES = TagKey.of(BIOME, id("mythic_ore_biomes"));
public static final TagKey<Biome> OSMIUM_BIOMES = TagKey.of(BIOME, id("osmium_biomes"));
public static final TagKey<Biome> PROMETHEUM_BIOMES = TagKey.of(BIOME, id("prometheum_biomes"));

public static final TagKey<Enchantment> SILK_TOUCH_LIKE = TagKey.of(ENCHANTMENT, id("silk_touch_like"));
public static final TagKey<Enchantment> INCREASES_MINING_SPEED = TagKey.of(ENCHANTMENT, id("increases_mining_speed"));
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"#c:is_aquatic"
]
}

0 comments on commit db3251b

Please sign in to comment.