Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package init;
- import com.nikea.colouredblocks.blocks.stone.BlackStoneBlock;
- import com.nikea.colouredblocks.blocks.Block.BlackBlock;
- import com.nikea.colouredblocks.blocks.Block.BlueBlock;
- import com.nikea.colouredblocks.blocks.Block.RedBlock;
- import com.nikea.colouredblocks.blocks.glowstone.BlueGlowStoneBlock;
- import com.nikea.colouredblocks.blocks.glowstone.RedGlowStoneBlock;
- import com.nikea.colouredblocks.blocks.glowstone.WhiteGlowStoneBlock;
- import com.nikea.colouredblocks.blocks.glowstone.YellowGlowStoneBlock;
- import com.nikea.colouredblocks.blocks.stone.BlueStoneBlock;
- import com.nikea.colouredblocks.blocks.stone.BrownStoneBlock;
- import com.nikea.colouredblocks.blocks.stone.LimeStoneBlock;
- import com.nikea.colouredblocks.blocks.stone.PinkStoneBlock;
- import com.nikea.colouredblocks.blocks.stone.RedStoneBlock;
- import com.nikea.colouredblocks.blocks.stone.WhiteStoneBlock;
- import com.nikea.colouredblocks.blocks.stone.YellowStoneBlock;
- import net.minecraft.block.Block;
- import net.minecraft.block.state.IBlockState;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.renderer.block.model.ModelResourceLocation;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemBlock;
- import net.minecraftforge.fml.common.registry.GameRegistry;
- public class ModBlocks {
- public static Block bluestoneblock;
- public static Block yellowstoneblock;
- public static Block whitestoneblock;
- public static Block blackstoneblock;
- public static Block redstoneblock;
- public static Block limestoneblock;
- public static Block brownstoneblock;
- public static Block pinkstoneblock;
- public static Block blueglowstoneblock;
- public static Block redglowstoneblock;
- public static Block whiteglowstoneblock;
- public static Block yellowglowstoneblock;
- public static Block redblock;
- public static Block blueblock;
- public static Block blackblock;
- public static void init() {
- bluestoneblock = new BlueStoneBlock();
- yellowstoneblock = new YellowStoneBlock();
- whitestoneblock = new WhiteStoneBlock();
- blackstoneblock = new BlackStoneBlock();
- redstoneblock = new RedStoneBlock();
- limestoneblock = new LimeStoneBlock();
- brownstoneblock = new BrownStoneBlock();
- pinkstoneblock = new PinkStoneBlock();
- blueglowstoneblock = new BlueGlowStoneBlock();
- redglowstoneblock = new RedGlowStoneBlock();
- whiteglowstoneblock = new WhiteGlowStoneBlock();
- yellowglowstoneblock = new YellowGlowStoneBlock();
- redblock = new RedBlock();
- blueblock = new BlueBlock();
- blackblock = new BlackBlock();
- }
- public static void register() {
- registerBlock(bluestoneblock);
- registerBlock(yellowstoneblock);
- registerBlock(whitestoneblock);
- registerBlock(blackstoneblock);
- registerBlock(redstoneblock);
- registerBlock(limestoneblock);
- registerBlock(brownstoneblock);
- registerBlock(pinkstoneblock);
- registerBlock(blueglowstoneblock);
- registerBlock(redglowstoneblock);
- registerBlock(whiteglowstoneblock);
- registerBlock(yellowglowstoneblock);
- registerBlock(redblock);
- registerBlock(blueblock);
- registerBlock(blackblock);
- }
- private static void registerBlock(Block block) {
- GameRegistry.register(bluestoneblock);
- GameRegistry.register(yellowstoneblock);
- GameRegistry.register(whitestoneblock);
- GameRegistry.register(blackstoneblock);
- GameRegistry.register(redstoneblock);
- GameRegistry.register(limestoneblock);
- GameRegistry.register(brownstoneblock);
- GameRegistry.register(pinkstoneblock);
- GameRegistry.register(blueglowstoneblock);
- GameRegistry.register(redglowstoneblock);
- GameRegistry.register(whiteglowstoneblock);
- GameRegistry.register(yellowglowstoneblock);
- GameRegistry.register(redblock);
- GameRegistry.register(blueblock);
- GameRegistry.register(blackblock);
- ItemBlock item = new ItemBlock(block);
- item.setRegistryName(block.getRegistryName());
- GameRegistry.register(item);
- }
- public static void registerRenders() {
- registerRender(bluestoneblock);
- registerRender(yellowstoneblock);
- registerRender(whitestoneblock);
- registerRender(blackstoneblock);
- registerRender(redstoneblock);
- registerRender(limestoneblock);
- registerRender(brownstoneblock);
- registerRender(pinkstoneblock);
- registerRender(blueglowstoneblock);
- registerRender(redglowstoneblock);
- registerRender(whiteglowstoneblock);
- registerRender(yellowglowstoneblock);
- registerRender(redblock);
- registerRender(blueblock);
- registerRender(blackblock);
- }
- private static void registerRender(Block block) {
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
- }
- //////////////////////////
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement