Guest User

CommonProxy.java

a guest
Jun 29th, 2019
37
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.onVoid.adjunct.proxy;
  2.  
  3. import me.onVoid.adjunct.block.BlockElementalLight;
  4. import me.onVoid.adjunct.block.ItemBlockElementalLight;
  5. import me.onVoid.adjunct.compat.ChiselCompat;
  6. import me.onVoid.adjunct.init.BlocksAdjunct;
  7. import me.onVoid.adjunct.init.ItemsAdjunct;
  8. import me.onVoid.adjunct.util.IHasModel;
  9. import net.minecraft.block.Block;
  10. import net.minecraft.item.Item;
  11. import net.minecraft.item.ItemBlock;
  12. import net.minecraftforge.client.event.ModelRegistryEvent;
  13. import net.minecraftforge.event.RegistryEvent;
  14. import net.minecraftforge.fml.common.Mod;
  15. import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
  16. import net.minecraftforge.fml.common.event.FMLInitializationEvent;
  17. import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
  18. import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
  19. import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
  20.  
  21. @EventBusSubscriber
  22. public class CommonProxy {
  23.     public static ItemBlockElementalLight itemBlockLightElemental;
  24.    
  25.     public void registerItemRenderer(Item item, int meta, String id){
  26.     }
  27.    
  28.     public void preInit(FMLPreInitializationEvent e) {
  29.     }
  30.  
  31.     public void init(FMLInitializationEvent e) {
  32.         ChiselCompat.addVariations();
  33.     }
  34.  
  35.     public void postInit(FMLPostInitializationEvent e) {
  36.     }
  37.    
  38.     public static void registerItemBlock(Block b, RegistryEvent.Register<Item> e){
  39.         ItemBlock ib = new ItemBlock(b);
  40.         ib.setRegistryName(b.getRegistryName());
  41.         e.getRegistry().register(ib);
  42.     }
  43.    
  44.     @SubscribeEvent
  45.     public static void registerItems(RegistryEvent.Register<Item> e){
  46.         e.getRegistry().registerAll(ItemsAdjunct.aitems.toArray(new Item[0]));
  47.        
  48.         itemBlockLightElemental = new ItemBlockElementalLight(BlocksAdjunct.lightElemental);
  49.         itemBlockLightElemental.setRegistryName(BlocksAdjunct.lightElemental.getRegistryName());
  50.         e.getRegistry().register(itemBlockLightElemental);
  51.     }
  52.    
  53.     @SubscribeEvent
  54.     public static void registerBlocks(RegistryEvent.Register<Block> e){
  55.         e.getRegistry().register(new BlockElementalLight());
  56.     }
  57.    
  58. }
RAW Paste Data