Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.xenocorpse.wulfenite.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.creativetab.CreativeTabs;
- import net.minecraft.item.Item;
- import net.minecraftforge.fml.common.registry.GameRegistry;
- import com.xenocorpse.wulfenite.Wulfenite;
- import com.xenocorpse.wulfenite.WulfeniteTab;
- import com.xenocorpse.wulfenite.blocks.BlockFoolsgold;
- import com.xenocorpse.wulfenite.blocks.BlockGrinder;
- import com.xenocorpse.wulfenite.blocks.BlockMathewmite;
- import com.xenocorpse.wulfenite.blocks.BlockMolybdenum;
- import com.xenocorpse.wulfenite.blocks.BlockRuby;
- import com.xenocorpse.wulfenite.blocks.BlockWulfenite;
- import com.xenocorpse.wulfenite.blocks.OreMolybdenum;
- import com.xenocorpse.wulfenite.blocks.OrePyrite;
- import com.xenocorpse.wulfenite.blocks.OreRuby;
- import com.xenocorpse.wulfenite.blocks.OreWulfenite;
- public class wulfeniteBlocks {
- public static Block wulfenite_ore;
- public static Block ruby_ore;
- public static Block wulfenite_block;
- public static Block ruby_block;
- public static Block mathewmite;
- public static Block molybdenum_ore;
- public static Block molybdenum_block;
- public static Block pyrite_ore;
- public static Block foolsgold_block;
- public static Block grinder;
- public static void init(){
- wulfenite_ore = new OreWulfenite(Material.rock).setUnlocalizedName("wulfenite_ore").setCreativeTab(Wulfenite.tabWulfenite);
- wulfenite_block = new BlockWulfenite(Material.glass).setUnlocalizedName("wulfenite_block").setCreativeTab(Wulfenite.tabWulfenite);
- mathewmite = new BlockMathewmite(Material.glass).setUnlocalizedName("mathewmite").setCreativeTab(Wulfenite.tabWulfenite);
- ruby_ore = new OreRuby(Material.rock).setUnlocalizedName("ruby_ore").setCreativeTab(Wulfenite.tabWulfenite);
- ruby_block = new BlockRuby(Material.iron).setUnlocalizedName("ruby_block").setCreativeTab(Wulfenite.tabWulfenite);
- molybdenum_ore = new OreMolybdenum(Material.rock).setUnlocalizedName("molybdenum_ore").setCreativeTab(Wulfenite.tabWulfenite);
- molybdenum_block = new BlockMolybdenum(Material.iron).setUnlocalizedName("molybdenum_block").setCreativeTab(Wulfenite.tabWulfenite);
- pyrite_ore = new OrePyrite(Material.rock).setUnlocalizedName("pyrite_ore").setCreativeTab(Wulfenite.tabWulfenite);
- foolsgold_block = new BlockFoolsgold(Material.iron).setUnlocalizedName("foolsgold_block").setCreativeTab(Wulfenite.tabWulfenite);
- grinder = new BlockGrinder(Material.iron).setUnlocalizedName("grinder").setCreativeTab(Wulfenite.tabWulfenite);
- }
- public static void register(){
- GameRegistry.registerBlock(wulfenite_ore, wulfenite_ore.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(ruby_ore, ruby_ore.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(molybdenum_ore, molybdenum_ore.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(pyrite_ore, pyrite_ore.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(wulfenite_block, wulfenite_block.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(mathewmite, mathewmite.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(ruby_block, ruby_block.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(molybdenum_block, molybdenum_block.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(foolsgold_block, foolsgold_block.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(grinder, grinder.getUnlocalizedName().substring(5));
- }
- public static void registerRenders(){
- registerRender(wulfenite_ore);
- registerRender(ruby_ore);
- registerRender(molybdenum_ore);
- registerRender(pyrite_ore);
- registerRender(wulfenite_block);
- registerRender(mathewmite);
- registerRender(ruby_block);
- registerRender(molybdenum_block);
- registerRender(foolsgold_block);
- }
- public static void registerRender(Block block){
- Item item = Item.getItemFromBlock(block);
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Wulfenite.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment