diff --git a/src/main/java/biomesoplenty/api/BOPAPI.java b/src/main/java/biomesoplenty/api/BOPAPI.java new file mode 100644 index 000000000..97569db3e --- /dev/null +++ b/src/main/java/biomesoplenty/api/BOPAPI.java @@ -0,0 +1,10 @@ +/******************************************************************************* + * Copyright 2023, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package biomesoplenty.api; + +public class BOPAPI +{ + public static final String MOD_ID = "biomesoplenty"; +} diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java index b99d663f6..0e2da45be 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java @@ -4,7 +4,7 @@ ******************************************************************************/ package biomesoplenty.api.biome; -import biomesoplenty.core.BiomesOPlenty; +import biomesoplenty.api.BOPAPI; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import net.minecraft.core.registries.Registries; @@ -96,7 +96,7 @@ public static List> getAllBiomes() private static ResourceKey registerOverworld(String name) { - ResourceKey key = ResourceKey.create(Registries.BIOME, new ResourceLocation(BiomesOPlenty.MOD_ID, name)); + ResourceKey key = ResourceKey.create(Registries.BIOME, new ResourceLocation(BOPAPI.MOD_ID, name)); overworldBiomes.add(key); allBiomes.add(key); return key; @@ -104,7 +104,7 @@ private static ResourceKey registerOverworld(String name) private static ResourceKey register(String name) { - ResourceKey key = ResourceKey.create(Registries.BIOME, new ResourceLocation(BiomesOPlenty.MOD_ID, name)); + ResourceKey key = ResourceKey.create(Registries.BIOME, new ResourceLocation(BOPAPI.MOD_ID, name)); allBiomes.add(key); return key; } diff --git a/src/main/java/biomesoplenty/api/block/BOPBlockSetTypes.java b/src/main/java/biomesoplenty/api/block/BOPBlockSetTypes.java index 29ab38500..d11c352eb 100644 --- a/src/main/java/biomesoplenty/api/block/BOPBlockSetTypes.java +++ b/src/main/java/biomesoplenty/api/block/BOPBlockSetTypes.java @@ -4,22 +4,22 @@ ******************************************************************************/ package biomesoplenty.api.block; -import biomesoplenty.core.BiomesOPlenty; +import biomesoplenty.api.BOPAPI; import net.minecraft.world.level.block.state.properties.BlockSetType; import static net.minecraft.world.level.block.state.properties.BlockSetType.register; public class BOPBlockSetTypes { - public static final BlockSetType FIR = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":fir")); - public static final BlockSetType PINE = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":pine")); - public static final BlockSetType REDWOOD = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":redwood")); - public static final BlockSetType MAHOGANY = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":mahogany")); - public static final BlockSetType JACARANDA = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":jacaranda")); - public static final BlockSetType PALM = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":palm")); - public static final BlockSetType WILLOW = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":willow")); - public static final BlockSetType DEAD = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":dead")); - public static final BlockSetType MAGIC = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":magic")); - public static final BlockSetType UMBRAN = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":umbran")); - public static final BlockSetType HELLBARK = register(new BlockSetType(BiomesOPlenty.MOD_ID + ":hellbark")); + public static final BlockSetType FIR = register(new BlockSetType(BOPAPI.MOD_ID + ":fir")); + public static final BlockSetType PINE = register(new BlockSetType(BOPAPI.MOD_ID + ":pine")); + public static final BlockSetType REDWOOD = register(new BlockSetType(BOPAPI.MOD_ID + ":redwood")); + public static final BlockSetType MAHOGANY = register(new BlockSetType(BOPAPI.MOD_ID + ":mahogany")); + public static final BlockSetType JACARANDA = register(new BlockSetType(BOPAPI.MOD_ID + ":jacaranda")); + public static final BlockSetType PALM = register(new BlockSetType(BOPAPI.MOD_ID + ":palm")); + public static final BlockSetType WILLOW = register(new BlockSetType(BOPAPI.MOD_ID + ":willow")); + public static final BlockSetType DEAD = register(new BlockSetType(BOPAPI.MOD_ID + ":dead")); + public static final BlockSetType MAGIC = register(new BlockSetType(BOPAPI.MOD_ID + ":magic")); + public static final BlockSetType UMBRAN = register(new BlockSetType(BOPAPI.MOD_ID + ":umbran")); + public static final BlockSetType HELLBARK = register(new BlockSetType(BOPAPI.MOD_ID + ":hellbark")); } diff --git a/src/main/java/biomesoplenty/api/block/BOPWoodTypes.java b/src/main/java/biomesoplenty/api/block/BOPWoodTypes.java index 9feba3051..69be81dba 100644 --- a/src/main/java/biomesoplenty/api/block/BOPWoodTypes.java +++ b/src/main/java/biomesoplenty/api/block/BOPWoodTypes.java @@ -4,22 +4,22 @@ ******************************************************************************/ package biomesoplenty.api.block; -import biomesoplenty.core.BiomesOPlenty; +import biomesoplenty.api.BOPAPI; import net.minecraft.world.level.block.state.properties.WoodType; import static net.minecraft.world.level.block.state.properties.WoodType.register; public class BOPWoodTypes { - public static final WoodType FIR = register(new WoodType(BiomesOPlenty.MOD_ID + ":fir", BOPBlockSetTypes.FIR)); - public static final WoodType PINE = register(new WoodType(BiomesOPlenty.MOD_ID + ":pine", BOPBlockSetTypes.PINE)); - public static final WoodType REDWOOD = register(new WoodType(BiomesOPlenty.MOD_ID + ":redwood", BOPBlockSetTypes.REDWOOD)); - public static final WoodType MAHOGANY = register(new WoodType(BiomesOPlenty.MOD_ID + ":mahogany", BOPBlockSetTypes.MAHOGANY)); - public static final WoodType JACARANDA = register(new WoodType(BiomesOPlenty.MOD_ID + ":jacaranda", BOPBlockSetTypes.JACARANDA)); - public static final WoodType PALM = register(new WoodType(BiomesOPlenty.MOD_ID + ":palm", BOPBlockSetTypes.PALM)); - public static final WoodType WILLOW = register(new WoodType(BiomesOPlenty.MOD_ID + ":willow", BOPBlockSetTypes.WILLOW)); - public static final WoodType DEAD = register(new WoodType(BiomesOPlenty.MOD_ID + ":dead", BOPBlockSetTypes.DEAD)); - public static final WoodType MAGIC = register(new WoodType(BiomesOPlenty.MOD_ID + ":magic", BOPBlockSetTypes.MAGIC)); - public static final WoodType UMBRAN = register(new WoodType(BiomesOPlenty.MOD_ID + ":umbran", BOPBlockSetTypes.UMBRAN)); - public static final WoodType HELLBARK = register(new WoodType(BiomesOPlenty.MOD_ID + ":hellbark", BOPBlockSetTypes.HELLBARK)); + public static final WoodType FIR = register(new WoodType(BOPAPI.MOD_ID + ":fir", BOPBlockSetTypes.FIR)); + public static final WoodType PINE = register(new WoodType(BOPAPI.MOD_ID + ":pine", BOPBlockSetTypes.PINE)); + public static final WoodType REDWOOD = register(new WoodType(BOPAPI.MOD_ID + ":redwood", BOPBlockSetTypes.REDWOOD)); + public static final WoodType MAHOGANY = register(new WoodType(BOPAPI.MOD_ID + ":mahogany", BOPBlockSetTypes.MAHOGANY)); + public static final WoodType JACARANDA = register(new WoodType(BOPAPI.MOD_ID + ":jacaranda", BOPBlockSetTypes.JACARANDA)); + public static final WoodType PALM = register(new WoodType(BOPAPI.MOD_ID + ":palm", BOPBlockSetTypes.PALM)); + public static final WoodType WILLOW = register(new WoodType(BOPAPI.MOD_ID + ":willow", BOPBlockSetTypes.WILLOW)); + public static final WoodType DEAD = register(new WoodType(BOPAPI.MOD_ID + ":dead", BOPBlockSetTypes.DEAD)); + public static final WoodType MAGIC = register(new WoodType(BOPAPI.MOD_ID + ":magic", BOPBlockSetTypes.MAGIC)); + public static final WoodType UMBRAN = register(new WoodType(BOPAPI.MOD_ID + ":umbran", BOPBlockSetTypes.UMBRAN)); + public static final WoodType HELLBARK = register(new WoodType(BOPAPI.MOD_ID + ":hellbark", BOPBlockSetTypes.HELLBARK)); } diff --git a/src/main/java/biomesoplenty/api/damagesource/BOPDamageTypes.java b/src/main/java/biomesoplenty/api/damagesource/BOPDamageTypes.java index 01e9e4e07..b8384e92b 100644 --- a/src/main/java/biomesoplenty/api/damagesource/BOPDamageTypes.java +++ b/src/main/java/biomesoplenty/api/damagesource/BOPDamageTypes.java @@ -4,7 +4,7 @@ ******************************************************************************/ package biomesoplenty.api.damagesource; -import biomesoplenty.core.BiomesOPlenty; +import biomesoplenty.api.BOPAPI; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -17,6 +17,6 @@ public class BOPDamageTypes private static ResourceKey register(String name) { - return ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(BiomesOPlenty.MOD_ID, name)); + return ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(BOPAPI.MOD_ID, name)); } } diff --git a/src/main/java/biomesoplenty/core/BiomesOPlenty.java b/src/main/java/biomesoplenty/core/BiomesOPlenty.java index 5a587cc9e..5b094577a 100644 --- a/src/main/java/biomesoplenty/core/BiomesOPlenty.java +++ b/src/main/java/biomesoplenty/core/BiomesOPlenty.java @@ -5,6 +5,7 @@ package biomesoplenty.core; +import biomesoplenty.api.BOPAPI; import biomesoplenty.init.*; import net.minecraft.core.particles.ParticleType; import net.minecraft.core.registries.Registries; @@ -38,7 +39,7 @@ @Mod(value = BiomesOPlenty.MOD_ID) public class BiomesOPlenty { - public static final String MOD_ID = "biomesoplenty"; + public static final String MOD_ID = BOPAPI.MOD_ID; public static final DeferredRegister BIOME_REGISTER = DeferredRegister.create(Registries.BIOME, BiomesOPlenty.MOD_ID); public static final DeferredRegister BLOCK_REGISTER = DeferredRegister.create(Registries.BLOCK, MOD_ID);