Jump to content

Recommended Posts

Posted

Hey, I've been working on a mod, in 1.2.5/1.3.1 I have all my blocks successfully rendered and they look as they should, but when I go to the newest build you have for 1.3.1 which is 4.0.0.180 my blocks render like this - http://tinypic.com/r/28jfp6e/6 - when it should look like this - http://tinypic.com/r/f4l3ch/6 - as well I thought I'd mention not sure if this is meant but in the main title screen your fml version is different, thank you for your time i know you are extremely busy but please get back to me on this.

Block

 

 

package net.minecraft.src;

 

import java.util.Random;

 

public class BlockCopper extends Block

{

    public BlockCopper(int i, int j)

    {

        super(i, j, Material.rock);

    }

 

    /**

    * Returns the ID of the items to drop on destruction.

    */

    public int idDropped(int i, Random random, int j)

    {

        return mod_Electricalage.Copper.blockID;

    }

 

    /**

    * Returns the quantity of items to drop on block destruction.

    */

    public int quantityDropped(Random random)

    {

        return 1;

    }

}

 

 

 

mod_Electricalage

 

 

 

package net.minecraft.src;

 

import java.util.*;

 

import net.minecraft.client.Minecraft;

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.MinecraftForge;

 

import java.io.File;

import java.util.Map;

import net.minecraft.src.Block;

import net.minecraft.src.IBlockAccess;

import net.minecraft.src.ModLoader;

import net.minecraft.src.RenderBlocks;

import net.minecraft.src.mod_Electricalage;

import net.minecraftforge.*;

 

public class mod_Electricalage extends BaseMod{

 

 

//Ores

public static final Block Tin = (new BlockTin(200, 0)).setBlockName("Tin Ore").setHardness(1F).setResistance(5F);

    public static final Item TinIngot = (new ItemTinIngot(1120)).setItemName("TinIngot");

    public static final Item TinLiquid = (new ItemTinliquid(1110)).setItemName("Liquid Tin");

    public static final Item IronLiquid = (new ItemIronliquid(1210)).setItemName("Liquid Iron");

    public static final Item GoldLiquid = (new ItemGoldliquid(1211)).setItemName("Liquid Gold");

    public static final Item EmptyBucket = (new ItemEmptyTinBucket(1112)).setIconCoord(10, 4).setItemName("Empty Bucket");

   

   

    public static final Block Copper = (new BlockCopper(201, 0)).setBlockName("Copper Ore").setHardness(1F).setResistance(5F);

    public static final Item CopperIngot = (new ItemCopperIngot(1130)).setItemName("CopperIngot");

    public static final Item CopperLiquid = (new ItemCopperLiquid(1140)).setItemName("Liquid Copper");

   

    public static final Block Uranium = (new BlockUranium(202, 0)).setBlockName("Uranium Ore").setHardness(1F).setResistance(7F);

    public static final Block Silicone = (new BlockSilicone(204, 0)).setBlockName("Silicone Ore").setHardness(1F).setResistance(5F);

    public static final Block CopperMoving = new BlockCopperMoving(140, Material.water).setHardness(100F).setLightOpacity(3).setBlockName("water").disableStats().setRequiresSelfNotify();

public static final Block CopperStill = new BlockCopperStill(141, Material.water).setHardness(100F).setLightOpacity(3).setBlockName("water").disableStats().setRequiresSelfNotify();

 

    //Items

    public static final Item Battery = (new Item(1010)).setItemName("Battery");

    public static final Item CrankShaft = (new Item(1020)).setItemName("Crank Shaft");

    public static final Item HeatSensor = (new Item(1030)).setItemName("Heat Sensor");

    public static final Item Circuit = (new Item(1040)).setItemName("Circuit");

    public static final Item Coolant = (new Item(1050)).setItemName("Coolant");

    public static final Item Transformer = (new Item(1060)).setItemName("Transformer");

    public static final Item Turbine = (new Item(1070)).setItemName("Turbine");

    public static final Item Magnet = (new Item(1080)).setItemName("Magnet");

    public static final Item Brush = (new Item(1090)).setItemName("Brush");

    //Machines

   

   

   

    public static Block BlastFurnace = new BlockBlastFurnace(213, net.minecraft.src.BlastFurnaceTileEntity.class).setResistance(.5F).setBlockName("Blast Furnace").setHardness(0.5f).setRequiresSelfNotify();

    public static Block BlastFurnace1 = new BlockBlastFurnace1(214, net.minecraft.src.BlastFurnace1TileEntity.class).setResistance(.5F).setBlockName("Blast Furnace").setHardness(0.5f).setRequiresSelfNotify();

    public static Block BlastFurnace2 = new BlockBlastFurnace2(215, net.minecraft.src.BlastFurnace2TileEntity.class).setResistance(.5F).setBlockName("Blast Furnace").setHardness(0.5f).setRequiresSelfNotify();

    public static Block BlastFurnace3 = new BlockBlastFurnace3(216, net.minecraft.src.BlastFurnace3TileEntity.class).setResistance(.5F).setBlockName("Blast Furnace").setHardness(0.5f).setRequiresSelfNotify();

    public static Block Mold = new BlockMold(217, net.minecraft.src.MoldTileEntity.class).setResistance(.5F).setBlockName("Blast Furnace").setHardness(0.5f).setRequiresSelfNotify();

    public static Block Mold1 = new BlockMold1(218, net.minecraft.src.Mold1TileEntity.class).setResistance(.5F).setBlockName("Mold").setHardness(0.5f).setRequiresSelfNotify();

    public static Block Mold2 = new BlockMold2(219, net.minecraft.src.Mold2TileEntity.class).setResistance(.5F).setBlockName("Mold").setHardness(0.5f).setRequiresSelfNotify();

    public static Block Mold3 = new BlockMold3(220, net.minecraft.src.Mold3TileEntity.class).setResistance(.5F).setBlockName("Mold").setHardness(0.5f).setRequiresSelfNotify();

   

    public static Item Mold4 = new ItemReed(1511,Mold).setItemName("Blast Furnace");

    public static Item BlastFurnace4 = new ItemReed(1510,BlastFurnace).setItemName("Blast Furnace");

   

    BlastFurnaceRender tileent1 = new BlastFurnaceRender();

    BlastFurnaceRender1 tileent2 = new BlastFurnaceRender1();

    BlastFurnaceRender2 tileent3 = new BlastFurnaceRender2();

    BlastFurnaceRender3 tileent4 = new BlastFurnaceRender3();

    MoldRender tileent5 = new MoldRender();

    Mold1Render tileent6 = new Mold1Render();

    Mold2Render tileent7 = new Mold2Render();

    Mold3Render tileent8 = new Mold3Render();

 

 

   

   

   

   

   

    public mod_Electricalage()

    {

    ModLoader.registerTileEntity(net.minecraft.src.BlastFurnaceTileEntity.class, "BlastFurnaceTileEntity",tileent1);

    ModLoader.registerTileEntity(net.minecraft.src.BlastFurnace1TileEntity.class, "BlastFurnace1TileEntity",tileent2);

    ModLoader.registerTileEntity(net.minecraft.src.BlastFurnace2TileEntity.class, "BlastFurnace2TileEntity",tileent3);

    ModLoader.registerTileEntity(net.minecraft.src.BlastFurnace3TileEntity.class, "BlastFurnace3TileEntity",tileent4);

    ModLoader.registerTileEntity(net.minecraft.src.MoldTileEntity.class, "MoldTileEntity",tileent5);

    ModLoader.registerTileEntity(net.minecraft.src.Mold1TileEntity.class, "Mold1TileEntity",tileent6);

    ModLoader.registerTileEntity(net.minecraft.src.Mold2TileEntity.class, "Mold2TileEntity",tileent7);

    ModLoader.registerTileEntity(net.minecraft.src.Mold3TileEntity.class, "Mold3TileEntity",tileent8);

     

     

    Tin.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/TinOre.png");

        ModLoader.registerBlock(Tin);

        ModLoader.addName(Tin, "Tin Ore");

        MinecraftForge.setBlockHarvestLevel(Tin, "pickaxe", 3);

        TinIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/TinIngot.png");

        ModLoader.addName(TinIngot, "Tin Ingot");

        ModLoader.addSmelting(Tin.blockID, new ItemStack(TinIngot, 1));

        Copper.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/CopperOre.png");

        ModLoader.registerBlock(Copper);

        ModLoader.addName(Copper, "Copper Ore");

        MinecraftForge.setBlockHarvestLevel(Copper, "pickaxe", 2);

        CopperIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/CopperIngot.png");

        ModLoader.addName(CopperIngot, "Copper Ingot");

        ModLoader.addSmelting(Copper.blockID, new ItemStack(CopperIngot, 1));

        Uranium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/UraniumOre.png");

        ModLoader.registerBlock(Uranium);

        ModLoader.addName(Uranium, "Uranium Ore");

        MinecraftForge.setBlockHarvestLevel(Uranium, "pickaxe", 3);

        Silicone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SiliconeOre.png");

        ModLoader.registerBlock(Silicone);

        ModLoader.addName(Silicone, "Silicone Ore");

        Battery.iconIndex = ModLoader.addOverride("/gui/items.png", "/Battery.png");

        ModLoader.addName(Battery, "Battery");

        CrankShaft.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrankShaft.png");

        ModLoader.addName(CrankShaft, "Crank Shaft");

        HeatSensor.iconIndex = ModLoader.addOverride("/gui/items.png", "/HeatSensor.png");

        ModLoader.addName(HeatSensor, "Heat Sensor");

        Circuit.iconIndex = ModLoader.addOverride("/gui/items.png", "/Circuit.png");

        ModLoader.addName(Circuit, "Circuit");

        Coolant.iconIndex = ModLoader.addOverride("/gui/items.png", "/Coolant.png");

        ModLoader.addName(Coolant, "Coolant");

        Transformer.iconIndex = ModLoader.addOverride("/gui/items.png", "/Transformer.png");

        ModLoader.addName(Transformer, "Transformer");

        Turbine.iconIndex = ModLoader.addOverride("/gui/items.png", "/Turbine.png");

        ModLoader.addName(Turbine, "Turbine");

        Magnet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Magnet.png");

        ModLoader.addName(Magnet, "Magnet");

        Brush.iconIndex = ModLoader.addOverride("/gui/items.png", "/Brush.png");

        ModLoader.addName(Brush, "Brush");

        TinLiquid.iconIndex = ModLoader.addOverride("/gui/items.png", "/LiquidTin.png");

        ModLoader.addName(TinLiquid, "Liquid Tin");

        CopperLiquid.iconIndex = ModLoader.addOverride("/gui/items.png", "/LiquidCopper.png");

        ModLoader.addName(CopperLiquid, "Liquid Copper");

        IronLiquid.iconIndex = ModLoader.addOverride("/gui/items.png", "/LiquidCopper.png");

        ModLoader.addName(IronLiquid, "Liquid Iron");

        GoldLiquid.iconIndex = ModLoader.addOverride("/gui/items.png", "/LiquidCopper.png");

        ModLoader.addName(GoldLiquid, "Liquid Gold");

        BlastFurnace4.iconIndex = ModLoader.addOverride("/gui/items.png", "/ItemBlastFurnace.png");

        ModLoader.addName(EmptyBucket, "Empty Bucket");

        Mold4.iconIndex = ModLoader.addOverride("/gui/items.png", "/ItemBlastFurnace.png");

     

   

       

                ModLoader.registerBlock(Mold);

ModLoader.registerBlock(BlastFurnace);

ModLoader.registerBlock(CopperMoving);

ModLoader.registerBlock(CopperStill);

 

ModLoader.addName(CopperMoving, "Copper");

ModLoader.addName(CopperStill, "Copper");

 

 

ModLoader.addShapelessRecipe(new ItemStack(BlastFurnace4), new Object[]{

Block.dirt

});

ModLoader.addShapelessRecipe(new ItemStack(Mold4), new Object[]{

Block.wood

.wood

});

       

 

 

 

 

 

        MinecraftForgeClient.preloadTexture("/BlastFurnaceSide.png");

        ModLoader.addRecipe(new ItemStack(Block.waterStill, 1), new Object []{

    " XX", "  ", "  ", Character.valueOf('X'), Block.dirt});

        ModLoader.addRecipe(new ItemStack(Item.bucketEmpty, 1), new Object []{

    " X ", "  ", "  ", Character.valueOf('X'), Block.dirt});

        ModLoader.addRecipe(new ItemStack(Copper, 1), new Object []{

    "  ", "  ", "XXX", Character.valueOf('X'), Block.dirt});

       

        ModLoader.addRecipe(new ItemStack(Tin, 1), new Object []{

    "  ", "XXX", "XXX", Character.valueOf('X'), Block.dirt});}

   

       

           

     

   

   

   

 

    public void generateSurface(World world, Random random, int i, int j)

    {

        for (int k = 0; k < 5; k++)

        {

            int l = i + random.nextInt(16);

            int i1 = random.nextInt(64);

            int j1 = j + random.nextInt(16);

            (new WorldGenMinable(Tin.blockID, 12)).generate(world, random, l, i1, j1);

        }

        for (int k = 0; k < 6; k++)

        {

            int l = i + random.nextInt(16);

            int i1 = random.nextInt(64);

            int j1 = j + random.nextInt(16);

            (new WorldGenMinable(Copper.blockID, 12)).generate(world, random, l, i1, j1);

        }

        for (int k = 0; k < 4; k++)

        {

            int l = i + random.nextInt(16);

            int i1 = random.nextInt(34);

            int j1 = j + random.nextInt(16);

            (new WorldGenMinable(Uranium.blockID, 8)).generate(world, random, l, i1, j1);

        }

        for (int k = 0; k < 4; k++)

        {

            int l = i + random.nextInt(16);

            int i1 = random.nextInt(34);

            int j1 = j + random.nextInt(16);

            (new WorldGenMinable(Silicone.blockID, 8)).generate(world, random, l, i1, j1); }

            }

   

   

   

   

   

  public String getVersion()

    {

        return "BKsparkie's Electricalage Mod v 0.25";

    }

 

 

@Override

public void load() {

 

}}

 

 

 

sorry my mod_Electricalage file is not all that neat

Posted

Along with the plethora of things in that code that makes my eyes want to bleed.

You should not be using addOverride.

But, as long as those files exist, they should work.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Ok I've fixed that and n my opinion the forge call is way better now using a sprite sheet :), my other question is what forge call do I use to name my blocks?

Thats a bug with FML (forge mod loader, comes with forge) should work with later builds.

you can still use ModLoader.addName(...) but it doesn't work atm

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.