[Answered]Recompiling Errors[1.5_01][3.1]
3 posters
Page 1 of 1
[Answered]Recompiling Errors[1.5_01][3.1]
I'm creating a new tool set based on the tutorial somewhere on these forums and I'm getting errors when I recompile.
Source:
Source:
- Code:
package net.minecraft.src;
public class mod_GoldDiamond extends BaseMod
{
public String Version()
{
return "1.5_01";
}
}
public static final Item GoldDiamond = new Item(3000).setItemName("GoldDiamond");
public static final Item GoldDiamondPick = new ItemPickaxe(3001, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondPick");
public static final Item GoldDiamondShovel = new ItemSpade(3002, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondShovel");
public static final Item GoldDiamondAxe = new ItemAxe(3003, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondAxe");
public static final Item GoldDiamondHoe = new ItemHoe(3004, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondHoe");
public static final Item GoldDiamondSword = new ItemSword(3005, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondSword");
public mod_GoldDiamond()
{
GoldDiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamond.png");
GoldDiamondPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondpick.png");
GoldDiamondShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondshovel.png");
GoldDiamondAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondaxe.png");
GoldDiamondHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondhoe.png");
GoldDiamondSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondsword.png");
ModLoader.AddName(GoldDiamond, "GDiamond");
ModLoader.AddName(GoldDiamondPick, "GDiamond Pickaxe");
ModLoader.AddName(GoldDiamondShovel, "GDiamond Shovel");
ModLoader.AddName(GoldDiamondAxe, "GDiamond Axe");
ModLoader.AddName(GoldDiamondHoe, "GDiamond Hoe");
ModLoader.AddName(GoldDiamondSword, "GDiamond Sword");
ModLoader.AddRecipe(new ItemStack(GoldDiamond, 1), new Object[] {
"SXS", Character.valueOf('X'), Item.ingotGold, Character.valueOf('S'), Item.diamond
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondPick, 1), new Object[] {
"XXX", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondAxe, 1) new Object[] {
"XX ", "XS ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondHoe, 1) new Object[]{
"XX ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondSword, 1) new Object[]{
" X ", " X ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
}
- Code:
// 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);
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 3);
/*
public static EnumToolMaterial[] values()
{
return (EnumToolMaterial[])field_21209_j.clone();
}
public static EnumToolMaterial valueOf(String s)
{
return (EnumToolMaterial)Enum.valueOf(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 GDIAMOND;
*/
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);
field_21209_j = (new EnumToolMaterial[] {
WOOD, STONE, IRON, EMERALD, GOLD
});
}
*/
}
- Code:
== MCP v3.1 ==
> Recompiling client...
javac.exe -g -verbose -classpath "jars/bin/minecraft.jar;jars/bin/jinput.jar;jar
s/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecr
aft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*
.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\EnumToolMaterial.java:14: invalid method declara
tion; return type required
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 0);
^
src\minecraft\net\minecraft\src\EnumToolMaterial.java:14: illegal start of type
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 0);
^
src\minecraft\net\minecraft\src\EnumToolMaterial.java:14: illegal start of type
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 0);
^
src\minecraft\net\minecraft\src\EnumToolMaterial.java:14: illegal start of type
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 0);
^
src\minecraft\net\minecraft\src\EnumToolMaterial.java:14: illegal start of type
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 0);
^
src\minecraft\net\minecraft\src\EnumToolMaterial.java:14: illegal start of type
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 0);
^
src\minecraft\net\minecraft\src\EnumToolMaterial.java:14: illegal start of type
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 0);
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:37: '}' expected
"XXX", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:37: not a statement
"XXX", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:37: ';' expected
"XXX", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:38: illegal start of type
});
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: <identifier> expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: illegal start of type
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: ')' expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: ';' expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: <identifier> expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: <identifier> expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: illegal start of type
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: <identifier> expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: ';' expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:39: <identifier> expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:40: illegal start of type
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:40: <identifier> expected
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:40: ';' expected
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:40: illegal start of type
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:40: <identifier> expected
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:40: ';' expected
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:40: invalid method declarat
ion; return type required
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:40: illegal start of type
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:40: ';' expected
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S')
Item.stick
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:41: class, interface, or en
um expected
});
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:42: class, interface, or en
um expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondAxe, 1) new Object[] {
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:45: class, interface, or en
um expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondHoe, 1) new Object[]{
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:48: class, interface, or en
um expected
ModLoader.AddRecipe(new ItemStack(GoldDiamondSword, 1) new Object[]{
^
src\minecraft\net\minecraft\src\mod_GoldDiamond.java:51: class, interface, or en
um expected
}
^
35 errors
==================
> Done in 3.69 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Last edited by keithgorawr on Sat May 07, 2011 12:59 pm; edited 9 times in total (Reason for editing : Added the recompiling log)
keithgorawr- Recruit
- Posts : 9
Join date : 2011-05-07
Re: [Answered]Recompiling Errors[1.5_01][3.1]
yeah post the EnumToolMaterial
and you can get rid of one of the Version declarations
and you can get rid of one of the Version declarations
Methuselah96- ZidMC Coder
- Posts : 159
Join date : 2011-04-22
Age : 28
Location : Philadelphia, Pennsylvania, United States
Re: [Answered]Recompiling Errors[1.5_01][3.1]
Added to OP and the extra version declaration was a vestige xPMethuselah96 wrote:yeah post the EnumToolMaterial
and you can get rid of one of the Version declarations
It might be worth mentioning that the EnumToolMaterial was decompiled in 3.1. I switched back to 2.12 because I was more comfortable with it, don't know how that makes any sense, but whatever I guess.
keithgorawr- Recruit
- Posts : 9
Join date : 2011-05-07
Re: [Answered]Recompiling Errors[1.5_01][3.1]
ok make gdiamond on enumtool material like this:
that probably wont fix all the errors but try anyway
- Code:
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 3);
that probably wont fix all the errors but try anyway
Methuselah96- ZidMC Coder
- Posts : 159
Join date : 2011-04-22
Age : 28
Location : Philadelphia, Pennsylvania, United States
Re: [Answered]Recompiling Errors[1.5_01][3.1]
Alright, I edited the original post with the new error report. Thanks for helping, by the way.Methuselah96 wrote:ok make gdiamond on enumtool material like this:because that number that i changed from 4 to 5 is kind of like an id number
- Code:
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 3);
that probably wont fix all the errors but try anyway
keithgorawr- Recruit
- Posts : 9
Join date : 2011-05-07
Re: [Answered]Recompiling Errors[1.5_01][3.1]
do u have modloader installed?
Methuselah96- ZidMC Coder
- Posts : 159
Join date : 2011-04-22
Age : 28
Location : Philadelphia, Pennsylvania, United States
Re: [Answered]Recompiling Errors[1.5_01][3.1]
Yeah, the BaseMod.java and ModLoader.java are present and the jar that was decompiled had the latest modloader installedMethuselah96 wrote:do u have modloader installed?
keithgorawr- Recruit
- Posts : 9
Join date : 2011-05-07
Re: [Answered]Recompiling Errors[1.5_01][3.1]
sorry I dont know anything more you can do
Methuselah96- ZidMC Coder
- Posts : 159
Join date : 2011-04-22
Age : 28
Location : Philadelphia, Pennsylvania, United States
Re: [Answered]Recompiling Errors[1.5_01][3.1]
At least you tried. Thanks for taking time out of your day to help and I'll see if I can find out what's wrong on my own.Methuselah96 wrote:sorry I dont know anything more you can do
keithgorawr- Recruit
- Posts : 9
Join date : 2011-05-07
Re: [Answered]Recompiling Errors[1.5_01][3.1]
You're closing the initial public mod_modname too early...
package net.minecraft.src;
public class mod_GoldDiamond extends BaseMod
{
public String Version()
{
return "1.5_01";
}
}
If you move it to the bottom it should work... i.e.
package net.minecraft.src;
public class mod_GoldDiamond extends BaseMod
{
public String Version()
{
return "1.5_01";
}
}
If you move it to the bottom it should work... i.e.
- Code:
package net.minecraft.src;
public class mod_GoldDiamond extends BaseMod
{
public String Version()
{
return "1.5_01";
}
public static final Item GoldDiamond = new Item(3000).setItemName("GoldDiamond");
public static final Item GoldDiamondPick = new ItemPickaxe(3001, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondPick");
public static final Item GoldDiamondShovel = new ItemSpade(3002, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondShovel");
public static final Item GoldDiamondAxe = new ItemAxe(3003, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondAxe");
public static final Item GoldDiamondHoe = new ItemHoe(3004, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondHoe");
public static final Item GoldDiamondSword = new ItemSword(3005, EnumToolMaterial.GDIAMOND).setItemName("GoldDiamondSword");
public mod_GoldDiamond()
{
GoldDiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamond.png");
GoldDiamondPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondpick.png");
GoldDiamondShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondshovel.png");
GoldDiamondAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondaxe.png");
GoldDiamondHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondhoe.png");
GoldDiamondSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/kookie/gdiamondsword.png");
ModLoader.AddName(GoldDiamond, "GDiamond");
ModLoader.AddName(GoldDiamondPick, "GDiamond Pickaxe");
ModLoader.AddName(GoldDiamondShovel, "GDiamond Shovel");
ModLoader.AddName(GoldDiamondAxe, "GDiamond Axe");
ModLoader.AddName(GoldDiamondHoe, "GDiamond Hoe");
ModLoader.AddName(GoldDiamondSword, "GDiamond Sword");
ModLoader.AddRecipe(new ItemStack(GoldDiamond, 1), new Object[] {
"SXS", Character.valueOf('X'), Item.ingotGold, Character.valueOf('S'), Item.diamond
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondPick, 1), new Object[] {
"XXX", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondShovel, 1), new Object[] {
" X ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondAxe, 1) new Object[] {
"XX ", "XS ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondHoe, 1) new Object[]{
"XX ", " S ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
ModLoader.AddRecipe(new ItemStack(GoldDiamondSword, 1) new Object[]{
" X ", " X ", " S ", Character.valueOf('X'), GoldDiamond, Character.valueOf('S') Item.stick
});
}
}
Meglazero- Iron Miner
- Posts : 51
Join date : 2011-04-22
Re: [Answered]Recompiling Errors[1.5_01][3.1]
Did as you advised and updated the recompiling log in the OP.Meglazero wrote:-snip-
[/code]
keithgorawr- Recruit
- Posts : 9
Join date : 2011-05-07
Re: [Answered]Recompiling Errors[1.5_01][3.1]
Try running updatemcp.bat and recompile again and see if it gives you errors... I don't see why it's giving you the errors it is, nothing looks wrong in your code, but there was an update where mcp was giving false errors for no reason, so that might be it.
Meglazero- Iron Miner
- Posts : 51
Join date : 2011-04-22
Re: [Answered]Recompiling Errors[1.5_01][3.1]
I don't know where I made my mistakes but I rewrote the whole thing and it compiled correctly, so to those who responded, thanks.Meglazero wrote:Try running updatemcp.bat and recompile again and see if it gives you errors... I don't see why it's giving you the errors it is, nothing looks wrong in your code, but there was an update where mcp was giving false errors for no reason, so that might be it.
keithgorawr- Recruit
- Posts : 9
Join date : 2011-05-07
Re: [Answered]Recompiling Errors[1.5_01][3.1]
Ohhh, I just seen something... try taking the semicolon off of the last part of GOLD and put a comma instead... like
- Code:
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),
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 3);
/*
Meglazero- Iron Miner
- Posts : 51
Join date : 2011-04-22
Re: [Answered]Recompiling Errors[1.5_01][3.1]
Yeah I noticed that when I redid everything. Thanks anywaysMeglazero wrote:Ohhh, I just seen something... try taking the semicolon off of the last part of GOLD and put a comma instead... like
- Code:
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),
GDIAMOND("GDIAMOND", 5, 3, 3122, 12F, 3);
/*
Just waiting for someone to close this now.
keithgorawr- Recruit
- Posts : 9
Join date : 2011-05-07
Re: [Answered]Recompiling Errors[1.5_01][3.1]
Np, glad I could help somewhat.
Meglazero- Iron Miner
- Posts : 51
Join date : 2011-04-22
Similar topics
» [212-1][MOB]Recompiling errors (not icecube) URGENT!!!
» [1.5_01]Basic mod, 35 errors.[answered]
» [1.5_01] recompile errors [answered]
» "Random rand" error + recompiling error [ANSWERED]
» 29 ERRORS!!!
» [1.5_01]Basic mod, 35 errors.[answered]
» [1.5_01] recompile errors [answered]
» "Random rand" error + recompiling error [ANSWERED]
» 29 ERRORS!!!
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|