jayhillx

ModBiomes Class03

Dec 10th, 2020 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 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.eventbus.api.SubscribeEvent;
  10. import net.minecraftforge.fml.common.Mod;
  11.  
  12. @Mod.EventBusSubscriber(modid = MysticsBiomes.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
  13. public class ModBiomes {
  14.  
  15. public static RegistryKey<Biome> STRAWBERRY_FIELD = RegistryKey.getOrCreateKey(Registry.BIOME_KEY, new ResourceLocation(MysticsBiomes.MOD_ID, "strawberry_field"));
  16. public static RegistryKey<Biome> LAVENDER_MEADOW = RegistryKey.getOrCreateKey(Registry.BIOME_KEY, new ResourceLocation(MysticsBiomes.MOD_ID, "lavender_meadow"));
  17.  
  18. public static void load() { }
  19.  
  20. @SubscribeEvent
  21. public static void setupBiomes() {
  22. BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(STRAWBERRY_FIELD, Config.COMMON.strawberryFieldWeight.get()));
  23. BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(LAVENDER_MEADOW, Config.COMMON.lavenderMeadowWeight.get()));
  24.  
  25. BiomeDictionary.addTypes(STRAWBERRY_FIELD, BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.OVERWORLD);
  26. BiomeDictionary.addTypes(LAVENDER_MEADOW, BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.OVERWORLD);
  27. }
  28. }
  29.  
Add Comment
Please, Sign In to add comment