Advertisement
jayhillx

ModBiome class

Aug 24th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. package com.meepshadow.mysticsbiomes.init;
  2.  
  3. import com.meepshadow.mysticsbiomes.MysticsBiomes;
  4. import com.meepshadow.mysticsbiomes.world.biomes.DandelionMeadowBiome;
  5. import com.meepshadow.mysticsbiomes.world.biomes.LavenderMeadowBiome;
  6. import com.meepshadow.mysticsbiomes.world.biomes.StrawberryFieldsBiome;
  7. import net.minecraft.world.biome.Biome;
  8. import net.minecraftforge.common.BiomeDictionary;
  9. import net.minecraftforge.common.BiomeManager;
  10. import net.minecraftforge.fml.RegistryObject;
  11. import net.minecraftforge.registries.DeferredRegister;
  12. import net.minecraftforge.registries.ForgeRegistries;
  13. import net.minecraftforge.common.BiomeManager.BiomeEntry;
  14. import net.minecraftforge.common.BiomeManager.BiomeType;
  15.  
  16. public class ModBiome {
  17. @SuppressWarnings("deprecation")
  18. public static final DeferredRegister<Biome> BIOMES = new DeferredRegister<>(ForgeRegistries.BIOMES, MysticsBiomes.MOD_ID);
  19.  
  20. public static final RegistryObject<Biome> STRAWBERRY_FIELDS = BIOMES.register("strawberry_fields", StrawberryFieldsBiome::new);
  21.  
  22. public static final RegistryObject<Biome> LAVENDER_MEADOW = BIOMES.register("lavender_meadow", LavenderMeadowBiome::new);
  23.  
  24. public static final RegistryObject<Biome> DANDELION_MEADOW = BIOMES.register("dandelion_meadow", DandelionMeadowBiome::new);
  25.  
  26. public static void registerBiomes() {
  27. registerBiome(STRAWBERRY_FIELDS.get(), BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.OVERWORLD);
  28. registerBiome(LAVENDER_MEADOW.get(), BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.OVERWORLD);
  29. registerBiome(DANDELION_MEADOW.get(), BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.OVERWORLD);
  30. }
  31.  
  32. public static void registerBiome(Biome biome, BiomeDictionary.Type... types) {
  33. BiomeDictionary.addTypes(biome, types);
  34. BiomeManager.addSpawnBiome(biome);
  35. }
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement