Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sidthesloth.compact.blocks;
- import net.minecraft.src.Block;
- import net.minecraft.src.CreativeTabs;
- import net.minecraft.src.Item;
- import net.minecraft.src.ItemStack;
- import net.minecraft.src.Material;
- import net.minecraftforge.common.Configuration;
- import net.minecraftforge.common.MinecraftForge;
- import cpw.mods.fml.common.Mod;
- import cpw.mods.fml.common.Mod.Init;
- import cpw.mods.fml.common.Mod.Instance;
- import cpw.mods.fml.common.Mod.PostInit;
- import cpw.mods.fml.common.Mod.PreInit;
- import cpw.mods.fml.common.SidedProxy;
- import cpw.mods.fml.common.event.FMLInitializationEvent;
- import cpw.mods.fml.common.event.FMLPostInitializationEvent;
- import cpw.mods.fml.common.event.FMLPreInitializationEvent;
- import cpw.mods.fml.common.network.NetworkMod;
- import cpw.mods.fml.common.registry.GameRegistry;
- import cpw.mods.fml.common.registry.LanguageRegistry;
- @Mod(modid="compactblocks", name="compactblocks", version="0.0.01")
- @NetworkMod(clientSideRequired=true, serverSideRequired=false)
- public class compactblocks {
- // The instance of your mod that Forge uses.
- @Instance("compactblocks")
- public static compactblocks instance;
- ///id's
- public static int compactdirtID;
- public static int compactcobblestoneID;
- ///id's
- public final static Block compactdirt = new compactdirt(compactdirtID, 2, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact Dirt").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactcobblestone = new compactcobblestone(compactcobblestoneID, 3, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact cobblestone").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactstone = new compactstone(502, 4, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact stone").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactgravel = new compactgravel(503, 5, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact gravel").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactsand = new compactsand(504, 6, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact sand").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactobsidian = new compactobsidian(505, 7, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact obsidian").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactcactus = new compactcactus(506, 8, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact cactus").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactlogs = new compactlogs(507, 9, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact log").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactsandstone = new compactsandstone(508, 10, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact sandstone").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactnetherrack = new compactnetherrack(509, 13, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact netherrack").setCreativeTab(CreativeTabs.tabBlock);
- //public final static Block compactdirt = new compactdirt(500, 2, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact Dirt").setCreativeTab(CreativeTabs.tabBlock);
- //public final static Block compactdirt = new compactdirt(500, 2, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact Dirt").setCreativeTab(CreativeTabs.tabBlock);
- //public final static Block compactdirt = new compactdirt(500, 2, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact Dirt").setCreativeTab(CreativeTabs.tabBlock);
- //public final static Block compactdirt = new compactdirt(500, 2, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact Dirt").setCreativeTab(CreativeTabs.tabBlock);
- public final static Block compactredstone = new compactredstone(510, 11, Material.wood).setHardness(0.5F).setStepSound(Block.soundWoodFootstep).setBlockName("compact redstone").setCreativeTab(CreativeTabs.tabBlock);
- private final static Item compactItemone = new compactItemone(5000);
- public final static Item compactItemtwo = new compactItemtwo(5001).setMaxStackSize(16).setIconIndex(1).setItemName("compactItemtwo");
- // Says where the client and server 'proxy' code is loaded.
- @SidedProxy(clientSide="sidthesloth.compact.blocks.client.ClientProxy", serverSide="sidthesloth.compact.blocks.CommonProxy")
- public static CommonProxy proxy;
- @PreInit
- public void preInit(FMLPreInitializationEvent event) {
- // Stub Method
- Configuration config = new Configuration(event.getSuggestedConfigurationFile());
- config.load();
- compactdirtID= config.get(Configuration.CATEGORY_BLOCK, "compact dirt ID", 500).getInt();
- compactcobblestoneID= config.get(Configuration.CATEGORY_BLOCK, "compact cobblestone ID", 501).getInt();
- config.save();
- }
- @Init
- public void load(FMLInitializationEvent event) {
- LanguageRegistry.addName(compactItemone, "compactItemone");
- LanguageRegistry.addName(compactItemtwo, "compactItemtwo");
- LanguageRegistry.addName(compactdirt, "compact Dirt");
- MinecraftForge.setBlockHarvestLevel(compactdirt, "axe", 0);
- GameRegistry.registerBlock(compactdirt);
- LanguageRegistry.addName(compactcobblestone, "compact cobblestone");
- MinecraftForge.setBlockHarvestLevel(compactcobblestone, "axe", 0);
- GameRegistry.registerBlock(compactcobblestone);
- LanguageRegistry.addName(compactstone, "compact stone");
- MinecraftForge.setBlockHarvestLevel(compactstone, "axe", 0);
- GameRegistry.registerBlock(compactstone);
- LanguageRegistry.addName(compactgravel, "compact gravel");
- MinecraftForge.setBlockHarvestLevel(compactgravel, "axe", 0);
- GameRegistry.registerBlock(compactgravel);
- LanguageRegistry.addName(compactsand, "compact sand");
- MinecraftForge.setBlockHarvestLevel(compactsand, "axe", 0);
- GameRegistry.registerBlock(compactsand);
- LanguageRegistry.addName(compactobsidian, "compact obsidian");
- MinecraftForge.setBlockHarvestLevel(compactobsidian, "axe", 0);
- GameRegistry.registerBlock(compactobsidian);
- LanguageRegistry.addName(compactcactus, "compact cactus");
- MinecraftForge.setBlockHarvestLevel(compactcactus, "axe", 0);
- GameRegistry.registerBlock(compactcactus);
- LanguageRegistry.addName(compactlogs, "compact logs");
- MinecraftForge.setBlockHarvestLevel(compactlogs, "axe", 0);
- GameRegistry.registerBlock(compactlogs);
- LanguageRegistry.addName(compactsandstone, "compact sandstone");
- MinecraftForge.setBlockHarvestLevel(compactsandstone, "axe", 0);
- GameRegistry.registerBlock(compactsandstone);
- LanguageRegistry.addName(compactnetherrack, "compact netherrack");
- MinecraftForge.setBlockHarvestLevel(compactnetherrack, "axe", 0);
- GameRegistry.registerBlock(compactnetherrack);
- LanguageRegistry.addName(compactredstone, "compact redstone");
- MinecraftForge.setBlockHarvestLevel(compactredstone, "axe", 0);
- GameRegistry.registerBlock(compactredstone);
- //LanguageRegistry.addName(genericOre, "Generic Ore");
- //MinecraftForge.setBlockHarvestLevel(genericOre, "pickaxe", 3);
- //.registerBlock(genericOre);
- // End Basic Blocks#
- ItemStack compactItemoneStack = new ItemStack(compactItemone);
- GameRegistry.addRecipe(new ItemStack(compactItemone, 16), "xxx", " y ", "xxx",
- 'x', Block.planks, 'y', Item.stick);
- //
- ItemStack compactdirtStack= new ItemStack(compactdirt);
- GameRegistry.addRecipe(new ItemStack(compactdirt), "xxx", "xyx", "xxx",
- 'x', Block.dirt, 'y', compactItemone);
- ItemStack compactcobblestoneStack= new ItemStack(compactcobblestone);
- GameRegistry.addRecipe(new ItemStack(compactcobblestone), "xxx", "xyx", "xxx",
- 'x', Block.cobblestone, 'y', compactItemone);
- ItemStack compactstoneStack= new ItemStack(compactstone);
- GameRegistry.addRecipe(new ItemStack(compactstone), "xxx", "xyx", "xxx",
- 'x', Block.stone, 'y', compactItemone);
- ItemStack compactgravelStack= new ItemStack(compactgravel);
- GameRegistry.addRecipe(new ItemStack(compactgravel), "xxx", "xyx", "xxx",
- 'x', Block.gravel, 'y', compactItemone);
- ItemStack compactsandStack= new ItemStack(compactsand);
- GameRegistry.addRecipe(new ItemStack(compactsand), "xxx", "xyx", "xxx",
- 'x', Block.sand, 'y', compactItemone);
- ItemStack compactobsidianStack= new ItemStack(compactobsidian);
- GameRegistry.addRecipe(new ItemStack(compactobsidian), "xxx", "xyx", "xxx",
- 'x', Block.obsidian, 'y', compactItemone);
- ItemStack compactcactusStack= new ItemStack(compactcactus);
- GameRegistry.addRecipe(new ItemStack(compactcactus), "xxx", "xyx", "xxx",
- 'x', Block.cactus, 'y', compactItemone);
- ItemStack compactlogsStack= new ItemStack(compactlogs);
- GameRegistry.addRecipe(new ItemStack(compactlogs), "xxx", "xyx", "xxx",
- 'x', Block.wood, 'y', compactItemone);
- ItemStack compactsandstoneStack= new ItemStack(compactsandstone);
- GameRegistry.addRecipe(new ItemStack(compactsandstone), "xxx", "xyx", "xxx",
- 'x', Block.sandStone, 'y', compactItemone);
- ItemStack compactnetherrackStack= new ItemStack(compactnetherrack);
- GameRegistry.addRecipe(new ItemStack(compactnetherrack), "xxx", "xyx", "xxx",
- 'x', Block.netherrack, 'y', compactItemone);
- ItemStack compactredstoneStack= new ItemStack(compactredstone);
- GameRegistry.addRecipe(new ItemStack(compactredstone), "xxx", "xyx", "xxx",
- 'x', Item.redstone, 'y', compactItemone);
- //ItemStack compactItemoneStack = new ItemStack(compactItemone);
- GameRegistry.addShapelessRecipe(new ItemStack(Block.dirt, 8), new ItemStack(compactdirt));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Block.cobblestone, 8), new ItemStack(compactcobblestone));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Block.stone, 8), new ItemStack(compactstone));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Block.gravel, 8), new ItemStack(compactgravel));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Block.sand, 8), new ItemStack(compactsand));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Block.obsidian, 8), new ItemStack(compactobsidian));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Block.cactus, 8), new ItemStack(compactcactus));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Block.wood, 8), new ItemStack(compactlogs));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Block.sandStone, 8), new ItemStack(compactsandstone));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Block.netherrack, 8), new ItemStack(compactnetherrack));
- //proxy.registerRenderers();
- GameRegistry.addShapelessRecipe(new ItemStack(Item.redstone, 8), new ItemStack(compactredstone));
- //proxy.registerRenderers();
- proxy.registerRenderers();
- }
- @PostInit
- public void postInit(FMLPostInitializationEvent event) {
- // Stub Method
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment