• 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from Conroe_Jr

    if your talking about the Actual names of the files, its RenderRottwieler and Rottwieler.java
    from the file i exported from Techne

    So Rottwieler.java is the model file? (exported from Techne)

    If so, then the line should be:
    new RenderRottwieler(new Rottwieler(), 0.4F));



    In the future i'd suggest conforming to what Notch has done and naming the model file as ModelAnimalNameHere.java Plus it keeps things organized and easier to find.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from Muserae

    So I'd just delete super.render(f, f1, f2, f3, f4, f5); from the model code?


    I'd say take out the rendering of the head/body/legs and leave the super call in there. Personally I don't think it will change anything though since you are extending ModelBase, not ModelQuadruped. But you can give it a try and see what happens.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from BoomerTank

    Is there a way to get a mob to only spawn on a specific type of blocks, say I want it to only spawn in trees, would the getBlockId(int x, int y, int z) method in the world class be the one that could help in this.


    Yes, check out the method getCanSpawnHere() in EntityAnimal for a good example. It makes it so animals can only spawn on grass blocks with enough light.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from maxvolt0

    Can some one please help me i have been trying to make a mob all week i follow every part of the tutorial please help here is my java files

    Render file
    package net.minecraft.src;

    import org.lwjgl.opengl.GL11;


    // Referenced classes of package net.minecraft.src:
    // RenderLiving, JWorld_EntityExample, ModelBase, EntityLiving,
    // Entity

    public class JWorld_AnibusRender extends RenderLiving

    {

    public JWorld_AnibusRender(JWorld_AnibusModel modelbase, float f)
    {
    super(modelbase, f);
    }

    public void func_177_a(JWorld_AnibusEntity entity, double d, double d1, double d2,
    float f, float f1)
    {
    super.doRenderLiving(entity, d, d1, d2, f, f1);
    }

    public void doRenderLiving(EntityLiving entityliving, double d, double d1, double d2,
    float f, float f1)
    {
    super.doRenderLiving((JWorld_AnibusEntity) entityliving, d, d1, d2, f, f1);
    }

    public void doRender(Entity entity, double d, double d1, double d2,
    float f, float f1)
    {
    doRenderLiving((JWorld_AnibusEntity)entity, d, d1, d2, f, f1);
    }

    //attempting to scale

    protected void preRenderScale(JWorld_AnibusEntity entity, float f)
    {
    GL11.glScalef(1.25F, 1.25F, 1.25F);
    }

    protected void preRenderCallback(EntityLiving entityliving, float f)
    {
    preRenderScale((JWorld_AnibusEntity)entityliving, f);
    }
    }

    Entity file
    package net.minecraft.src;

    public class JWorld_AnibusEntity extends EntityAnimal
    {
    public JWorld_AnibusEntity(World world)
    {
    super(world);
    texture = "/mob/anibus.png";
    setSize(0.9F,1.3F);
    moveSpeed = 0.75F;
    //yOffset *= 6F;
    health = 25;



    }
    public void writeEntityToNBT(NBTTagCompound nbttagcompound)
    {
    super.writeEntityToNBT(nbttagcompound);
    }

    public void readEntityFromNBT(NBTTagCompound nbttagcompound)
    {
    super.readEntityFromNBT(nbttagcompound);
    }

    protected String getLivingSound()
    {
    return "mob.cow";
    }

    protected String getHurtSound()
    {
    return "mob.cow";
    }

    protected String getDeathSound()
    {
    return "mob.cow";
    }

    protected float getSoundVolume()
    {
    return 0.4F;
    }

    protected int getDropItemId()
    {
    return 0;
    }

    public boolean interact(EntityPlayer entityplayer)
    {
    //can use this for right click reactions
    return false;
    }
    }

    Mod file
    package net.minecraft.src;

    import java.util.Map;

    public class mod_Anibus extends BaseMod
    {
    public void JWorldAddMobs(
    )
    {

    ModLoader.RegisterEntityID(JWorld_AnibusEntity.class, "Anibus", ModLoader.getUniqueEntityId());


    ModLoader.AddSpawn(JWorld_AnibusEntity.class, 100, EnumCreatureType.creature);
    }


    public void AddRenderer(Map map)
    {
    map.put(JWorld_AnibusEntity.class, new JWorld_AnibusRender(new JWorld_AnibusModel(), 0.5F));
    }
    public String Version()
    {
    return "1.7_3";
    }



    In the mod file try changing:
    public void JWorldAddMobs

    To:
    public mod_Anibus
    Posted in: Tutorials
  • 0

    posted a message on Simple Mod Help

    I am trying to make a Gui very similar the achievmnet one in the game i have 39 errors and i will solve them one by one but i need help on this one

    src\minecraft\net\minecraft\src\GuiMission.java:6:cannot find symbol
    symbol: class Minecraft
    location; class net.minecraft.src.GuiMission
    public GuiMission(Minecraft minecraft)

    i see the same code in the achievmnet Gui help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    0



    Without seeing the code, do you have this line at the top?

    import net.minecraft.client.Minecraft;


    To reference the class Minecraft you need to import the package that its in (since it is separate from the net.minecraft.src package).
    Posted in: Mods Discussion
  • 0

    posted a message on Simple Mod Help
    Quote from playwhat

    CODE:
    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_MCxpansion extends BaseMod
    {
    	public static final Block TitaniumOre = new BlockOre(97, 0).setHardness(3F).setResistance(5.0F).setBlockName("OreTitanium");	
    	public static final Block LitriniumOre = new BlockOre(98, 0).setHardness(3F).setResistance(5.0F).setBlockName("OreLitrinium");
    	public static final Block UraniumOre = new BlockOre(99, 0).setHardness(3F).setResistance(5.0F).setBlockName("OreUranium");	
    	public static final Block BronzeOre = new BlockOre(100, 0).setHardness(3F).setResistance(5.0F).setBlockName("OreBronze");	
    	public static final Item TitaniumIgnot = (new Item(104)).setIconCoord(0, 0).setItemName("ingotTitanium");
    	public static final Item LitriniumIgnot = (new Item(105)).setIconCoord(0, 0).setItemName("ingotLitrinium");
    	public static final Item UraniumIgnot = (new Item(106)).setIconCoord(0, 0).setItemName("ingotUranium");
    	public static final Item BronzeIgnot = (new Item(107)).setIconCoord(0, 0).setItemName("ingotBronze");
    	public static final Item TitaniumPick = (new ItemPickaxe(108, EnumToolMaterial.TITANIUM)).setIconCoord(0, 0).setItemName("pickaxeTITANIUM");
    	public static final Item TitaniumShovel = new ItemSpade(109, EnumToolMaterial.TITANIUM).setItemName("titaniumShovel");
    	public static final Item TitaniumAxe = new ItemAxe(110, EnumToolMaterial.TITANIUM).setItemName("titaniumAxe");
    	public static final Item TitaniumHoe = new ItemHoe(111, EnumToolMaterial.TITANIUM).setItemName("titaniumHoe");
    	public static final Item TitaniumSword = new ItemSword(112, EnumToolMaterial.TITANIUM).setItemName("titaniumSword");
    	public static final Item LitriniumPick = (new ItemPickaxe(113, EnumToolMaterial.LITRINIUM)).setIconCoord(0, 0).setItemName("pickaxeLITRINIUM");
    	public static final Item LitriniumShovel = new ItemSpade(114, EnumToolMaterial.LITRINIUM).setItemName("litriniumShovel");
    	public static final Item LitriniumAxe = new ItemAxe(115, EnumToolMaterial.LITRINIUM).setItemName("litriniumAxe");
    	public static final Item LitriniumHoe = new ItemHoe(116, EnumToolMaterial.LITRINIUM).setItemName("litriniumHoe");
    	public static final Item LitriniumSword = new ItemSword(117, EnumToolMaterial.LITRINIUM).setItemName("litriniumSword");
    	public static final Item BronzePick = (new ItemPickaxe(118, EnumToolMaterial.BRONZE)).setIconCoord(0, 0).setItemName("pickaxeBRONZE");
    	public static final Item BronzeShovel = new ItemSpade(119, EnumToolMaterial.BRONZE).setItemName("bronzeShovel");
    	public static final Item BronzeAxe = new ItemAxe(120, EnumToolMaterial.BRONZE).setItemName("bronzeAxe");
    	public static final Item BronzeHoe = new ItemHoe(121, EnumToolMaterial.BRONZE).setItemName("bronzeHoe");
    	public static final Item BronzeSword = new ItemSword(122, EnumToolMaterial.BRONZE).setItemName("bronzeSword");
    		
    	public mod_MCxpansion()
    		{
    			ModLoader.RegisterBlock(TitaniumOre);
    			ModLoader.RegisterBlock(LitriniumOre);
    			ModLoader.RegisterBlock(UraniumOre);
    			ModLoader.RegisterBlock(BronzeOre);
    			
    			TitaniumOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MCxpansion/TitaniumOre.png");
    			LitriniumOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MCxpansion/LitriniumOre.png");
    			UraniumOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MCxpansion/UraniumOre.png");
    			BronzeOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MCxpansion/BronzeOre.png");
    			TitaniumIgnot.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/3.png");
    			LitriniumIgnot.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/1.png");
    			UraniumIgnot.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/4.png");
    			BronzeIgnot.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/2.png");
    			TitaniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/TitaniumShovel.png");
    			TitaniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/TitaniumAxe.png");
    			TitaniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/TitaniumHoe.png");
    			TitaniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/TitaniumSword.png");
    			LitriniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/LitriniumShovel.png");
    			LitriniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/LitriniumAxe.png");
    			LitriniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/LitriniumHoe.png");
    			LitriniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/LitriniumSword.png");
    			BronzeShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/BronzeShovel.png");
    			BronzeAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/BronzeAxe.png");
    			BronzeHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/BronzeHoe.png");
    			BronzeSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/BronzeSword.png");
    			TitaniumPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/TitaniumPickaxe.png");
    			LitriniumPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/LitriniumPickaxe.png");
    			BronzePick.iconIndex = ModLoader.addOverride("/gui/items.png", "/MCxpansion/BronzePickaxe.png");
    			
    			ModLoader.AddName(TitaniumOre, "Titanium ore");
    			ModLoader.AddName(LitriniumOre, "Litrinium ore");
    			ModLoader.AddName(UraniumOre, "Uranium ore");
    			ModLoader.AddName(BronzeOre, "Bronze ore");
    			ModLoader.AddName(TitaniumIgnot, "Titanium ingot");
    			ModLoader.AddName(LitriniumIgnot, "Litrinium ingot");
    			ModLoader.AddName(UraniumIgnot, "Uranium ingot");
    			ModLoader.AddName(BronzeIgnot, "Bronze ingot");
    			ModLoader.AddName(TitaniumPick, "Titanium pickaxe");
    			ModLoader.AddName(TitaniumShovel, "Titanium shovel");
    			ModLoader.AddName(TitaniumAxe, "Titanium axe");
    			ModLoader.AddName(TitaniumHoe, "Titanium hoe");
    			ModLoader.AddName(TitaniumSword, "Titanium sword");
    			ModLoader.AddName(LitriniumPick, "Litrinium pickaxe");
    			ModLoader.AddName(LitriniumShovel, "Litrinium shovel");
    			ModLoader.AddName(LitriniumAxe, "Litrinium axe");
    			ModLoader.AddName(LitriniumHoe, "Litrinium hoe");
    			ModLoader.AddName(LitriniumSword, "Litrinium sword");
    			ModLoader.AddName(BronzePick, "Bronze pickaxe");
    			ModLoader.AddName(BronzeShovel, "Bronze shovel");
    			ModLoader.AddName(BronzeAxe, "Bronze axe");
    			ModLoader.AddName(BronzeHoe, "Bronze hoe");
    			ModLoader.AddName(BronzeSword, "Bronze sword");
    			
    			ModLoader.AddSmelting(TitaniumOre.blockID, new ItemStack(TitaniumIgnot, 1));
    			ModLoader.AddSmelting(LitriniumOre.blockID, new ItemStack(LitriniumIgnot, 1));
    			ModLoader.AddSmelting(UraniumOre.blockID, new ItemStack(UraniumIgnot, 1));
    			ModLoader.AddSmelting(BronzeOre.blockID, new ItemStack(BronzeIgnot, 1));
    			ModLoader.AddRecipe(new ItemStack(TitaniumPick, 1), new Object[]{
                "###", " X ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.TitaniumIgnot,});
    			ModLoader.AddRecipe(new ItemStack(TitaniumShovel, 1), new Object[]{
                " # ", " X ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.TitaniumIgnot,});
    			ModLoader.AddRecipe(new ItemStack(TitaniumAxe, 1), new Object[]{
                "## ", "#X ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.TitaniumIgnot,});
    			ModLoader.AddRecipe(new ItemStack(TitaniumHoe, 1), new Object[]{
                "## ", " X ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.TitaniumIgnot,});
    			ModLoader.AddRecipe(new ItemStack(TitaniumSword, 1), new Object[]{
                " # ", " # ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.TitaniumIgnot,});
    			ModLoader.AddRecipe(new ItemStack(LitriniumPick, 1), new Object[]{
                "###", " X ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.LitriniumIgnot,});
    			ModLoader.AddRecipe(new ItemStack(LitriniumShovel, 1), new Object[]{
                " # ", " X ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.LitriniumIgnot,});
    			ModLoader.AddRecipe(new ItemStack(LitriniumAxe, 1), new Object[]{
                "## ", "#X ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.LitriniumIgnot,});
    			ModLoader.AddRecipe(new ItemStack(LitriniumHoe, 1), new Object[]{
                "## ", " X ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.LitriniumIgnot,});
    			ModLoader.AddRecipe(new ItemStack(LitriniumSword, 1), new Object[]{
                " # ", " # ", " X ", Character.valueOf('X'), Item.stick, Character.valueOf('#'), mod_MCxpansion.LitriniumIgnot,});
    	}		
    	
    	public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
        {
            for(int i = 0; i < 80; i++)
            {
                int randPosX = chunkX + rand.nextInt(16);
                int randPosY = rand.nextInt(54);
                int randPosZ = chunkZ + rand.nextInt(16);
                (new WorldGenMinable(mod_MCxpansion.TitaniumOre.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
            }
            for(int i = 0; i < 65; i++)
            {
                int randPosX = chunkX + rand.nextInt(16);
                int randPosY = rand.nextInt(35);
                int randPosZ = chunkZ + rand.nextInt(16);
                (new WorldGenMinable(mod_MCxpansion.LitriniumOre.blockID, 2)).generate(world, rand, randPosX, randPosY, randPosZ);
            }
    		for(int i = 0; i < 30; i++)
            {
                int randPosX = chunkX + rand.nextInt(16);
                int randPosY = rand.nextInt(15);
                int randPosZ = chunkZ + rand.nextInt(16);
                (new WorldGenMinable(mod_MCxpansion.UraniumOre.blockID, 2)).generate(world, rand, randPosX, randPosY, randPosZ);
            }
    		for(int i = 0; i < 120; i++)
            {
                int randPosX = chunkX + rand.nextInt(16);
                int randPosY = rand.nextInt(128);
                int randPosZ = chunkZ + rand.nextInt(16);
                (new WorldGenMinable(mod_MCxpansion.BronzeOre.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ);
            }
        }
    	
    		public String Version()
            {
                    return "1.7_03";
            }
    }
    	
    ItemPickaxe:
    // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3) braces deadcode 
    
    package net.minecraft.src;
    
    
    // Referenced classes of package net.minecraft.src:
    //            ItemTool, Block, EnumToolMaterial, Material
    
    public class ItemPickaxe extends ItemTool
    {
    
        protected ItemPickaxe(int i, EnumToolMaterial enumtoolmaterial)
        {
            super(i, 2, enumtoolmaterial, blocksEffectiveAgainst);
        }
    
        public boolean canHarvestBlock(Block block)
        {
            if(block == Block.obsidian)
            {
                return toolMaterial.getHarvestLevel() == 3;
            }
            if(block == Block.blockDiamond || block == Block.oreDiamond)
            {
                return toolMaterial.getHarvestLevel() >= 2;
            }
            if(block == Block.blockGold || block == Block.oreGold)
            {
                return toolMaterial.getHarvestLevel() >= 2;
            }
    		  if(block == mod_MCxpansion.TitaniumOre)
            {
                return toolMaterial.getHarvestLevel() >= 1;
            }
    		  if(block == mod_MCxpansion.UraniumOre)
            {
                return toolMaterial.getHarvestLevel() >= 2;
            }
    		  if(block == mod_MCxpansion.BronzeOre)
            {
                return toolMaterial.getHarvestLevel() >= 0;
            }
    		  if(block == mod_MCxpansion.LitriniumOre)
            {
                return toolMaterial.getHarvestLevel() >= 2;
            }
            if(block == Block.blockSteel || block == Block.oreIron)
            {
                return toolMaterial.getHarvestLevel() >= 1;
            }
            if(block == Block.blockLapis || block == Block.oreLapis)
            {
                return toolMaterial.getHarvestLevel() >= 1;
            }
            if(block == Block.oreRedstone || block == Block.oreRedstoneGlowing)
            {
                return toolMaterial.getHarvestLevel() >= 2;
            }
            if(block.blockMaterial == Material.rock)
            {
                return true;
            }
            return block.blockMaterial == Material.iron;
        }
    
        private static Block blocksEffectiveAgainst[];
    
        static 
        {
            blocksEffectiveAgainst = (new Block[] {
                Block.cobblestone, Block.stairDouble, Block.stairSingle, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold, 
                Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, mod_MCxpansion.TitaniumOre, mod_MCxpansion.LitriniumOre,
    			mod_MCxpansion.UraniumOre, mod_MCxpansion.BronzeOre
            });
        }
    }
    EnumToolMaterial:
    // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3) braces deadcode 
    
    package net.minecraft.src;
    
    
    public enum EnumToolMaterial
    {
        WOOD("WOOD", 0, 0, 59, 2.0F, 0),
        STONE("STONE", 1, 1, 131, 4F, 1),
        IRON("IRON", 2, 2, 250, 6F, 2),
        EMERALD("EMERALD", 3, 3, 1561, 8F, 3),
        GOLD("GOLD", 4, 0, 32, 12F, 0),
    	TITANIUM("TITANIUM",2, 2, 500, 6F, 2),
    	LITRINIUM("LITRINIUM",3, 3, 500, 7F, 2),
    	BRONZE("BRONZE",1, 2, 250, 4F, 1),
    	OBSIDIAN("OBSIDIAN",2, 2, 10000, 6F, 2);
    /*
        public static EnumToolMaterial[] values()
        {
            return (EnumToolMaterial[])field_21209_j.clone();
        }
    
        public static EnumToolMaterial valueOf(String s)
        {
            return (EnumToolMaterial)Enum.valueOf(net.minecraft.src.EnumToolMaterial.class, s);
        }
    */
        private EnumToolMaterial(String s, int i, int j, int k, float f, int l)
        {
    //        super(s, i);
            harvestLevel = j;
            maxUses = k;
            efficiencyOnProperMaterial = f;
            damageVsEntity = l;
        }
    
        public int getMaxUses()
        {
            return maxUses;
        }
    
        public float getEfficiencyOnProperMaterial()
        {
            return efficiencyOnProperMaterial;
        }
    
        public int getDamageVsEntity()
        {
            return damageVsEntity;
        }
    
        public int getHarvestLevel()
        {
            return harvestLevel;
        }
    /*
        public static final EnumToolMaterial WOOD;
        public static final EnumToolMaterial STONE;
        public static final EnumToolMaterial IRON;
        public static final EnumToolMaterial EMERALD;
        public static final EnumToolMaterial GOLD;
    	public static final EnumToolMaterial TITANIUM;
    	public static final EnumToolMaterial LITRINIUM;
    	public static final EnumToolMaterial BRONZE;
    	public static final EnumToolMaterial OBSIDIAN;
    */
        private final int harvestLevel;
        private final int maxUses;
        private final float efficiencyOnProperMaterial;
        private final int damageVsEntity;
        private static final EnumToolMaterial field_21209_j[]; /* synthetic field */
    
        static 
        {
    /*
            WOOD = new EnumToolMaterial("WOOD", 0, 0, 59, 2.0F, 0);
            STONE = new EnumToolMaterial("STONE", 1, 1, 131, 4F, 1);
            IRON = new EnumToolMaterial("IRON", 2, 2, 250, 6F, 2);
            EMERALD = new EnumToolMaterial("EMERALD", 3, 3, 1561, 8F, 3);
            GOLD = new EnumToolMaterial("GOLD", 4, 0, 32, 12F, 0);
    		TITANIUM = new EnumToolMaterial("TITANIUM",2, 2, 500, 6F, 2);
    		LITRINIUM = new EnumToolMaterial("LITRINIUM",3, 3, 500, 7F, 2);
    		BRONZE = new EnumToolMaterial("BRONZE",1, 2, 250, 4F, 1);
    		OBSIDIAN = new EnumToolMaterial("OBSIDIAN",2, 2, 10000, 6F, 2);
    */
            field_21209_j = (new EnumToolMaterial[] {
                WOOD, STONE, IRON, EMERALD, GOLD, TITANIUM, LITRINIUM, BRONZE, OBSIDIAN,
            });
        }
    }



    Your problem, I believe, is right here in EnumToolMaterial:
    TITANIUM("TITANIUM",2, 2, 500, 6F, 2),
            LITRINIUM("LITRINIUM",3, 3, 500, 7F, 2),
            BRONZE("BRONZE",1, 2, 250, 4F, 1),
            OBSIDIAN("OBSIDIAN",2, 2, 10000, 6F, 2);

    That first number (the number appearing after the name string) is the ID of that tool material. You set Titanium to 2, but that ID is already taken by Iron, you set Litrinium to 3 which is already taken by Emerald and so on. You need to give all four your new tool material types a UNIQUE ID.
    Posted in: Mods Discussion
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from ohai1

    Hi
    After I made some blocks,I wanted to try to create my own passive mod, but i get these five errors:
    src\minecraft\net\minecraft\src\Mod_Creature.java:1: class, interface, or enum expected
    public void Mod_Creature
    ^
    src\minecraft\net\minecraft\src\Mod_Creature.java:7: class, interface, or enum expected
    Modloader.AddSpawn(EntityCreature.java, 100, EnumCreatureType.creature);
    ^
    src\minecraft\net\minecraft\src\Mod_Creature.java:9: class, interface, or enum expected
    }
    ^
    src\minecraft\net\minecraft\src\Mod_Creature.java:11: class, interface, or enum expected
    public void AddRenderer(Map map)
    ^
    src\minecraft\net\minecraft\src\Mod_Creature.java:14: class, interface, or enum expected
    }
    ^




    I will help you figure out how to read these errors (so you can try to fix them on your own later on). Lets look at the very first compile error here:
    src\minecraft\net\minecraft\src\Mod_Creature.java:1: class, interface, or enum expected
    public void Mod_Creature

    First, it tells you which file the error is in. In this case Mod_Creature.java (which by the way will need to be changed to mod_Creature.java for it to be ModLoader compatible). After that you see the :1, this tells you which LINE in the code the error occurs. So now you have a very precise place to start looking for the error. Lastly, it gives a description of the error that occurs in Mod_Creature at line 1, in this case it says "class, interface, or enum expected". Obviously you don't have much coding experience but by simply looking others posted codes, you'll notice they begin with:
    public class mod_BlahBlah ...

    I am taking an educated guess and saying you are missing the word 'class' right there.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from PneumonicFungus

    Thanks, kill.
    To change what mob it spawns, do you just change this (IN THE GREEN)?
            EntityLiving entityliving = (EntityLiving)EntityList.createEntityInWorld("[THIS CODE HERE]", entityplayer.worldObj);

    for example, pig.


    yeah, just change that string to the designated name of another mob.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from Whiteheat

    Thank you for replaying
    I changed the code as you suggested, but still the name doesn't appear above the mobs head.
    This is where I changed the code :

    Should I change anything here or just leave it as it is?

    Thank you.



    Other than that original error, I don't know much about displaying text above a creature's head. But looking into the RenderPigman file, I believe that:
    renderLivingLabel(entity, entity.myName, d, d1, d2, 64);

    should look like:
    super.renderLivingLabel(entity, entity.myName, d, d1, d2, 64);

    Since you don't override it in the RenderPigman file, you need to tell the program where to look for the renderLivingLabel function, which is in the super class. If that doesn't fix it, i'm not sure what the problem is.

    Also, if that doesn't solve it, try just putting the string "Tom" into the string parameter of the renderLivingLabel call. If it still doesn't work, then there is something wrong with the way you are using that specific function.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from Whiteheat

    Sorry to be a bother maybe I'm not looking properly, but how would I check or how would I know if the text is null.

    Again sorry for bothering you with this, it might be just simple thing I'm over looking.



    The problem is that when you initialize your creature, you set an int randomly between 0 and 5 and then try to access your array mobName[] at that position. The array only has position 0, so when the int is set to anything above that you are going to get an ArrayOutOfBoundsException. Either add 5 more names to the mobName array (so that you can never go out of bounds), or take out the random int line and make
    myName = mobName[0]
    instead.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from inlanoche

    is that a right click action (it in your hand) or a right click on it on the ground. I though the question was about the latter.


    Its for when its held in your hand, I thought that was what it was asking about. If the question was referencing the other then I would agree, I don't think there is a way (built-in at least) to do it.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from turtleguy1

    great tutorials!!! but how would i make it so that when i right click a item it spawns my mob? i tried you blocks code went into the game right clicked the item and crash!! thanks


    You'll need to post the traceback (the error messages that appear when the game crashed) for anyone to be able to help in pinpointing the problem.


    Quote from inlanoche

    Can't help you there. I can make items, but never played around with the code yet. I didn't think you could right click on an item...


    Yes, you definitely can. Item.java has a function called OnItemRightClick(). I've used it to create an umbrella that lets you gracefully float to the ground.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from Cheddar97

    Ok fixed the pig problem but I'm not sure on how to change the hitbox size to his whole body or give him walk animations! Help?



    For animations, look back a few posts as it was mentioned. Look in ModelBiped class (or ModelQuadruped if its 4-legged) to see how leg/arm/head animations are setup. They all go into the setRotationAngles method.

    Hitbox size can be changed by making this call inside the creatures constructor function:
    setSize(newWidth, newHeight);

    Despite looking like it may change the creature's actual width and height, it does not as I found out. Only changes the hitbox size.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from JerasDarK

    Thanks a lot! You saved me a lot of time!
    But now I get another error that gets spammed alot:

    java.lang.NoSuchMethodException: net.minecraft.src.ModelSuperMeatboy.<init>(net.minecraft.src.World)
    	at java.lang.Class.getConstructor0(Unknown Source)
    	at java.lang.Class.getConstructor(Unknown Source)
    	at net.minecraft.src.SpawnerAnimals.performSpawning(SpawnerAnimals.java:139)
    	at net.minecraft.src.World.tick(World.java:2033)
    	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1192)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:480)
    	at java.lang.Thread.run(Unknown Source)




    Found it, you have another mistake in your mod_Meatboy file. The line:
    ModLoader.AddSpawn(net.minecraft.src.ModelSuperMeatboy.class, 20, EnumCreatureType.creature);


    Should be:
    ModLoader.AddSpawn(net.minecraft.src.EntitySuperMeatboy.class, 20, EnumCreatureType.creature);


    But another thing, all the spots where you have net.minecraft.src.__FileName__ can be changed to leave out the net.minecraft.src part. This is because your mod_Meatboy file is in the same package (aka directory) as all the other net.minecraft.src files. You can tell that it is in the same package by looking at the very top of your mod_Meatboy file.

    Anyways, so the line I changed could like this:
    ModLoader.AddSpawn(EntitySuperMeatboy.class, 20, EnumCreatureType.creature);


    You don't HAVE to delete the net.minecraft.src from in front, it will work either way, its all preference. Just letting you know its not necessary.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from dementor561

    I have been modding for a long time but when I recompile my mod it says Map doesnt exist? I have everything like yours except different names and model(I think you can help me without seing my source code aka i dont wanna make it public)



    Might as well get the simplest question answered first, do you have this line somewhere at the top of your file?
    import java.util.Map;
    Posted in: Tutorials
  • To post a comment, please .