Guest User

Main.java

a guest
Sep 9th, 2021
60
225 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.hastev.biomes;
  2.  
  3.  
  4. import net.minecraft.util.RegistryKey;
  5. import net.minecraft.util.ResourceLocation;
  6. import net.minecraft.util.registry.Registry;
  7. import net.minecraft.world.biome.Biome;
  8. import net.minecraftforge.common.BiomeManager;
  9. import net.minecraftforge.eventbus.api.SubscribeEvent;
  10. import net.minecraftforge.fml.common.Mod;
  11. import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
  12. import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
  13.  
  14. @Mod("tutorial")
  15. @Mod.EventBusSubscriber(modid="tutorial", bus=Bus.MOD)
  16. public class Main {
  17.      
  18.     public static final RegistryKey<Biome> stony = RegistryKey.create(Registry.BIOME_REGISTRY, new ResourceLocation("tutorial", "tutorial_biome"));
  19.    
  20.     @SubscribeEvent
  21.     public void commonSetup(FMLCommonSetupEvent e) {
  22.         e.enqueueWork(() -> {
  23.             BiomeManager.addAdditionalOverworldBiomes(stony);
  24.         }
  25.         );
  26.     }
  27.    
  28. }
  29.  
RAW Paste Data