ZidMC
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01

2 posters

Go down

[Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01 Empty [Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01

Post by Meglazero Mon Apr 25, 2011 7:07 pm

I was using Zid's basic tutorial, albeit changed around a bit for my own means...

mod_Yellow.java
Code:
package net.minecraft.src;

public class mod_Yellow extends BaseMod
{
  public static final Item yellowItem = new Item(2000).setItemName("yellowItem");

public mod_Yellow()
{
  emeraldItem.iconIndex = ModLoader.addOverride("/gui/items.png",

"/itams/yellowitem.png");
  ModLoader.AddName(emeraldItem, "Emerald");

public String Version()
  {
  return "1.5_01";
  }

}

ItemYellow.java
Code:
package net.minecraft.src;

public class ItemYellow extends Item {

public ItemYellow (int i)
    {
        super(i);
        maxStackSize = 64;
    }
}

When I recompile I get an error saying...

Code:
***Minecraft Coder Pack Version 2.12***
MCP 2.12 running in C:\*snip*
Compiling Minecraft
sources\minecraft\net\minecraft\src\mod_Yellow.java:12: illegal start of expression
public String Version()
^
sources\minecraft\net\minecraft\src\mod_Yellow.java:12: ';' expected
public String Version()
                      ^
sources\minecraft\net\minecraft\src\mod_Yellow.java:17: reached end of file while parsing
}
*** minecraft_server.jar was not found, skipping
=== MCP 2.12 recompile script finished ===
Press any key to continue . . .

I changed around the mod_Yellow.java a bit and got rid of a couple of errors...

Code:
package net.minecraft.src;

public class mod_Yellow extends BaseMod
{
  public static final Item yellowItem = new Item(2000).setItemName("yellowItem");

public mod_Yellow()
{
  emeraldItem.iconIndex = ModLoader.addOverride("/gui/items.png",

"/itams/yellowitem.png");
  ModLoader.AddName(emeraldItem, "Emerald");

String Version;
  {
  return "1.5_01";
  }
}

Code:
***Minecraft Coder Pack Version 2.12***
MCP 2.12 running in C:\*snip*
Compiling Minecraft
sources\minecraft\net\minecraft\src\mod_Yellow.java:17: reached end of file while parsing
}
*** minecraft_server.jar was not found, skipping
=== MCP 2.12 recompile script finished ===
Press any key to continue . . .

Sorry, just not really sure what's wrong... might be something to do with the new 2.12/1.5_01? Not sure... sorry, I tried a bit but I'm confused


Last edited by Meglazero on Mon Apr 25, 2011 7:24 pm; edited 1 time in total

Meglazero
Iron Miner

Posts : 51
Join date : 2011-04-22

Back to top Go down

[Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01 Empty Re: [Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01

Post by Ziddia Mon Apr 25, 2011 7:15 pm

Try changing emeraldItem.iconIndex to yellowItem.iconIndex.

Ziddia
Admin
Admin

Posts : 168
Join date : 2011-04-22

https://zidmc.forumotion.com

Back to top Go down

[Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01 Empty Re: [Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01

Post by Ziddia Mon Apr 25, 2011 7:15 pm

Also: after you declare your names, put one of these }

Ziddia
Admin
Admin

Posts : 168
Join date : 2011-04-22

https://zidmc.forumotion.com

Back to top Go down

[Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01 Empty Re: [Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01

Post by Meglazero Mon Apr 25, 2011 7:23 pm

Thanks Zid, that } was what was kicking my ass... had to fix a couple other small errors after that, but I at least got it compiled now study

Meglazero
Iron Miner

Posts : 51
Join date : 2011-04-22

Back to top Go down

[Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01 Empty Re: [Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01

Post by Ziddia Mon Apr 25, 2011 7:25 pm

Okay cool!

Ziddia
Admin
Admin

Posts : 168
Join date : 2011-04-22

https://zidmc.forumotion.com

Back to top Go down

[Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01 Empty Re: [Answered] Zid Tut Recompile fail on MCP 2.12/1.5_01

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum