Advertisement
jayhillx

ModBiomes Class05

Dec 12th, 2020
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. import com.meepshadow.mysticsbiomes.core.Config;
  2. import com.meepshadow.mysticsbiomes.core.MysticsBiomes;
  3. import net.minecraft.util.RegistryKey;
  4. import net.minecraft.util.ResourceLocation;
  5. import net.minecraft.util.registry.Registry;
  6. import net.minecraft.world.biome.*;
  7. import net.minecraftforge.common.BiomeDictionary;
  8. import net.minecraftforge.common.BiomeManager;
  9. import net.minecraftforge.fml.common.Mod;
  10.  
  11. @Mod.EventBusSubscriber(modid = MysticsBiomes.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
  12. public class ModBiomes {
  13.  
  14. public static RegistryKey<Biome> STRAWBERRY_FIELD = RegistryKey.getOrCreateKey(Registry.BIOME_KEY, new ResourceLocation(MysticsBiomes.MOD_ID, "strawberry_field"));
  15. public static RegistryKey<Biome> LAVENDER_MEADOW = RegistryKey.getOrCreateKey(Registry.BIOME_KEY, new ResourceLocation(MysticsBiomes.MOD_ID, "lavender_meadow"));
  16.  
  17. public static void setupBiomes() {
  18. BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(STRAWBERRY_FIELD, Config.COMMON.strawberryFieldWeight.get()));
  19. BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(LAVENDER_MEADOW, Config.COMMON.lavenderMeadowWeight.get()));
  20.  
  21. BiomeDictionary.addTypes(STRAWBERRY_FIELD, BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.OVERWORLD);
  22. BiomeDictionary.addTypes(LAVENDER_MEADOW, BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.OVERWORLD);
  23. }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement