Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Mod.EventBusSubscriber(modid = MysticsBiomes.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
- public class ModBiomes {
- public static RegistryKey<Biome> STRAWBERRY_FIELD = RegistryKey.getOrCreateKey(Registry.BIOME_KEY, new ResourceLocation(MysticsBiomes.MOD_ID, "strawberry_field"));
- public static RegistryKey<Biome> LAVENDER_MEADOW = RegistryKey.getOrCreateKey(Registry.BIOME_KEY, new ResourceLocation(MysticsBiomes.MOD_ID, "lavender_meadow"));
- public static void addBiomesToGeneration() {
- BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(STRAWBERRY_FIELD, Config.COMMON.strawberryFieldWeight.get()));
- BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(LAVENDER_MEADOW, Config.COMMON.lavenderMeadowWeight.get()));
- }
- public static void addBiomeTypes() {
- BiomeDictionary.addTypes(STRAWBERRY_FIELD, BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.OVERWORLD);
- BiomeDictionary.addTypes(LAVENDER_MEADOW, BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.OVERWORLD);
- }
- static {
- register(0, ModBiomes.STRAWBERRY_FIELD, ModBiomeMaker.makeStrawberryFieldBiome());
- register(1, ModBiomes.LAVENDER_MEADOW, ModBiomeMaker.makeLavenderMeadowBiome());
- }
- private static void register(int id, RegistryKey<Biome> key, Biome biome) {
- idToKeyMap.put(id, key);
- WorldGenRegistries.register(WorldGenRegistries.BIOME, id, key, biome);
- }
- private static final Int2ObjectMap<RegistryKey<Biome>> idToKeyMap = new Int2ObjectArrayMap<>();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement