Advertisement
circuitdh

BleachCraft.java

Jun 28th, 2016
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.79 KB | None | 0 0
  1. package net.bleachcraft;
  2.  
  3. import net.bleachcraft.CreativeTabs.SampleTab;
  4. import net.bleachcraft.Fluids.Clorine;
  5. import net.bleachcraft.Fluids.ClorineBlock;
  6. import net.bleachcraft.Items.BleachBottle;
  7. import net.bleachcraft.Items.BleachBottleClorox;
  8. import net.bleachcraft.Items.BleachBottleTide;
  9. import net.bleachcraft.Items.BleachChemicals;
  10. import net.bleachcraft.Items.ClorineBucket;
  11. import net.bleachcraft.Proxy.CommonProxy;
  12. import net.minecraft.client.Minecraft;
  13. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  14. import net.minecraft.creativetab.CreativeTabs;
  15. import net.minecraft.init.Blocks;
  16. import net.minecraft.init.Items;
  17. import net.minecraft.item.Item;
  18. import net.minecraft.item.ItemStack;
  19. import net.minecraftforge.common.MinecraftForge;
  20. import net.minecraftforge.fluids.FluidContainerRegistry;
  21. import net.minecraftforge.fluids.FluidRegistry;
  22. import net.minecraftforge.fluids.FluidStack;
  23. import net.minecraftforge.fml.common.Mod;
  24. import net.minecraftforge.fml.common.Mod.EventHandler;
  25. import net.minecraftforge.fml.common.SidedProxy;
  26. import net.minecraftforge.fml.common.event.FMLInitializationEvent;
  27. import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
  28. import net.minecraftforge.fml.common.registry.GameRegistry;
  29.  
  30. @Mod(modid = BleachCraft.MODID, version = BleachCraft.VERSION)
  31. public class BleachCraft
  32. {
  33.     public static final String MODID = "BleachCraft";
  34.     public static final String VERSION = "1.0";
  35.    
  36.     //Creative Tabs
  37.     public static CreativeTabs sampleTab = new SampleTab(CreativeTabs.getNextID(), "sampleTab");
  38.    
  39.     //Items
  40.     public static Item bleachBottleClorox;
  41.     public static Item bleachBottle;
  42.     public static Item bleachBottleTide;
  43.     public static Item bleachChemicals;
  44.    
  45.     public static ClorineBucket clorineBucket;
  46.    
  47.     //fluids
  48.     public static Clorine clorine = new Clorine();
  49.     public static ClorineBlock clorineBlock;
  50.    
  51.     static {
  52.         FluidRegistry.enableUniversalBucket();
  53.     }
  54.        
  55.  
  56.     @SidedProxy(serverSide = "net.bleachcraft.Proxy.CommonProxy", clientSide = "net.bleachcraft.Proxy.ClientProxy")
  57.     public static CommonProxy proxy;
  58.    
  59.  
  60.     @EventHandler
  61.     public void preInit(FMLPreInitializationEvent event) {
  62.        
  63.         //ClorineBucket texture
  64.         clorineBucket = new ClorineBucket(clorineBlock);
  65.         GameRegistry.registerItem(clorineBucket, "clorineBucket");
  66.         FluidContainerRegistry.registerFluidContainer(new FluidStack(clorine, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(clorineBucket), new ItemStack(Items.BUCKET));
  67.                
  68.                
  69.         proxy.registerRenderThings();
  70.        
  71.         FluidRegistry.addBucketForFluid(clorine);
  72.        
  73.     }
  74.    
  75.     @EventHandler
  76.     public void init(FMLInitializationEvent event) {
  77.                
  78.         //Clorox texture
  79.         bleachBottleClorox = new BleachBottleClorox();
  80.         GameRegistry.registerItem(bleachBottleClorox, "bleachBottleClorox");
  81.         Item bleachBottleCloroxItem = GameRegistry.findItem("bleachcraft", "bleachBottleClorox");
  82.         ModelResourceLocation bleachBottleCloroxModel = new ModelResourceLocation("bleachcraft:bleachBottleClorox", "inventory");
  83.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(bleachBottleClorox, 0, bleachBottleCloroxModel);
  84.        
  85.         //Mundane Bleach Texture
  86.         bleachBottle = new BleachBottle();
  87.         GameRegistry.registerItem(bleachBottle, "bleachBottle");
  88.         Item bleachBottleItem = GameRegistry.findItem("bleachcraft", "bleachBottle");
  89.         ModelResourceLocation bleachBottleModel = new ModelResourceLocation("bleachcraft:bleachBottle", "inventory");
  90.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(bleachBottle, 0, bleachBottleModel);
  91.        
  92.         //Tide texture
  93.         bleachBottleTide = new BleachBottleTide();
  94.         GameRegistry.registerItem(bleachBottleTide, "bleachBottleTide");
  95.         Item bleachBottleTideItem = GameRegistry.findItem("bleachcraft", "bleachBottleTide");
  96.         ModelResourceLocation bleachBottleTideModel = new ModelResourceLocation("bleachcraft:bleachBottleTide", "inventory");
  97.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(bleachBottleTide, 0, bleachBottleTideModel);
  98.        
  99.         //Bleach chemicals texture
  100.         bleachChemicals = new BleachChemicals();
  101.         GameRegistry.registerItem(bleachChemicals, "bleachChemicals");
  102.         Item bleachChemicalsItem = GameRegistry.findItem("bleachcraft", "bleachChemicals");
  103.         ModelResourceLocation bleachChemicalsModel = new ModelResourceLocation("bleachcraft:bleachChemicals", "inventory");
  104.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(bleachChemicals, 0, bleachChemicalsModel);
  105.        
  106.        
  107.         //Bleach Bottle Recipe
  108.         GameRegistry.addRecipe(new ItemStack(bleachBottle), "brb", "bmb", "bbb",
  109.                 'b',new ItemStack(Blocks.STAINED_GLASS,1,11), 'r', new ItemStack(Blocks.STAINED_GLASS,1,14),'m',bleachChemicals);
  110.        
  111.         proxy.registerRenderThingsInit();
  112.  
  113.        
  114.  
  115.        
  116.        
  117.     }
  118.  
  119. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement