• 0

    posted a message on In Game Smelting Help!!
    package net.minecraft.src; 
    
    import java.util.Random; 
    
    public class mod_ExtraCraftOres extends BaseMod 
    { 
    public mod_ExtraCraftOres() 
    { 
    ModLoader.AddName(uraniumOre, "Uranium Ore"); 
    ModLoader.AddName(uraniumIngot, "Uranium Ingot"); 
    ModLoader.RegisterBlock(uraniumOre); 
    uraniumIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/UraniumIngot.png"); 
    ModLoader.AddSmelting(uraniumOre.blockID, new ItemStack(uraniumIngot));
    ModLoader.AddName(copperOre, "Copper Ore"); 
    ModLoader.AddName(copperIngot, "Copper Ingot"); 
    ModLoader.RegisterBlock(copperOre); 
    copperIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/CopperIngot.png"); 
    ModLoader.AddSmelting(copperOre.blockID, new ItemStack(copperIngot));
    
    uraniumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/UraniumPickaxe.png");
    uraniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/UraniumAxe.png");
    uraniumSpade.iconIndex = ModLoader.addOverride("/gui/items.png", "/UraniumSpade.png");
    uraniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/UraniumSword.png");
    
    ModLoader.AddName(uraniumPickaxe, "Uranium Pickaxe");
    ModLoader.AddName(uraniumAxe, "Uranium Axe");
    ModLoader.AddName(uraniumSpade, "Uranium Spade");
    ModLoader.AddName(uraniumSword, "Uranium Sword");
    
    ModLoader.AddRecipe(new ItemStack(uraniumPickaxe, 1), new Object[]{
    "XXX", " I ", " I ", Character.valueOf('X'), uraniumIngot, Character.valueOf('I'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(uraniumAxe, 1), new Object[]{
    "XX ", "XI ", " I ", Character.valueOf('X'), uraniumIngot, Character.valueOf('I'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(uraniumSpade, 1), new Object[]{
    " X ", " I ", " I ", Character.valueOf('X'), uraniumIngot, Character.valueOf('I'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(uraniumSword, 1), new Object[]{
    " X ", " X ", " I ", Character.valueOf('X'), uraniumIngot, Character.valueOf('I'), Item.stick
    });
    
    }
    public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ) 
    { 
    for(int i = 0; i < 32; i++) 
    { 
    int randPosX = chunkX + rand.nextInt(16); 
    int randPosY = rand.nextInt(120); 
    int randPosZ = chunkZ + rand.nextInt(16); 
    (new WorldGenMinable(uraniumOre.blockID, 5)).generate(world, rand, randPosX , randPosY , randPosZ); 
    }
    for (int i=0; i < 32; i++)
    {
    int randPosX = chunkX + rand.nextInt(16);
    int randPosY = rand.nextInt(110);
    int randPosZ = chunkZ + rand.nextInt(16);
    (new WorldGenMinable(copperOre.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
    
    } 
    
    
    } 
    
    
    public static Block uraniumOre; 
    public static final Item uraniumIngot = (new Item(ModLoader.getUniqueEntityId())).setItemName("uraniumIngot"); 
    public static Block copperOre; 
    public static final Item copperIngot = (new Item(ModLoader.getUniqueEntityId())).setItemName("copperIngot");
    
    //You forgot to add final
    
    public static final Item uraniumPickaxe = new ItemPickaxe(3001, EnumToolMaterial.URANIUM).setItemName("uraniumPickaxe");
    public static final Item uraniumAxe = new ItemAxe(3002, EnumToolMaterial.URANIUM).setItemName("uraniumAxe");
    public static final Item uraniumSpade = new ItemSpade(3003, EnumToolMaterial.URANIUM).setItemName("uraniumSpade");
    public static final Item uraniumSword = new ItemSword(3004, EnumToolMaterial.URANIUM).setItemName("uraniumSword");
    
    static 
    { 
    
    uraniumOre = new BlockUranium(215, ModLoader.addOverride("/terrain.png", "/UraniumOre.png")).setHardness(3F).setResistance(2.5F).setBlockName("uraniumOre"); 
    copperOre = new BlockCopper(217, ModLoader.addOverride("/terrain.png", "/CopperOre.png")).setHardness(2F).setResistance(1.5F).setBlockName("copperOre");
    } 
    
    public String Version() 
    { 
    return "1.0.0"; 
    }
    @Override
    public String getVersion() {
    // TODO Auto-generated method stub
    return null;
    }
    @Override
    public void load() {
    // TODO Auto-generated method stub
    
    } 
    }
    Try that
    Posted in: Modification Development
  • 0

    posted a message on [1.2.5] Revolver Mod v1.10.1
    This is a really awesome mod :biggrin.gif:
    Posted in: Minecraft Mods
  • 0

    posted a message on Help rendering a thrown entity with modloader
    You need to add this to your mod_ file:
    public void AddRenderer(Map map) 
        { 
               map.put(net.minecraft.src.EntityYourThrowable.class, new RenderYourThrowable(mod_YourMod.YourThrowable.getIconFromDamage(0))); 
        } 
    Posted in: Modification Development
  • 1

    posted a message on [SOLVED]Explosion Help
    Hello, I am making a grenade that when it explodes creates heaps of fire around the are where it exploded. I didn't know whether to make a new explosion type or whether there was a way to check if the Item exploded and making it then create fire. All help is apreciated :biggrin.gif:

    Thanx in advance,
    -KMeister

    Edit: SOLVED!!
    Posted in: Modification Development
  • 0

    posted a message on overrides net.minecraft.src.BaseMod.GenerateSurface
    Use this for generating ores:
    package net.minecraft.src;
    
    import java.util.Random;
    
    public class mod_RedOre extends BaseMod                
    {
            public static final Block RedOre = new BlockRedOre(139, 0).setHardness(2 .5F).setResistance(5.0F).setBlockName ("RedOre")                    
            public static final Item RedCrystal = new ItemRedCrystal(140).setItemName("RedCrystal");                        
            
            public int vein = 20;
            public int tries = 10;
    
            public mod_RedOre()
            {
                   
                    ModLoader.RegisterBlock(RedOre);                    
                    RedOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/redore.png");                      
                    RedCrystal.iconIndex = ModLoader.addOverride("/gui/items.png", "/redcrystal.png");                     
                    ModLoader.AddName(RedOre, "Red Ore");               
                    ModLoader.AddName(RedCrystal, "Red Crystal");           
            }
            
            public void GenerateSurface(World world, Random random, int chunkX, int chunkZ) //error that sucks
            {
                for (int i = 0; i < tries; i++)
                {
                        posX = chunkX + random.nextInt(16);
                        posY = random.nextInt(30);                  
                        posZ = chunkZ + random.nextInt(16);
                        (new WorldGenMinable(RedOre.blockID, vein)).generate(world, random, posX, posY, posZ);              
                }
            }
       
            public void load()
            {
                                     
            }
            
            public String getVersion()
            {
                    return "0.1";                 
            }
    } 
    And you needed to add the public void load and change the String Version to get Version
    Posted in: Modification Development
  • 0

    posted a message on Help with Mod
    Your slashes were backwards:
    kebab.iconIndex = ModLoader.addOverride("/gui/items.png", "/item/kebab.png");
    Posted in: Modification Development
  • 0

    posted a message on Help with Mod
    this should now work
    package net.minecraft.src;
    
    public class mod_kebab extends BaseMod
    {
    public static Item kebab;
    
    public String getVersion()
    {
    return "1.0.0";
    }
    
    public mod_kebab()
    {
    
    kebab.iconIndex = ModLoader.addOverride("/gui/items.png", "minecraft.jar\item\kebab.png");
    
    ModLoader.AddName(kebab, "kebab");
    }
    
    static
    {
    new ItemFood(1000, 10, true).setItemName("1");
    }
    public void load() 
    {
    }
    }
    Posted in: Modification Development
  • 0

    posted a message on First Mod Experimentation
    i think this is used for redstone wires:
    public boolean isIndirectlyPoweringTo(World world, int i, int j, int k, int l)
        {
            if(!wiresProvidePower)
            {
                return false;
            } else
            {
                return isPoweringTo(world, i, j, k, l);
            }
        }
    
        public boolean isPoweringTo(IBlockAccess iblockaccess, int i, int j, int k, int l)
        {
            if(!wiresProvidePower)
            {
                return false;
            }
            if(iblockaccess.getBlockMetadata(i, j, k) == 0)
            {
                return false;
            }
            if(l == 1)
            {
                return true;
            }
            boolean flag = func_41053_d(iblockaccess, i - 1, j, k, 1) || !iblockaccess.isBlockNormalCube(i - 1, j, k) && func_41053_d(iblockaccess, i - 1, j - 1, k, -1);
            boolean flag1 = func_41053_d(iblockaccess, i + 1, j, k, 3) || !iblockaccess.isBlockNormalCube(i + 1, j, k) && func_41053_d(iblockaccess, i + 1, j - 1, k, -1);
            boolean flag2 = func_41053_d(iblockaccess, i, j, k - 1, 2) || !iblockaccess.isBlockNormalCube(i, j, k - 1) && func_41053_d(iblockaccess, i, j - 1, k - 1, -1);
            boolean flag3 = func_41053_d(iblockaccess, i, j, k + 1, 0) || !iblockaccess.isBlockNormalCube(i, j, k + 1) && func_41053_d(iblockaccess, i, j - 1, k + 1, -1);
            if(!iblockaccess.isBlockNormalCube(i, j + 1, k))
            {
                if(iblockaccess.isBlockNormalCube(i - 1, j, k) && func_41053_d(iblockaccess, i - 1, j + 1, k, -1))
                {
                    flag = true;
                }
                if(iblockaccess.isBlockNormalCube(i + 1, j, k) && func_41053_d(iblockaccess, i + 1, j + 1, k, -1))
                {
                    flag1 = true;
                }
                if(iblockaccess.isBlockNormalCube(i, j, k - 1) && func_41053_d(iblockaccess, i, j + 1, k - 1, -1))
                {
                    flag2 = true;
                }
                if(iblockaccess.isBlockNormalCube(i, j, k + 1) && func_41053_d(iblockaccess, i, j + 1, k + 1, -1))
                {
                    flag3 = true;
                }
            }
            if(!flag2 && !flag1 && !flag && !flag3 && l >= 2 && l <= 5)
            {
                return true;
            }
            if(l == 2 && flag2 && !flag && !flag1)
            {
                return true;
            }
            if(l == 3 && flag3 && !flag && !flag1)
            {
                return true;
            }
            if(l == 4 && flag && !flag2 && !flag3)
            {
                return true;
            }
            return l == 5 && flag1 && !flag2 && !flag3;
        }
    
        public boolean canProvidePower()
        {
            return wiresProvidePower;
        }
    Posted in: Modification Development
  • 0

    posted a message on Creating A New Block (Questions)
    you make a folder named mod and then an image named HayTop.png and when your done you place this in your minecraft.jar
    Posted in: Modification Development
  • 0

    posted a message on Spawnig mob trouble, please help!!!
    I don't know my mobs spawn but I don't have strange hight restricting codes and stuff
    Posted in: Modification Development
  • 0

    posted a message on Spawnig mob trouble, please help!!!
    I'm really not sure what that float is for, but the numbers in the add spawn bit (4, 5, 6,) are for changing the minimum, average, and maximum amount of this mob that will spawn in a chunk
    Posted in: Modification Development
  • 0

    posted a message on [REQUEST] The Legend of Zelda Mod
    This goes in Request/Ideas section
    Posted in: Modification Development
  • 0

    posted a message on Spawnig mob trouble, please help!!!
    you NEED to add these to you mod_ file:
    //Inside the constructor
            { 
            ModLoader.RegisterEntityID(EntityBlueSlime.class, "BlueSlime", ModLoader.getUniqueEntityId()); 
            ModLoader.AddSpawn(EntityBlueSlime.class, 4, 5, 6, EnumCreatureType.monster);
            }  

    //Outside the constructor
        public void AddRenderer(Map map) 
        { 
            map.put(EntityBluSlime.class, new RenderBlueSlime(new ModelBlueSlime(), 0.5F)); 
        } 

    Its this that actually tells the game to spawn your mob and to render it correctly
    Posted in: Modification Development
  • 0

    posted a message on First Mod Experimentation
    That is really awesome. I'm glad I could help :biggrin.gif:

    PS: Let me know when you release it i would love to make a puzzle map with this
    Posted in: Modification Development
  • To post a comment, please .