Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.looke81.biowarfare.init;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.resources.model.ModelResourceLocation;
- import net.minecraft.item.Item;
- import net.minecraftforge.fml.common.registry.GameRegistry;
- import com.looke81.biowarfare.BioWarfare;
- import com.looke81.biowarfare.Reference;
- import com.looke81.biowarfare.blocks.AgarPlate;
- import com.looke81.biowarfare.blocks.BacteriaTest;
- import com.looke81.biowarfare.blocks.Jelly;
- import com.looke81.biowarfare.blocks.MachineCore;
- import com.looke81.biowarfare.blocks.MicrobeExtractor;
- import com.looke81.biowarfare.blocks.twobytwoDirt;
- import com.looke81.biowarfare.blocks.twobytwoDirtcompressed;
- public class BioWarfareBlocks {
- public static Block block_AgarPlate;
- public static Block block_MicrobeExtractorActive;
- public static Block block_MicrobeExtractorIdle;
- public static Block block_BacteriaTest;
- public static Block block_MachineCore;
- public static Block block_twobytwoDirt;
- public static Block block_twobytwoDirtcompressed;
- public static Block block_Jelly;
- public static void init() {
- // Blocks
- block_MicrobeExtractorIdle = new MicrobeExtractor(false).setCreativeTab(BioWarfare.BioWarfareTab).setUnlocalizedName("block_MicrobeExtractorIdle");
- block_MicrobeExtractorActive = new MicrobeExtractor(true).setLightLevel(0.625F).setUnlocalizedName("block_MicrobeExtractorActive");
- block_BacteriaTest = new BacteriaTest(Material.cactus);
- block_MachineCore = new MachineCore(Material.rock).setUnlocalizedName("block_MachineCore");
- block_twobytwoDirt = new twobytwoDirt(Material.rock).setUnlocalizedName("block_twobytwoDirt");
- block_twobytwoDirtcompressed = new twobytwoDirtcompressed(Material.rock).setUnlocalizedName("block_twobytwoDirtcompressed");
- block_AgarPlate = new AgarPlate(Material.rock).setUnlocalizedName("block_AgarPlate");
- block_Jelly = new Jelly(Material.rock).setUnlocalizedName("block_Jelly");
- }
- public static void register() {
- GameRegistry.registerBlock(block_MicrobeExtractorIdle, block_MicrobeExtractorIdle.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(block_MicrobeExtractorActive, block_MicrobeExtractorActive.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(block_BacteriaTest, block_BacteriaTest.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(block_MachineCore, block_MachineCore.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(block_twobytwoDirt, block_twobytwoDirt.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(block_twobytwoDirtcompressed, block_twobytwoDirtcompressed.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(block_AgarPlate, block_AgarPlate.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(block_Jelly, block_Jelly.getUnlocalizedName().substring(5));
- }
- public static void registerRenders() {
- registerRender(block_MicrobeExtractorActive);
- registerRender(block_MicrobeExtractorIdle);
- registerRender(block_MachineCore);
- registerRender(block_twobytwoDirt);
- registerRender(block_twobytwoDirtcompressed);
- registerRender(block_Jelly);
- }
- public static void registerRender(Block block) {
- Item item = Item.getItemFromBlock(block);
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment