Advertisement
jayhillx

biome

May 8th, 2022
944
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 KB | None | 0 0
  1. public class MysticBiomes {
  2.     public static final DeferredRegister<Biome> BIOMES = create(ForgeRegistries.BIOMES, MysticsBiomes.modId);
  3.  
  4.     public static final RegistryObject<Biome> LAVENDER_MEADOW = BIOMES.register("lavender_meadow", LavenderMeadow::lavenderMeadowBiome);
  5.  
  6.     /** Registers biomes. */
  7.     public static void registerBiomes() {
  8.         setupBiome(LAVENDER_MEADOW.get(), 3, BiomeType.WARM, Type.OVERWORLD, Type.PLAINS, Type.MAGICAL);
  9.     }
  10.  
  11.     public static void setupBiome(final Biome biome, final int weight, final BiomeType biomeType, final Type... types) {
  12.         BiomeDictionary.addTypes(key(biome), types);
  13.         BiomeManager.addBiome(biomeType, new BiomeEntry(key(biome), weight));
  14.     }
  15.  
  16.     private static ResourceKey<Biome> key(final Biome biome) {
  17.         return ResourceKey.create(ForgeRegistries.Keys.BIOMES, ForgeRegistries.BIOMES.getKey(biome));
  18.     }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement