• 0

    posted a message on Trouble adding a new item
    Thanks everyone for the help! I was just so blind :DDD Also, I needed to change the
    ModLoader.addRecipe(new ItemStack(sticksDiamond, 4), new Object[] {"   ", " D ", " D ", 'D', Item.diamond});

    To
    ModLoader.addRecipe(new ItemStack(sticksDiamond, 4), new Object[] {" D ", " D ", 'D', Item.diamond});


    But it's working now :) I can't post anymore after this, so if you guys wanna check it out, look on PMC. :) It's not up yet because I need to be level 2 to upload mods... My name is alefolgi123 so keep updated if you want! :P
    Posted in: Modification Development
  • 0

    posted a message on Trouble adding a new item
    Quote from jilliby

    Check the recipe for sticksDiamond. The third row has 4 spaces and should only have 3
    I think a couple of the others may also have too many spaces.


    I checked the other recipes, I can't see any more spaces, but I'm getting this error:
    	  Minecraft has crashed!	 
    	  ----------------------	 
    Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
    This error has been saved to C:\Users\Alex\Desktop\mcp\jars\.\crash-reports\crash-2012-08-15_13.50.11-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
    
    --- BEGIN ERROR REPORT 96fa05f --------
    Generated 8/15/12 1:50 PM
    - Minecraft Version: 1.3.1
    - Operating System: Windows 7 (amd64) version 6.1
    - Java Version: 1.7.0_05, Oracle Corporation
    - Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    - Memory: 955167424 bytes (910 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    - JVM Flags: 3 total; -Xincgc -Xms1024M -Xmx1024M
    - ModLoader: Mods loaded: 2
    ModLoader 1.3.1
    mod_spongeTools 1.1
    
    java.lang.StringIndexOutOfBoundsException: String index out of range: 8
    at java.lang.String.charAt(String.java:695)
    at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:185)
    at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:482)
    at net.minecraft.src.mod_spongeTools.load(mod_spongeTools.java:36)
    at net.minecraft.src.ModLoader.init(ModLoader.java:927)
    at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:161)
    at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
    at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:404)
    at net.minecraft.client.Minecraft.run(Minecraft.java:724)
    at java.lang.Thread.run(Thread.java:722)
    --- END ERROR REPORT eda85886 ----------


    Here's my code:
    package net.minecraft.src;
    public class mod_spongeTools extends BaseMod
    {
    public static final Item pickaxeSponge = (new ItemPickaxe(3020, EnumToolMaterial.SPONGE)).setItemName("pickaxeSponge");
    public static final Item axeSponge = (new ItemAxe(3021, EnumToolMaterial.SPONGE)).setItemName("axeSponge");
        public static final Item shovelSponge = (new ItemSpade(3022, EnumToolMaterial.SPONGE)).setItemName("shovelSponge");
        public static final Item swordSponge = (new ItemSword(3023, EnumToolMaterial.SPONGE)).setItemName("swordSponge");
        public static final Item hoeSponge = (new ItemHoe(3024, EnumToolMaterial.SPONGE)).setItemName("hoeSponge");
    public static  Item sticksDiamond = (new Item(3435).setItemName("sticksDiamond"));
    public static  Item craftSponge = (new Item(3073).setItemName("craftSponge"));
    
    public void load()
    {
     
      ModLoader.addName(pickaxeSponge, "Sponge Pickaxe");
      ModLoader.addName(axeSponge, "Sponge Axe");
      ModLoader.addName(shovelSponge, "Sponge Shovel");
      ModLoader.addName(swordSponge, "Sponge Sword");
      ModLoader.addName(hoeSponge, "Sponge Hoe");
      ModLoader.addName(sticksDiamond, "Diamond Sticks");
      ModLoader.addName(craftSponge, "Crafted Sponge");
     
     
      pickaxeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/pickaxesponge.png");
      axeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/axesponge.png");
      shovelSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/shovelsponge.png");
      swordSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/swordsponge.png");
      hoeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/hoesponge.png");
      sticksDiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sticksDiamond.png");
      craftSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sponge.png");
     
     
       ModLoader.addRecipe(new ItemStack(sticksDiamond, 4), new Object[] {"  ", " D ", " D ", 'D', Item.diamond});
       ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[] {"GGG", "GGG", "GGG", 'G', Block.glowStone});
       ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object[] {"SSS", " D ", " D ", 'D', sticksDiamond, 'S', craftSponge});
       ModLoader.addRecipe(new ItemStack(axeSponge, 1), new Object[] {"SS ", " SD ", " D ", 'D', sticksDiamond, 'S', craftSponge});
       ModLoader.addRecipe(new ItemStack(shovelSponge, 1), new Object[]{" S ", " D ", " D ", 'D', sticksDiamond, 'S', craftSponge});
       ModLoader.addRecipe(new ItemStack(swordSponge, 1), new Object[] {" S ", " S ", " D ", 'D', sticksDiamond, 'S', craftSponge });
       ModLoader.addRecipe(new ItemStack(hoeSponge, 1), new Object[] {"SS ", " D ", " D ", 'D', sticksDiamond, 'S', craftSponge });
      
    }
    
    
    
      public String getVersion()
        {
    	    return "1.1";
        }
    }
    Posted in: Modification Development
  • 0

    posted a message on Trouble adding a new item
    Quote from jilliby

    ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[] {"GGG", "GGG", "GGG" 'G', Block.glowStone});

    By the looks of things you are missing some commas in your code between "GGG" and 'G'
    Some of the other recipes are the same.


    Thanks! That has so close to fixed it! Now, it compiles, but when I start the client I get this error:

    	  Minecraft has crashed!	 
    	  ----------------------	 
    Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
    This error has been saved to C:\Users\Alex\Desktop\mcp\jars\.\crash-reports\crash-2012-08-15_13.25.55-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
    
    --- BEGIN ERROR REPORT bb5e7c37 --------
    Generated 8/15/12 1:25 PM
    - Minecraft Version: 1.3.1
    - Operating System: Windows 7 (amd64) version 6.1
    - Java Version: 1.7.0_05, Oracle Corporation
    - Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    - Memory: 955176552 bytes (910 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    - JVM Flags: 3 total; -Xincgc -Xms1024M -Xmx1024M
    - ModLoader: Mods loaded: 2
    ModLoader 1.3.1
    mod_spongeTools 1.1
    
    java.lang.StringIndexOutOfBoundsException: String index out of range: 9
    at java.lang.String.charAt(String.java:695)
    at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:185)
    at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:482)
    at net.minecraft.src.mod_spongeTools.load(mod_spongeTools.java:36)
    at net.minecraft.src.ModLoader.init(ModLoader.java:927)
    at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:161)
    at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
    at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:404)
    at net.minecraft.client.Minecraft.run(Minecraft.java:724)
    at java.lang.Thread.run(Thread.java:722)
    --- END ERROR REPORT d53ba9c0 ----------


    This is my new code:
    package net.minecraft.src;
    public class mod_spongeTools extends BaseMod
    {
    public static final Item pickaxeSponge = (new ItemPickaxe(3020, EnumToolMaterial.SPONGE)).setItemName("pickaxeSponge");
    public static final Item axeSponge = (new ItemAxe(3021, EnumToolMaterial.SPONGE)).setItemName("axeSponge");
        public static final Item shovelSponge = (new ItemSpade(3022, EnumToolMaterial.SPONGE)).setItemName("shovelSponge");
        public static final Item swordSponge = (new ItemSword(3023, EnumToolMaterial.SPONGE)).setItemName("swordSponge");
        public static final Item hoeSponge = (new ItemHoe(3024, EnumToolMaterial.SPONGE)).setItemName("hoeSponge");
    public static  Item sticksDiamond = (new Item(3435).setItemName("sticksDiamond"));
    public static  Item craftSponge = (new Item(3073).setItemName("craftSponge"));
    
    public void load()
    {
     
      ModLoader.addName(pickaxeSponge, "Sponge Pickaxe");
      ModLoader.addName(axeSponge, "Sponge Axe");
      ModLoader.addName(shovelSponge, "Sponge Shovel");
      ModLoader.addName(swordSponge, "Sponge Sword");
      ModLoader.addName(hoeSponge, "Sponge Hoe");
      ModLoader.addName(sticksDiamond, "Diamond Sticks");
      ModLoader.addName(craftSponge, "Crafted Sponge");
     
     
      pickaxeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/pickaxesponge.png");
      axeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/axesponge.png");
      shovelSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/shovelsponge.png");
      swordSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/swordsponge.png");
      hoeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/hoesponge.png");
      sticksDiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sticksDiamond.png");
      craftSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sponge.png");
     
     
       ModLoader.addRecipe(new ItemStack(sticksDiamond, 4), new Object[] {"  ", " D ", "  D ", 'D', Item.diamond});
       ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[] {"GGG", "GGG", "GGG", 'G', Block.glowStone});
       ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object[] {"SSS", " D ", " D ", 'D', sticksDiamond, 'S', craftSponge});
       ModLoader.addRecipe(new ItemStack(axeSponge, 1), new Object[] {"SS ", " SD ", " D ", 'D', sticksDiamond, 'S', craftSponge});
       ModLoader.addRecipe(new ItemStack(shovelSponge, 1), new Object[]{" S ", " D ", " D ", 'D', sticksDiamond, 'S', craftSponge});
       ModLoader.addRecipe(new ItemStack(swordSponge, 1), new Object[] {" S ", " S ", " D ", 'D', sticksDiamond, 'S', craftSponge });
       ModLoader.addRecipe(new ItemStack(hoeSponge, 1), new Object[] {"SS ", " D ", " D ", 'D', sticksDiamond, 'S', craftSponge });
      
    }
    
    
    
      public String getVersion()
        {
    	    return "1.1";
        }
    }
    Posted in: Modification Development
  • 0

    posted a message on Trouble adding a new item
    I did that, this is my new code
    package net.minecraft.src;
    public class mod_spongeTools extends BaseMod
    {
    public static final Item pickaxeSponge = (new ItemPickaxe(3020, EnumToolMaterial.SPONGE)).setItemName("pickaxeSponge");
    public static final Item axeSponge = (new ItemAxe(3021, EnumToolMaterial.SPONGE)).setItemName("axeSponge");
        public static final Item shovelSponge = (new ItemSpade(3022, EnumToolMaterial.SPONGE)).setItemName("shovelSponge");
        public static final Item swordSponge = (new ItemSword(3023, EnumToolMaterial.SPONGE)).setItemName("swordSponge");
        public static final Item hoeSponge = (new ItemHoe(3024, EnumToolMaterial.SPONGE)).setItemName("hoeSponge");
    public static  Item sticksDiamond = (new Item(3435).setitemName("sticksDiamond"));
    public static  Item craftSponge = (new Item(3073).setitemName("craftSponge"));
    
    public void load()
    {
     
      ModLoader.addName(pickaxeSponge, "Sponge Pickaxe");
      ModLoader.addName(axeSponge, "Sponge Axe");
      ModLoader.addName(shovelSponge, "Sponge Shovel");
      ModLoader.addName(swordSponge, "Sponge Sword");
      ModLoader.addName(hoeSponge, "Sponge Hoe");
      ModLoader.addName(sticksDiamond, "Diamond Sticks");
      ModLoader.addName(craftSponge, "Crafted Sponge");
     
     
      pickaxeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/pickaxesponge.png");
      axeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/axesponge.png");
      shovelSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/shovelsponge.png");
      swordSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/swordsponge.png");
      hoeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/hoesponge.png");
      sticksDiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sticksDiamond.png");
      craftSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sponge.png");
     
     
       ModLoader.addRecipe(new ItemStack(sticksDiamond, 4), new Object[] {"  ", " D ", "  D " 'D', Item.diamond});
       ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
       ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object[] {"SSS", " D ", " D " 'D', sticksDiamond 'S', sponge});
       ModLoader.addRecipe(new ItemStack(axeSponge, 1), new Object[] {"SS ", " SD ", " D " 'D', sticksDiamond, 'S', sponge});
       ModLoader.addRecipe(new ItemStack(shovelSponge, 1), new Object[]{" S ", " D ", " D ", 'D', sticksDiamond, 'S', sponge});
       ModLoader.addRecipe(new ItemStack(swordSponge, 1), new Object[] {" S ", " S ", " D " 'D', sticksDiamond, 'S', sponge });
       ModLoader.addRecipe(new ItemStack(hoeSponge, 1), new Object[] {"SS ", " D ", " D " 'D', sticksDiamond, 'S', sponge });
      
    }
    
    
    
      public String getVersion()
        {
    	    return "1.1";
        }
    }


    But I'm still getting those errors. :(
    Posted in: Modification Development
  • 0

    posted a message on Trouble adding a new item
    Quote from jilliby

    Try changing
    public class mod_spongeTools

    to
    public void load()


    At the beginning of your code you have
    public class mod_spongeTools extends BaseMod

    which is fine but you also have it again after your item declarations. This one should be
    public void load()



    I fixed that, but now I'm getting errors like this

    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: ';' expected
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    		 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: illegal start of
    type
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    			   ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    			    ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: ';' expected
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    					  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: illegal start of
    type
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    						  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: ';' expected
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    								 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    										   ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: illegal start of
    type
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    										    ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    											 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:37: error: ';' expected
    				 ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[
    ] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    											  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: illegal start of
    type
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    						  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: illegal start of
    type
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    									 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: ')' expected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    									    ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: ';' expected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    												  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    															    ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    																 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: illegal start of
    type
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    																   ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    																    ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: ';' expected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    																	 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
      ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: illegal start of
    type
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
        ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    		 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: ';' expected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    		  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: illegal start of
    type
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    				 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    				  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    						  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    							 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: <identifier> exp
    ected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    											 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: illegal start of
    type
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    												 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: ';' expected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    														 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:38: error: class, interface
    , or enum expected
    				 ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object
    [] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    														  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:39: error: class, interface
    , or enum expected
    				 ModLoader.addRecipe(new ItemStack(axeSponge, 1), new Object[] {
    "SS ", " SsD ", " sD " 'sD', sticksDiamond, 'S', sponge});
    				 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:39: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(axeSponge, 1), new Object[] {
    "SS ", " SsD ", " sD " 'sD', sticksDiamond, 'S', sponge});
    					   ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:39: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(axeSponge, 1), new Object[] {
    "SS ", " SsD ", " sD " 'sD', sticksDiamond, 'S', sponge});
    						  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:40: error: class, interface
    , or enum expected
    				 ModLoader.addRecipe(new ItemStack(shovelSponge, 1), new Object[
    ]{" S ", " sD ", " sD ", 'sD', sticksDiamond, 'S', sponge});
    				 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:40: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(shovelSponge, 1), new Object[
    ]{" S ", " sD ", " sD ", 'sD', sticksDiamond, 'S', sponge});
    						 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:40: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(shovelSponge, 1), new Object[
    ]{" S ", " sD ", " sD ", 'sD', sticksDiamond, 'S', sponge});
    						    ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:41: error: class, interface
    , or enum expected
    				 ModLoader.addRecipe(new ItemStack(swordSponge, 1), new Object[]
    {" S ", " S ", " sD " 'sD', sticksDiamond, 'S', sponge });
    				 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:41: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(swordSponge, 1), new Object[]
    {" S ", " S ", " sD " 'sD', sticksDiamond, 'S', sponge });
    					   ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:41: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(swordSponge, 1), new Object[]
    {" S ", " S ", " sD " 'sD', sticksDiamond, 'S', sponge });
    						  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:42: error: class, interface
    , or enum expected
    				 ModLoader.addRecipe(new ItemStack(hoeSponge, 1), new Object[] {
    "SS ", " sD ", " sD " 'sD', sticksDiamond, 'S', sponge });
    				 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:42: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(hoeSponge, 1), new Object[] {
    "SS ", " sD ", " sD " 'sD', sticksDiamond, 'S', sponge });
    					  ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:42: error: unclosed charact
    er literal
    				 ModLoader.addRecipe(new ItemStack(hoeSponge, 1), new Object[] {
    "SS ", " sD ", " sD " 'sD', sticksDiamond, 'S', sponge });
    						 ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:44: error: class, interface
    , or enum expected
    	    }
    	    ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:48: error: class, interface
    , or enum expected
    		 public String getVersion()
    			    ^
    src\minecraft\net\minecraft\src\mod_spongeTools.java:51: error: class, interface
    , or enum expected
        }
        ^
    63 errors
    ==================
    !! Can not find server sources, try decompiling !!
    Press any key to continue . . .


    I modified my code like this:

    package net.minecraft.src;
    public class mod_spongeTools extends BaseMod
    {
    public static final Item pickaxeSponge = (new ItemPickaxe(3020, EnumToolMaterial.SPONGE)).setItemName("pickaxeSponge");
    public static final Item axeSponge = (new ItemAxe(3021, EnumToolMaterial.SPONGE)).setItemName("axeSponge");
        public static final Item shovelSponge = (new ItemSpade(3022, EnumToolMaterial.SPONGE)).setItemName("shovelSponge");
        public static final Item swordSponge = (new ItemSword(3023, EnumToolMaterial.SPONGE)).setItemName("swordSponge");
        public static final Item hoeSponge = (new ItemHoe(3024, EnumToolMaterial.SPONGE)).setItemName("hoeSponge");
    public static  Item sticksDiamond = (new Item(3435).setitemName("sticksDiamond"));
    public static  Item craftSponge = (new Item(3073).setitemName("craftSponge"));
    
    public void load()
    {
     
      ModLoader.addName(pickaxeSponge, "Sponge Pickaxe");
      ModLoader.addName(axeSponge, "Sponge Axe");
      ModLoader.addName(shovelSponge, "Sponge Shovel");
      ModLoader.addName(swordSponge, "Sponge Sword");
      ModLoader.addName(hoeSponge, "Sponge Hoe");
      ModLoader.addName(sticksDiamond, "Diamond Sticks");
      ModLoader.addName(craftSponge, "Crafted Sponge");
     
     
      pickaxeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/pickaxesponge.png");
      axeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/axesponge.png");
      shovelSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/shovelsponge.png");
      swordSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/swordsponge.png");
      hoeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/hoesponge.png");
      sticksDiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sticksDiamond.png");
      craftSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sponge.png");
     
     
       ModLoader.addRecipe(new ItemStack(sticksDiamond, 4), new Object[] {"  ", " D ", "  D " 'D', Item.diamond});
       ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
       ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object[] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
       ModLoader.addRecipe(new ItemStack(axeSponge, 1), new Object[] {"SS ", " SsD ", " sD " 'sD', sticksDiamond, 'S', sponge});
       ModLoader.addRecipe(new ItemStack(shovelSponge, 1), new Object[]{" S ", " sD ", " sD ", 'sD', sticksDiamond, 'S', sponge});
       ModLoader.addRecipe(new ItemStack(swordSponge, 1), new Object[] {" S ", " S ", " sD " 'sD', sticksDiamond, 'S', sponge });
       ModLoader.addRecipe(new ItemStack(hoeSponge, 1), new Object[] {"SS ", " sD ", " sD " 'sD', sticksDiamond, 'S', sponge });
      
    }
    
    
    
      public String getVersion()
        {
    	    return "1.1";
        }
    }


    Any more ideas?
    Posted in: Modification Development
  • 0

    posted a message on Trouble adding a new item
    Quote from gdogw1

    hmm. try saving all your files in notepad then JUST making one tool e.g. pickaxe. If i'm making a toolset I usually try to limit to one before I make a bunch of tools. And yes, on that note, remove sponge from the EnumToolMaterial and make another called EnumSpongeToolMaterial(or anything you want) and edit it to be sort of like this
    package net.minecraft.src;
    public enum EnumSpongeToolMaterial
    {
    //You can edit those numbers with the pars listed below if you didnt already know. You can also edit enchantability wich is pretty cool
    SPONGE(3, 1561, 8.0F, 3, 10);
    /**
    	 * The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)
    	 */
    private final int harvestLevel;
    /**
    	 * The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
    	 */
    private final int maxUses;
    /**
    	 * The strength of this tool material against blocks which it is effective against.
    	 */
    private final float efficiencyOnProperMaterial;
    /** Damage versus entities. */
    private final int damageVsEntity;
    /** Defines the natural enchantability factor of the material. */
    private final int enchantability;
    private EnumToolMaterial(int par3, int par4, float par5, int par6, int par7)
    {
    	 this.harvestLevel = par3;
    	 this.maxUses = par4;
    	 this.efficiencyOnProperMaterial = par5;
    	 this.damageVsEntity = par6;
    	 this.enchantability = par7;
    }
    /**
    	 * The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
    	 */
    public int getMaxUses()
    {
    	 return this.maxUses;
    }
    /**
    	 * The strength of this tool material against blocks which it is effective against.
    	 */
    public float getEfficiencyOnProperMaterial()
    {
    	 return this.efficiencyOnProperMaterial;
    }
    /**
    	 * Damage versus entities.
    	 */
    public int getDamageVsEntity()
    {
    	 return this.damageVsEntity;
    }
    /**
    	 * The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)
    	 */
    public int getHarvestLevel()
    {
    	 return this.harvestLevel;
    }
    /**
    	 * Return the natural enchantability factor of the material.
    	 */
    public int getEnchantability()
    {
    	 return this.enchantability;
    }
    }

    Hope that solved something :) If not post again


    Yeah, the thing is though, it wasn't the items that were giving me errors, it was the craftsponge and stickDiamonds. Is there something I was doing wrong with those? And no, it didn't fix it :S
    Posted in: Modification Development
  • 0

    posted a message on Pixel Perfection - Now with polar bears! [1.11]
    Quote from XSSheep

    Would it be possible to wait a day or two? My first update is just about done and I think it makes some nice improvements and it includes all the items too!

    It's really close to being done now so yea, I could just send you a PM for when I release the update so you could make the review just after that?


    Awesome thanks :)
    Posted in: Resource Packs
  • 0

    posted a message on Pixel Perfection - Now with polar bears! [1.11]
    Can I please make a Texture pack review of this?
    Posted in: Resource Packs
  • 0

    posted a message on Trouble adding a new item
    Quote from Natterboy

    Have you added sponge to EnumToolMaterial.java?

    Quote from gdogw1

    Like the post above, you should check for EnumToolMaterial, and if you dont want people complaining about how your mod isnt compatible with other mods, make a new file called "Enum(name of material)ToolMaterial" Then copy the files from EnumToolMaterial, rename everything there from "EnumToolMaterial" to "Enum(name of material)ToolMaterial". After this, delete the other tool materials and enter the credentials for your tools materials. Your material should be the only one in there. I also noticed you are also not even including the materials in the files above. Take a look at mrsal's tutorials on items. They should be helpful.
    Also, in the modloader function of adding recipe's, did you write
    Character.valueOf('letter goes here'), Item.ItemNameHere

    There are a lot of functions in making a tool, let alone a toolset. I dont know if you are not including some major parts or just making a mock up but just be sure you watch tutorials if all else fails. Aside of that note, that mod seems like a great mod! I'll look out for it.


    Well, I do have sponge in EnumToolMaterial, and if it does become a problem I can make another Enum Material thing later :) But it still doesn't work
    Posted in: Modification Development
  • 0

    posted a message on Trouble adding a new item
    When I try to compile with MCP, it gives me a ton of errors. Could someone please tell me where I've gone wrong in the code?

    package net.minecraft.src;
    public class mod_spongeTools extends BaseMod
    {public static final Item pickaxeSponge = (new ItemPickaxe(3020, EnumToolMaterial.SPONGE)).setItemName("pickaxeSponge");
    public static final Item axeSponge = (new ItemAxe(3021, EnumToolMaterial.SPONGE)).setItemName("axeSponge");
    public static final Item shovelSponge = (new ItemSpade(3022, EnumToolMaterial.SPONGE)).setItemName("shovelSponge");
    public static final Item swordSponge = (new ItemSword(3023, EnumToolMaterial.SPONGE)).setItemName("swordSponge");
    public static final Item hoeSponge = (new ItemHoe(3024, EnumToolMaterial.SPONGE)).setItemName("hoeSponge");
    public static final Item sticksDiamond = (new Item(3050).setitemName("sticksDiamond"));
    public static final Item craftSponge = (new Item(3073).setitemName("craftSponge"));
    }public class mod_spongeTools {
    ModLoader.addName(pickaxeSponge, "Sponge Pickaxe");
    ModLoader.addName(axeSponge, "Sponge Axe");
    ModLoader.addName(shovelSponge, "Sponge Shovel");
    ModLoader.addName(swordSponge, "Sponge Sword");
    ModLoader.addName(hoeSponge, "Sponge Hoe");
    ModLoader.addName(sticksDiamond, "Diamond Sticks");
    ModLoader.addName(craftSponge, "Crafted Sponge");
    pickaxeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/pickaxesponge.png");
    axeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/axesponge.png");
    shovelSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/shovelsponge.png");
    swordSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/swordsponge.png");
    hoeSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/hoesponge.png");
    sticksDiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sticksDiamond.png");
    craftSponge.iconIndex = ModLoader.addOverride("/gui/items.png", "/spongeTools/sponge.png");
    
    ModLoader.addRecipe(new ItemStack(sticksDiamond, 4), new Object[] {" ", " D ", " D " 'D', Item.diamond});
    ModLoader.addRecipe(new ItemStack(craftSponge, 12), new Object[] {"GGG", "GGG", "GGG" 'G', Block.glowStone});
    ModLoader.addRecipe(new ItemStack(pickaxeSponge, 1), new Object[] {"SSS", " sD ", " sD " 'sD', sticksDiamond 'S', sponge});
    ModLoader.addRecipe(new ItemStack(axeSponge, 1), new Object[] {"SS ", " SsD ", " sD " 'sD', sticksDiamond, 'S', sponge});
    ModLoader.addRecipe(new ItemStack(shovelSponge, 1), new Object[]{" S ", " sD ", " sD ", 'sD', sticksDiamond, 'S', sponge});
    ModLoader.addRecipe(new ItemStack(swordSponge, 1), new Object[] {" S ", " S ", " sD " 'sD', sticksDiamond, 'S', sponge });
    ModLoader.addRecipe(new ItemStack(hoeSponge, 1), new Object[] {"SS ", " sD ", " sD " 'sD', sticksDiamond, 'S', sponge });}
    public String getVersion()
    {
    	 return "1.1";
    }
    Posted in: Modification Development
  • To post a comment, please .