• 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Quote from Paradox1123 »

    Quote from IrunoHatake »
    Quote from IrunoHatake »
    snip


    Okay, thanks for the explanation. Anyways, it says you have no return statement. Add a "Return true" statement somewhere and you should be good. See, the problem is that you made a boolean out of your world. So, you need to set it as true or false.


    I'm not getting any compile time errors so i'm not exactly sure what you mean. Their really needs to be a more in depth modloader guide.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Quote from Paradox1123 »
    Quote from IrunoHatake »
    I think there should be a brief tut on reading compile error messages as some people cannot understand them, and if I were to guess, its because they have no programming knowledge. Also, I'm still getting the same problem I posted near the top of this page if anyone would like to take a look at it. It has to do with two blocks not being put into the game which in turn causes a crash when I try to use a recipe to create it. I'm probably just overlooking something as I just starting learning java a day or two ago. Been trying to figure it out over two days now, so thanks if you decide to check whats wrong.


    What are you using to make mods? Because if you're just going off notepade, you need to make a statement in the blocks class that you have a new block set up. But I noticed you extended your class to a class called Basemod. Can you share the code in there that talks about your mod? Also,w hat exactly are you using that for? I see a lot of people using that class, but it's not a class that comes with the original source code.


    I can make the blocks and stuff the way your talking about, but i'm trying to make it for modloader so it can run with other mods. Basemod is part of modloader, and your seeing it around because part of this modding tut is getting your mod to work with modloader. With modloader you don't need to edit the other files and stuff. I suggest reading the that part of the tut on it and checking out Risugami's modloader.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    I think there should be a brief tut on reading compile error messages as some people cannot understand them, and if I were to guess, its because they have no programming knowledge. Also, I'm still getting the same problem I posted near the top of this page if anyone would like to take a look at it. It has to do with two blocks not being put into the game which in turn causes a crash when I try to use a recipe to create it. I'm probably just overlooking something as I just starting learning java a day or two ago. Been trying to figure it out over two days now, so thanks if you decide to check whats wrong.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Quote from Ununquadium »
    Trying to create my own block with a recipe to create it, code as follows (I've double and tripple checked it for capitalization errors, and this code is taken dirrectly from the tutorial and put in as said):

    mod_MyMod.java
    package net.minecraft.src;
    
    import java.util.Random;
    
    public class mod_MyMod extends BaseMod
    {
    	public String Version()
    	{
    		return "1.2_02";
        }
        
        public static final Block example;
    
        static
        {
        	example = (new BlockExample(102, 1)).setHardness(1.5F).setStepSound(Block.soundStoneFootstep);
        }
        public void AddRecipes(CraftingManager recipes)
        {
        	recipes.addRecipe(new ItemStack(Block.example), new Object[] {
        			"#", Character.valueOf('#'), Block.dirt
        	});
        }
    
    }


    The code for BlockExample.java
    package net.minecraft.src;
    
    import java.util.Random;
    
    public class BlockExample extends Block
    {
        public BlockExample(int i, int j)
        {
            super(i, j, Material.rock);
        }
    
        public int idDropped(int i, Random random)
        {
            return 0;
        }
    }


    The error I get every single time I attempt recompiling the code:

    *** Minecraft Coder Pack Version 2.7 ***
    Compiling Minecraft
    sources\minecraft\net\minecraft\src\mod_MyMod.java:20: cannot find symbol
    symbol : variable example

    location: class net.minecraft.src.Block
    recipes.addRecipe(new ItemStack(Block.example), new Object[] {

    1 error
    Compiling Minecraft Start Class
    *** minecraft_server.jar was not found, skipping
    === MCP 2.7 recompile script finished ===
    Press any key to continue . . .

    The bolded portion seems to be unfixable, I've tried decompiling the jars with just Basemod.class and Modloader.class and recompiling, but I get the same error everytime.

    Fix tutorial please?


    I've only starting modding and stuff yesterday so I'm not totally sure, but I think you don't need the Block. in front of example in the recipe because Its inside of the mod, not Block. So try recipes.addRecipe(new ItemStack(example), new Object[] { instead. Idk though, sorry if i'm wrong.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Can someone please help, i've been trying to figure out whats wrong for over a day. My first problem is I cannot give my self the two blocks, blockEmerald and oreEmerald, using single player commands because I believe they aren't being put in to the game or w/e, and when I use the recipe to form the blockEmerald, Minecraft crashes, and I believe this is caused by the last problem. The only thing I know is work is the item, emerald. I don't know java that well so I really can't tell whats wrong. :tongue.gif:

    package net.minecraft.src;
    // 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 
    
    public class mod_Emeralds extends BaseMod {
    
        public String Version() {
            return "1.2_02";
        }
    
        public static final Item emerald = (new Item(125)).func_20010_a(12, 3).func_20011_a("Emerald");
        
        public static final Block oreEmerald;    
        public static final Block blockEmerald;
    
        static {
    
            oreEmerald = (new BlockOre(126, 38)).setHardness(3F).setResistance(5F).setStepSound(Block.soundStoneFootstep).func_20012_a("oreEmerald");
            blockEmerald = (new BlockOreBlock(127, 39)).setHardness(4F).setResistance(10F).setStepSound(Block.soundMetalFootstep).func_20012_a("blockEmerald");
        
        }
    
        public void AddRecipes(CraftingManager recipes) {
    
            recipes.addRecipe(new ItemStack(blockEmerald, 1), new Object[] {
                "###", "###", "###", Character.valueOf('#'), emerald
            });
    
            recipes.addRecipe(new ItemStack(emerald, 9), new Object[] {
                "#", Character.valueOf('#'), blockEmerald
            });
    
        }
    
    }
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Minecraft keeps crashing whenever I enter a recipe I made, but I believe its doing that because the block i'm trying to create with that recipe isn't being loaded or w/e. I'm almost sure of it because I can't give it to myself with the single player commands because it says the item wasn't found or w/e. This is my mod_ file for it, I'm giving the whole thing just in case i'm wrong. So look at the blocks themselves before the recipes. The only thing that I can give myself and is working is the item, the two blocks are not.

    package net.minecraft.src;
    // 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 
    
    public class mod_Emeralds extends BaseMod
    {
    
        public String Version()
        {
            return "1.2_02";
        }
    
        public static final Item emerald = (new Item(99)).func_20010_a(12, 3).func_20011_a("Emerald");
    
        public static final Block oreEmerald;
        public static final Block blockEmerald;
        
        static
        {
            oreEmerald = (new BlockOre(100, 38)).setHardness(3F).setResistance(5F).setStepSound(Block.soundStoneFootstep).func_20012_a("oreEmerald");
            blockEmerald = (new BlockOreBlock(101, 39)).setHardness(4F).setResistance(10F).setStepSound(Block.soundMetalFootstep).func_20012_a("blockEmerald");
        }
    
        public void AddRecipes(CraftingManager recipes)
        {
            recipes.addRecipe(new ItemStack(blockEmerald, 1), new Object[] {
                "###", "###", "###", Character.valueOf('#'), emerald
            });
            recipes.addRecipe(new ItemStack(emerald, 9), new Object[] {
                "#", Character.valueOf('#'), blockEmerald
            });
        }
    
    }


    Quote from CaP0Ne »

    1 - Open minecraft.jar with Winrar
    2 - Go to lang
    3 - Copy en_US.lang to Desktop (or any other folder)
    4 - Open en_US.lang with Notepad
    5 - If you want to put a label in a block, scroll down until you see tile.stone.name=Stone and add a new line like
    tile.yourblockname.name=YourBlockName
    6 - If you want to put a label in a item, scroll down until you see item.shovelIron.name=Iron Shovel and add a new line like item.youritemname.name=YourItemName
    7 - PS: the name of your block and/or item is case sensitive (yourblockname is not the same as Yourblockname)
    8 - Save the file
    9 - Copy the file
    10 - Go to lang folder in Winrar again
    11 - Paste the file

    I was having problems with this sometime ago, hope this helps.

    EDIT:
    Remember to make backup of the file before you edit it.


    ^ And thanks for the help. : )
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    It feels stupid asking this because usually I can figure stuff out on my own for things like this, but, how would I set a block/items tag name thing for when you hover over it? I think for Items it has something to do with public Item func_20011_a(String s), and for blocks public Block func_20012_a(String s), but I had no clue what they mean because I don't exactly know java, but I do get this gist of some things because I do know another language.
    Posted in: Tutorials
  • 0

    posted a message on All wings check in.


    R3D standing by.
    Posted in: Forum Games
  • 0

    posted a message on The Last Poster Wins
    Quote from carpo »
    do i win :3


    Nope, I do. :3
    Posted in: Forum Games
  • 0

    posted a message on COUNT TO 100,000,000 FOR A WORLD RECORD!
    888
    Posted in: Forum Games
  • 0

    posted a message on Minecraft Beta fails to launch
    I had that problem before, now its closes out the same way but minus the notepad message thing after I redownloaded java. Classic works for me but this doesn't so idk.
    Posted in: Legacy Support
  • To post a comment, please .