コード例 #1
0
ファイル: mod_Automatons.java プロジェクト: Aninon/Automatons
  public mod_Automatons() {

    (new AM_DimensionBot()).name = "Bot Land";

    techAchievement =
        (new Achievement(4281, "WERG", -4, -6, Item.appleRed, null)).registerAchievement();
    ModLoader.AddAchievementDesc(techAchievement, "YOU IS WINRAR!", "herpy derp derp?");

    itemOmni.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/itemOmni.png");
    ModLoader.AddName(itemOmni, "Omni Unit");

    cheatStick.iconIndex =
        53; // ModLoader.addOverride("/gui/items.png", "/automatons/itemOmni.png");
    ModLoader.AddName(cheatStick, "CHEAT STICK!1!1ONE11!!");

    mortar.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/mortar.png");
    ModLoader.AddName(mortar, "Grinder");

    regulator.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/regulator.png");
    ModLoader.AddName(regulator, "Phase Regulator");

    daymaker.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/daymaker.png");
    ModLoader.AddName(daymaker, "Dawn");

    techifier.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/techifier.png");
    ModLoader.AddName(techifier, "Bionic Conversion System");

    smack.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/sliderpan.png");
    ModLoader.AddName(smack, "Slider Pan");

    naturizer.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/naturizer.png");
    ModLoader.AddName(naturizer, "Organic Conversion System");

    // itemBally

    // itemBot

    // stuffs

    automaton.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/automaton.png");
    ModLoader.AddName(automaton, "Worker");

    // automatonHead.iconIndex = ModLoader.addOverride("/gui/items.png",
    // "/automatons/automatonHead.png");
    // ModLoader.AddName(automatonHead, "Worker Head");

    // automatonBod.iconIndex = ModLoader.addOverride("/gui/items.png",
    // "/automatons/automatonBod.png");
    // ModLoader.AddName(automatonBod, "Automaton Body");

    // automatonLeg.iconIndex = ModLoader.addOverride("/gui/items.png",
    // "/automatons/automatonLeg.png");
    // ModLoader.AddName(automatonLeg, "Automaton Leg");

    automatonCore.iconIndex =
        ModLoader.addOverride("/gui/items.png", "/automatons/automatonCore.png");
    ModLoader.AddName(automatonCore, "Blue Core");

    beacon.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/beacon.png");
    ModLoader.AddName(beacon, "Beacon");

    biter.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/biter.png");
    ModLoader.AddName(biter, "Sentry");

    // automatonBack.iconIndex = ModLoader.addOverride("/gui/items.png",
    // "/automatons/automatonBack.png");
    // ModLoader.AddName(automatonBack, "Automaton Back");

    // biterHead.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/biterHead.png");
    // ModLoader.AddName(biterHead, "Sentry Head");

    // rod.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/rod.png");
    // ModLoader.AddName(rod, "Iron Rod");

    superCore.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/superCore.png");
    ModLoader.AddName(superCore, "Red Core");

    guard.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/guard.png");
    ModLoader.AddName(guard, "Guard Turret");

    blaster.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/blaster.png");
    ModLoader.AddName(blaster, "Pulse Rifle");

    factotum.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/itemfactotum.png");
    ModLoader.AddName(factotum, "Factotum");

    pickTech.iconIndex = ModLoader.addOverride("/gui/items.png", "/automatons/picktech.png");
    ModLoader.AddName(pickTech, "Charged Pick");

    ModLoader.AddName(new ItemStack(stuffs, 1, 0), "Adaptive Bionic Conglomerate");
    ModLoader.AddName(new ItemStack(stuffs, 1, 1), "Automaton Body");
    ModLoader.AddName(new ItemStack(stuffs, 1, 2), "Worker Head");
    ModLoader.AddName(new ItemStack(stuffs, 1, 3), "Automaton Leg");
    ModLoader.AddName(new ItemStack(stuffs, 1, 4), "Iron Rod");
    ModLoader.AddName(new ItemStack(stuffs, 1, 5), "Automaton Back");
    ModLoader.AddName(new ItemStack(stuffs, 1, 6), "Sentry Head");
    ModLoader.AddName(new ItemStack(stuffs, 1, 7), "Cybernetic Particulate");
    ModLoader.AddName(new ItemStack(stuffs, 1, 8), "Plant Matter");
    ModLoader.AddName(new ItemStack(stuffs, 1, 9), "Coal Dust");
    ModLoader.AddName(new ItemStack(stuffs, 1, 10), "Salt Petre");
    ModLoader.AddName(new ItemStack(stuffs, 1, 11), "Sulfur");
    ModLoader.AddName(new ItemStack(stuffs, 1, 12), "Factotum Head");
    ModLoader.AddName(new ItemStack(stuffs, 1, 13), "Furnace Chunk");
    ModLoader.AddName(new ItemStack(stuffs, 1, 14), "Greater Automaton Body");

    ModLoader.RegisterBlock(tech, AM_ItemComplex.class);
    ModLoader.RegisterBlock(crink);
    ModLoader.RegisterBlock(duplex);
    ModLoader.RegisterBlock(crystal);
    ModLoader.RegisterBlock(glowy);
    ModLoader.RegisterBlock(fakeCrystal);
    ModLoader.RegisterBlock(frass, AM_ItemFrass.class);
    ModLoader.RegisterBlock(heal);
    ModLoader.RegisterBlock(boing);
    ModLoader.RegisterBlock(dapling);
    ModLoader.RegisterBlock(grower);
    ModLoader.RegisterBlock(frass2);
    ModLoader.RegisterBlock(tv);
    ModLoader.RegisterBlock(sky, AM_ItemLumo.class);
    ModLoader.RegisterBlock(techPlant);
    ModLoader.RegisterBlock(importantBuildingThingy);
    ModLoader.RegisterBlock(arbor);
    ModLoader.RegisterBlock(deployer);

    ModLoader.AddName(new ItemStack(tech, 1, 0), "Ancient Construct");
    ModLoader.AddName(new ItemStack(tech, 1, 1), "Bionic Mass");
    ModLoader.AddName(new ItemStack(tech, 1, 2), "Domestic Tile");
    ModLoader.AddName(new ItemStack(tech, 1, 3), "Domestic Tile2");

    ModLoader.AddName(new ItemStack(sky, 1, 0), "Atmospheric simulator");
    ModLoader.AddName(new ItemStack(sky, 1, 1), "Walkway Tile");

    ModLoader.AddName(crink, "Foliage Array");
    ModLoader.AddName(duplex, "Duplex");
    ModLoader.AddName(crystal, "Power Shard");
    ModLoader.AddName(glowy, "Illuminator");
    ModLoader.AddName(fakeCrystal, "Power Shard");
    ModLoader.AddName(frass, "Frass");
    ModLoader.AddName(heal, "Biomatter Regenerator");
    ModLoader.AddName(boing, "Slider Shell");
    ModLoader.AddName(dapling, "Dapling");
    ModLoader.AddName(grower, "Bionic Stalk");

    // tech.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/automatons/tech.png");
    // crystal.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/automatons/tech.png");
    // crink.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/automatons/crink.png");
    duplex.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/automatons/duplex.png");
    frass2.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/automatons/frass5.png");
    hollow.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/automatons/crink3.png");
    // techPlant.blockIndexInTexture =ModLoader.addOverride("/terrain.png",
    // "/automatons/techPlant.png");

    // sky.blockIndexInTexture =ModLoader.addOverride("/terrain.png", "/automatons/sky.png");
    // dapling.blockIndexInTexture =

    // tech.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/automatons/tech.png");
    AM_BlockComplex.loadSprites();
    AM_BlockBoing.loadSprites();
    AM_BlockFrass.loadSprites();
    AM_BlockHeal.loadSprites();
    AM_BlockGrower.loadSprites();
    AM_BlockCrink.loadSprites();
    AM_BlockHollow.loadSprites();
    AM_BlockLumo.loadSprites();
    AM_BlockDeployer.loadSprites();
    AM_BlockArbor.loadSprites();
    // Item.itemsList[frass.blockID] = (new ItemFrass(frass.blockID - 256)).setItemName("frass");

    ((AM_BlockGlow) crystal).loadSprites1();
    fakeCrystal.loadSprites(((AM_BlockGlow) crystal).D[0], ((AM_BlockGlow) crystal).D[1]);

    AM_BlockFrass.setAllowed();

    ModLoader.AddSpawn(AM_EntityWatcher.class, 12, 4, 4, EnumCreatureType.monster);
    ModLoader.AddSpawn(AM_EntitySlider.class, 4, 4, 4, EnumCreatureType.creature);

    ModLoader.AddSpawn(AM_EntityChopper.class, 14, 4, 4, EnumCreatureType.creature);
    ModLoader.AddSpawn(AM_EntityBobby.class, 16, 4, 4, EnumCreatureType.creature);
    ModLoader.AddSpawn(AM_EntityGolem.class, 5, 4, 4, EnumCreatureType.creature);

    // ModLoader.AddSpawn(AM_EntityArborist.class, 2,1,1 EnumCreatureType.creature);

    // ModLoader.getUniqueEntityId()
    ModLoader.RegisterEntityID(AM_EntityWatcher.class, "AM_Watcher", AutomatonLogger.watcher);
    ModLoader.RegisterEntityID(AM_EntityWorker.class, "AM_Worker", AutomatonLogger.worker);
    ModLoader.RegisterEntityID(AM_EntityBeacon.class, "AM_Beacon", AutomatonLogger.beacon);
    ModLoader.RegisterEntityID(AM_EntitySentry.class, "AM_Sentry", AutomatonLogger.sentry);
    ModLoader.RegisterEntityID(AM_EntitySlider.class, "AM_Slider", AutomatonLogger.slider);
    ModLoader.RegisterEntityID(AM_EntityGuard.class, "AM_Guard", AutomatonLogger.guardTurret);
    ModLoader.RegisterEntityID(AM_EntityChopper.class, "AM_Chopper", AutomatonLogger.chopper);
    ModLoader.RegisterEntityID(AM_EntityBobby.class, "AM_Bobby", AutomatonLogger.bobby);
    ModLoader.RegisterEntityID(AM_EntityGolem.class, "AM_Golem", AutomatonLogger.golem1);
    ModLoader.RegisterEntityID(AM_EntityGolem2.class, "AM_Golem2", AutomatonLogger.golem2);
    ModLoader.RegisterEntityID(AM_EntityOmni.class, "Omni", AutomatonLogger.omni);
    ModLoader.RegisterEntityID(AM_EntityFactotum.class, "AM_Factotum", AutomatonLogger.factotum);
    ModLoader.RegisterEntityID(AM_EntityRemnant.class, "AM_Remnant", AutomatonLogger.remnant);
    ModLoader.RegisterEntityID(AM_EntityArborist.class, "AM_Arborist", AutomatonLogger.arborist);
    ModLoader.RegisterEntityID(AM_EntityHydra.class, "AM_Hydra", AutomatonLogger.hydra);
    // ModLoader.RegisterEntityID(EntityAZiz.class, "AZiz",AutomatonLogger.ziz);

    ModLoader.AddRecipe(
        new ItemStack(automatonCore, 1),
        new Object[] { // core
          "###",
          "OOO",
          "OOO",
          Character.valueOf('#'),
          Block.stone,
          Character.valueOf('O'),
          Item.redstone
        });

    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 3),
        new Object[] { // leg
          "#O",
          " O",
          Character.valueOf('#'),
          new ItemStack(stuffs, 1, 4),
          Character.valueOf('O'),
          Block.cobblestone
        });
    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 3),
        new Object[] { // leg
          "O#",
          "O ",
          Character.valueOf('#'),
          new ItemStack(stuffs, 1, 4),
          Character.valueOf('O'),
          Block.cobblestone
        });
    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 2),
        new Object[] { // workerhead
          "OIO",
          "#OO",
          " s ",
          Character.valueOf('s'),
          new ItemStack(stuffs, 1, 4),
          Character.valueOf('I'),
          Block.torchWood,
          Character.valueOf('#'),
          Block.glass,
          Character.valueOf('O'),
          Block.cobblestone
        });
    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 1),
        new Object[] { // bod
          "O#O",
          "OHO",
          "O#O",
          Character.valueOf('H'),
          automatonCore,
          Character.valueOf('#'),
          Block.glass,
          Character.valueOf('O'),
          Block.cobblestone
        });

    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 14),
        new Object[] { // bod2
          "O#O",
          "OHO",
          "O#O",
          Character.valueOf('H'),
          superCore,
          Character.valueOf('#'),
          Block.glass,
          Character.valueOf('O'),
          Block.cobblestone
        });

    ModLoader.AddRecipe(
        new ItemStack(automaton, 1),
        new Object[] { // automaton
          " A ",
          "CBC",
          Character.valueOf('A'),
          new ItemStack(stuffs, 1, 2),
          Character.valueOf('B'),
          new ItemStack(stuffs, 1, 1),
          Character.valueOf('C'),
          new ItemStack(stuffs, 1, 3)
        });

    ModLoader.AddRecipe(
        new ItemStack(beacon, 1),
        new Object[] {
          " O ",
          " H ",
          "OOO",
          Character.valueOf('H'),
          automatonCore,
          Character.valueOf('O'),
          Block.cobblestone
        });
    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 5),
        new Object[] { // biter back
          "OsO",
          "OsO",
          Character.valueOf('s'),
          new ItemStack(stuffs, 1, 4),
          Character.valueOf('O'),
          Block.cobblestone
        });
    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 6),
        new Object[] { // biter head
          "OOO",
          "ssr",
          "OOO",
          Character.valueOf('s'),
          new ItemStack(stuffs, 1, 4),
          Character.valueOf('r'),
          Block.torchWood,
          Character.valueOf('O'),
          Block.cobblestone
        });

    ModLoader.AddRecipe(
        new ItemStack(biter, 1),
        new Object[] {
          " ll",
          "hbk",
          " ll",
          Character.valueOf('h'),
          new ItemStack(stuffs, 1, 6),
          Character.valueOf('b'),
          new ItemStack(stuffs, 1, 14),
          Character.valueOf('k'),
          new ItemStack(stuffs, 1, 5),
          Character.valueOf('l'),
          new ItemStack(stuffs, 1, 3)
        });

    ModLoader.AddRecipe(
        new ItemStack(blaster, 1),
        new Object[] {
          "OOs",
          "DDD",
          "  r",
          Character.valueOf('O'),
          Item.ingotIron,
          Character.valueOf('s'),
          superCore,
          Character.valueOf('D'),
          crystal,
          Character.valueOf('r'),
          new ItemStack(stuffs, 1, 4)
        });

    ModLoader.AddShapelessRecipe(new ItemStack(stuffs, 9, 4), new Object[] {Item.ingotIron});

    ModLoader.AddShapelessRecipe(new ItemStack(duplex, 1), new Object[] {crystal, crink});

    /*ModLoader.AddShapelessRecipe(new ItemStack(duplex, 9), new Object[] {
    	duplex
    });*/

    ModLoader.AddShapelessRecipe(new ItemStack(guard, 1), new Object[] {blaster, beacon});

    ModLoader.AddShapelessRecipe(
        new ItemStack(superCore, 1), new Object[] {automatonCore, automatonCore, automatonCore});

    ModLoader.AddRecipe(
        new ItemStack(Item.ingotIron, 1),
        new Object[] {"OOO", "OOO", "OOO", Character.valueOf('O'), new ItemStack(stuffs, 1, 4)});

    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 4),
        new Object[] {"O", "O", "O", Character.valueOf('O'), new ItemStack(stuffs, 1, 0)});

    ModLoader.AddShapelessRecipe(new ItemStack(stuffs, 2, 9), new Object[] {Item.coal, mortar});

    ModLoader.AddRecipe(
        new ItemStack(pickTech, 1),
        new Object[] {
          "i",
          "L",
          Character.valueOf('i'),
          new ItemStack(stuffs, 1, 4),
          Character.valueOf('L'),
          grower
        });

    ModLoader.AddShapelessRecipe(new ItemStack(stuffs, 2, 8), new Object[] {Block.sapling, mortar});

    ModLoader.AddShapelessRecipe(new ItemStack(stuffs, 2, 8), new Object[] {Item.seeds, mortar});

    ModLoader.AddRecipe(
        new ItemStack(stuffs, 2, 7),
        new Object[] {"O", "M", Character.valueOf('O'), frass, Character.valueOf('M'), mortar});

    /*ddShapelessRecipe(new ItemStack(stuffs, 2,7), new Object[] {
    Block.frass, Item.mortar
    });*/
    ModLoader.AddShapelessRecipe(new ItemStack(stuffs, 2, 7), new Object[] {crink, mortar});

    ModLoader.AddShapelessRecipe(
        new ItemStack(Item.redstone, 3), new Object[] {automatonCore, mortar});
    ModLoader.AddShapelessRecipe(new ItemStack(Item.redstone, 6), new Object[] {superCore, mortar});

    ModLoader.AddShapelessRecipe(
        new ItemStack(stuffs, 1, 0),
        new Object[] {new ItemStack(stuffs, 2, 8), new ItemStack(stuffs, 2, 7)});

    ModLoader.AddRecipe(
        new ItemStack(techifier, 1),
        new Object[] {
          "OOO",
          "OfO",
          "i i",
          Character.valueOf('O'),
          new ItemStack(stuffs, 1, 0),
          Character.valueOf('f'),
          frass,
          Character.valueOf('i'),
          new ItemStack(stuffs, 1, 4)
        });

    ModLoader.AddRecipe(
        new ItemStack(naturizer, 1),
        new Object[] {
          "i i",
          "OfO",
          "OOO",
          Character.valueOf('O'),
          new ItemStack(stuffs, 1, 0),
          Character.valueOf('f'),
          Block.sapling,
          Character.valueOf('i'),
          Item.stick
        });

    ModLoader.AddRecipe(
        new ItemStack(dapling, 1),
        new Object[] {
          " O ",
          "OCO",
          " s ",
          Character.valueOf('O'),
          crink,
          Character.valueOf('C'),
          automatonCore,
          Character.valueOf('s'),
          new ItemStack(stuffs, 1, 0)
        });

    ModLoader.AddRecipe(
        new ItemStack(itemOmni, 1),
        new Object[] {
          "OOO",
          "OCO",
          "OOO",
          Character.valueOf('O'),
          new ItemStack(stuffs, 1, 0),
          Character.valueOf('C'),
          superCore
        });

    ModLoader.AddRecipe(
        new ItemStack(mortar, 1),
        new Object[] {
          "#-#",
          "#-#",
          "#-#",
          Character.valueOf('#'),
          Block.stone,
          Character.valueOf('-'),
          new ItemStack(stuffs, 1, 4)
        });

    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 12),
        new Object[] {
          "OOO",
          "gig",
          "OOO",
          Character.valueOf('O'),
          Block.cobblestone,
          Character.valueOf('g'),
          Block.glass,
          Character.valueOf('i'),
          Item.ingotIron
        });

    ModLoader.AddRecipe(
        new ItemStack(stuffs, 1, 13),
        new Object[] {
          "FfF",
          "iPi",
          "OFO",
          Character.valueOf('O'),
          Block.cobblestone,
          Character.valueOf('F'),
          Block.stoneOvenIdle,
          Character.valueOf('i'),
          Item.ingotIron,
          Character.valueOf('f'),
          Item.flintAndSteel,
          Character.valueOf('P'),
          crystal
        });

    ModLoader.AddRecipe(
        new ItemStack(factotum, 1),
        new Object[] {
          " ll",
          "hbk",
          " ll",
          Character.valueOf('h'),
          new ItemStack(stuffs, 1, 12),
          Character.valueOf('b'),
          new ItemStack(stuffs, 1, 14),
          Character.valueOf('k'),
          new ItemStack(stuffs, 1, 13),
          Character.valueOf('l'),
          new ItemStack(stuffs, 1, 3)
        });

    ModLoader.AddRecipe(
        new ItemStack(Block.workbench, 1),
        new Object[] {"DD", "DD", Character.valueOf('D'), new ItemStack(tech, 1, 1)});

    ModLoader.AddRecipe(
        new ItemStack(smack, 1),
        new Object[] {
          " S",
          "i ",
          Character.valueOf('S'),
          boing,
          Character.valueOf('i'),
          new ItemStack(stuffs, 1, 4)
        });

    ModLoader.AddShapelessRecipe(
        new ItemStack(Item.gunpowder, 3),
        new Object[] {
          new ItemStack(stuffs, 1, 10), new ItemStack(stuffs, 1, 11), new ItemStack(stuffs, 1, 9)
        });

    /// BAD///
    ModLoader.AddRecipe(
        new ItemStack(frass, 1, 1),
        new Object[] {"##", "##", Character.valueOf('#'), Item.redstone});

    ModLoader.AddRecipe(
        new ItemStack(frass, 64, 1), new Object[] {"##", "##", Character.valueOf('#'), Block.dirt});

    ModLoader.AddRecipe(
        new ItemStack(cheatStick, 1), new Object[] {"##", "##", Character.valueOf('#'), frass});

    ModLoader.AddRecipe(
        new ItemStack(Block.reed, 50),
        new Object[] {"##", "# ", Character.valueOf('#'), Block.dirt});
    ModLoader.AddRecipe(
        new ItemStack(stuffs, 10, 10), new Object[] {"#", "#", Character.valueOf('#'), frass});
    ModLoader.AddRecipe(
        new ItemStack(Item.ingotIron, 10, 0),
        new Object[] {" #", "##", Character.valueOf('#'), Block.dirt});
    ModLoader.AddRecipe(
        new ItemStack(arbor, 64), new Object[] {"##", Character.valueOf('#'), frass});
    ModLoader.AddRecipe(
        new ItemStack(stuffs, 10, 11), new Object[] {"# ", " #", Character.valueOf('#'), frass});

    /*
    System.out.println("\nall tech biomes is " +((AutomatonLogger.allTech==1)?"on":"off"));
    if(AutomatonLogger.allTech==1){
    	BiomeGenBase.generateBiomeLookup();
    }*/

    // defaultTerrain=ModLoader.getMinecraftInstance().renderEngine.getTexture("/terrain.png");

    // AutomatonLogger.tvRenderId=ModLoader.getUniqueBlockModelID(this,true);
    // ModLoader.SetInGameHook(this,true,true);

  }
コード例 #2
0
  public mod_CobbleFence() {
    ModLoader.RegisterBlock(cobbleFence);
    ModLoader.AddName(cobbleFence, "Cobblestone Wall");

    ModLoader.RegisterBlock(mossyCobbleFence);
    ModLoader.AddName(mossyCobbleFence, "Mossy Cobblestone Wall");

    ModLoader.RegisterBlock(smoothStoneFence);
    ModLoader.AddName(smoothStoneFence, "Smoothstone Wall");

    ModLoader.RegisterBlock(brickFence);
    ModLoader.AddName(brickFence, "Brick Wall");

    ModLoader.RegisterBlock(stoneFence);
    ModLoader.AddName(stoneFence, "Stone Wall");

    ModLoader.RegisterBlock(sandStoneFence);
    ModLoader.AddName(sandStoneFence, "Sandstone Wall");

    // Set up custom render ID
    int temp = ModLoader.getUniqueBlockModelID(this, true);

    ((BlockCobbleFence) cobbleFence).setRenderType(temp);
    ModLoader.RenderBlockIsItemFull3D(COBBLESTONE_FENCE_ID);

    ((BlockCobbleFence) mossyCobbleFence).setRenderType(temp);
    ModLoader.RenderBlockIsItemFull3D(MOSSYCOBBLESTONE_FENCE_ID);

    ((BlockCobbleFence) smoothStoneFence).setRenderType(temp);
    ModLoader.RenderBlockIsItemFull3D(SMOOTHSTONE_FENCE_ID);

    ((BlockCobbleFence) brickFence).setRenderType(temp);
    ModLoader.RenderBlockIsItemFull3D(BRICK_FENCE_ID);

    ((BlockCobbleFence) stoneFence).setRenderType(temp);
    ModLoader.RenderBlockIsItemFull3D(STONE_FENCE_ID);

    ((BlockCobbleFence) sandStoneFence).setRenderType(temp);
    ModLoader.RenderBlockIsItemFull3D(SANDSTONE_FENCE_ID);

    // Setting up recipes
    ModLoader.AddRecipe(
        new ItemStack(cobbleFence, 6),
        new Object[] {"###", "###", Character.valueOf('#'), Block.cobblestone});

    ModLoader.AddRecipe(
        new ItemStack(mossyCobbleFence, 6),
        new Object[] {"###", "###", Character.valueOf('#'), Block.cobblestoneMossy});

    ModLoader.AddRecipe(
        new ItemStack(smoothStoneFence, 6),
        new Object[] {"###", "###", Character.valueOf('#'), Block.stone});

    ModLoader.AddRecipe(
        new ItemStack(brickFence, 6),
        new Object[] {"###", "###", Character.valueOf('#'), Block.brick});

    ModLoader.AddRecipe(
        new ItemStack(stoneFence, 6),
        new Object[] {"###", "###", Character.valueOf('#'), Block.stoneBrick});

    ModLoader.AddRecipe(
        new ItemStack(sandStoneFence, 6),
        new Object[] {"###", "###", Character.valueOf('#'), Block.sandStone});
  }