SHARE
TWEET

lmao

a guest Feb 21st, 2020 129 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package sleep.tutorial;
  2.  
  3. import net.minecraft.block.Block;
  4. import net.minecraft.init.Items;
  5. import net.minecraft.item.Item;
  6. import net.minecraftforge.client.event.ModelRegistryEvent;
  7. import net.minecraftforge.event.RegistryEvent;
  8. import net.minecraftforge.fml.common.Mod;
  9. import net.minecraftforge.fml.common.SidedProxy;
  10. import net.minecraftforge.fml.common.event.FMLInitializationEvent;
  11. import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
  12. import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
  13. import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
  14. import sleep.tutorial.block.ModBlocks;
  15. import sleep.tutorial.creativetabs.TutorialModOres;
  16. import sleep.tutorial.creativetabs.TutorialTab;
  17. import sleep.tutorial.item.ModItems;
  18. import sleep.tutorial.proxy.CommonProxy;
  19.  
  20. @Mod(modid = TutorialMod.modId, name = TutorialMod.name, version = TutorialMod.version, acceptedMinecraftVersions = "[1.12.2]")
  21. public class TutorialMod {
  22.  
  23.     public static final String modId = "tutorial";
  24.     public static final String name = "Tutorial Mod";
  25.     public static final String version = "1.0.0";
  26.    
  27.     public static final TutorialTab creativeTab = new TutorialTab(Items.REDSTONE);
  28.     public static TutorialTab ORES;
  29.    
  30.     @Mod.Instance(modId)
  31.     public static TutorialMod instance;
  32.    
  33.    
  34.     @SidedProxy(serverSide = "sleep.tutorial.proxy.CommonProxy", clientSide = "sleep.tutorial.proxy.ClientProxy")
  35.     public static CommonProxy proxy;
  36.    
  37.     //public static final TutorialTab creativeTab = new TutorialTab();
  38.    
  39.     @Mod.EventHandler
  40.     public void preInit(FMLPreInitializationEvent event) {
  41.         System.out.println(name + " is loading!");
  42.     }
  43.  
  44.     @Mod.EventHandler
  45.     public void init(FMLInitializationEvent event) {
  46.        
  47.     }
  48.  
  49.     @Mod.EventHandler
  50.     public void postInit(FMLPostInitializationEvent event) {
  51.         ORES = new TutorialTab(Item.getItemFromBlock(ModBlocks.ORE_COPPER));
  52.     }
  53.    
  54.  
  55.     @Mod.EventBusSubscriber
  56.     public static class RegistrationHandler {
  57.        
  58.         @SubscribeEvent
  59.         public static void registerBlocks(RegistryEvent.Register<Block> event) {
  60.             ModBlocks.register(event.getRegistry());
  61.         }
  62.        
  63.         @SubscribeEvent
  64.         public static void registerItems(RegistryEvent.Register<Item> event) {
  65.             ModItems.register(event.getRegistry());
  66.             ModBlocks.registerItemBlocks(event.getRegistry());
  67.         }
  68.        
  69.         @SubscribeEvent
  70.         public static void registerItems(ModelRegistryEvent event) {
  71.             ModItems.registerItemModels();
  72.             ModBlocks.registerBlockModels();
  73.         }
  74.        
  75.     }
  76. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top