Jump to content

Help with ItemAxe


RedBullSlurpie

Recommended Posts

I have all tools working but Axe for my sapphire gem in the game. There all the same code except changed to match the specified item, (Pickaxe, pickaxe, hoe, hoe, etc). However the axe causes a crash which points back to my SlurpiesDonglesItemAxe, and my GameRegistry.registerItem

I'm not sure if I spelled anything wrong, but I re-wrote it a number of times and still crashes and im not sure what I am missing, or doing wrong, any help? Down below is pics of the code and console.

 

 

Thanks again to anyone who can help me.

Link to comment
Share on other sites

Screenshots are a terrible way to share code and the screenshot of the console cuts off part of the crash report that we need to see: the actual exception that was thrown.

 

Upload your full FML log (logs/fml-client-latest.log) and code with syntax highlighting to Gist and link it here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Screenshots are a terrible way to share code and the screenshot of the console cuts off part of the crash report that we need to see: the actual exception that was thrown.

 

Upload your full FML log (logs/fml-client-latest.log) and code with syntax highlighting to Gist and link it here.

Sorry.. here you are.

https://gist.github.com/anonymous/31be1b72b5b9ff4cf04d

Link to comment
Share on other sites

[22:19:36] [Client thread/ERROR]: The mcmod.info file in Slurpie'sDongles cannot be parsed as valid JSON. It will be ignored

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING

Your mcmod.info file has a syntax error.

 

java.lang.ArrayIndexOutOfBoundsException: 5

at net.minecraft.item.ItemAxe.<init>(ItemAxe.java:19)

at com.rbs.slurpiesdongles.Items.ItemSlurpiesDonglesAxe.<init>(ItemSlurpiesDonglesAxe.java:12)

at com.rbs.slurpiesdongles.init.SlurpiesDonglesItems.register(SlurpiesDonglesItems.java:109)

at com.rbs.slurpiesdongles.SlurpiesDongles.preInit(SlurpiesDongles.java:35)

ItemAxe

doesn't yet support custom

ToolMaterial

s because it uses the

ToolMaterial

's ordinal as an index for the

ATTACK_DAMAGES

/

ATTACK_SPEEDS

arrays. See this thread where someone had the same problem.

 

Either create a custom axe class or wait for someone to fix the issue.

 

Don't bump your threads, it will only annoy the people who can help you. It's unlikely to speed up their response.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

[22:19:36] [Client thread/ERROR]: The mcmod.info file in Slurpie'sDongles cannot be parsed as valid JSON. It will be ignored

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING

Your mcmod.info file has a syntax error.

 

java.lang.ArrayIndexOutOfBoundsException: 5

at net.minecraft.item.ItemAxe.<init>(ItemAxe.java:19)

at com.rbs.slurpiesdongles.Items.ItemSlurpiesDonglesAxe.<init>(ItemSlurpiesDonglesAxe.java:12)

at com.rbs.slurpiesdongles.init.SlurpiesDonglesItems.register(SlurpiesDonglesItems.java:109)

at com.rbs.slurpiesdongles.SlurpiesDongles.preInit(SlurpiesDongles.java:35)

ItemAxe

doesn't yet support custom

ToolMaterial

s because it uses the

ToolMaterial

's ordinal as an index for the

ATTACK_DAMAGES

/

ATTACK_SPEEDS

arrays. See this thread where someone had the same problem.

 

Either create a custom axe class or wait for someone to fix the issue.

 

Don't bump your threads, it will only annoy the people who can help you. It's unlikely to speed up their response.

 

Okay, so it'll be fixed when Forge fixes it?

Also what do I need to do to fix my mcmodinfo?

Link to comment
Share on other sites

Okay, so it'll be fixed when Forge fixes it?

Yes.

 

Also what do I need to do to fix my mcmodinfo?

It's a JSON file, so it needs to be valid JSON syntax. I can't see your file, so all I can tell is what the error message tells me: It found a string where it expected the start of an array.

 

JSONList and similar tools can probably tell you where you went wrong.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.