Jump to content

Recommended Posts

Posted

I'm working on a mod that adds a few new items to the game. It works fine in single player. It works fine in SMP when I run it from the eclipse IDE. I got it to run fine with builds of Minecraft over the network as well, but there was a problem.

 

I initially assumed that if I set the item IDs to 0-3, that Forge or ModLoader or something would remap them to whatever they needed to be. I was going off of some tutorials I cobbled together, and they all assumed that indexing for their examples. When I got the mod to work, I could craft the new items in SMP but 2 of the items replaced the iron pickaxe and shovel. I didn't check for what the others replaced.

 

I went back to the drawing board and assumed I needed to set the index higher to a spot that wasn't taken by preexisting items. I tried 247-250, 400-403, and 146-149, but all of these resulted in "Internal exception: java.IOException: Received string length is less than zero! Weird string!"

 

After some forum digging, it appears that this can happen when item IDs conflict, so I'm trying to figure out how to manage this correctly. I'm sure there's a disconnect in the way I'm copying the source code from the client to the server as well as the way I'm indexing the items.

 

I'm also intentionally not getting into config files at this point because it's just a local mod for the people in my office. If there's an easy explanation as to how to incorporate those, and that would help solve the problem I'm up for trying it out, as I plan on researching that before I release this thing into the wild anyway.

 

mod server source:

 

  Reveal hidden contents

 

 

client mod source:

 

  Reveal hidden contents

 

Posted

Forge does not do ID resolution, whatever tutorial you used was wrong or you misunderstood it.

You need to pick ids that are not in use. Hence why configurations and initializing your items properly is a good idea.

http://www.minecraftwiki.net/wiki/Data_values#Item_IDs

Remember to add 256 to your id to get the id on that chart.

As for the exception, show a proper stack trace and we could prolly help.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

So, ignoring the exception for a second, using the IDs 146-149 should have worked, right?

 

Also, the bug only occurs when I run with the standalone game, so I can't get a stack trace. Running it from the IDE and the MCP batch files works perfectly, much to my dismay.  :(

Posted

Learn to run the normal game from the command line, if its truly an error you can always get a stack trace.

And yes, those ids are unused in vanilla, but may be used by other mods.

So ya, get a stacktrace, or we cant do anything.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Ok, here you go.

 

Dump from client:

 

 

  Reveal hidden contents

 

 

Dump from server:

 

 

  Reveal hidden contents

 

Posted

Interesting the issue is that you are running into a kick message, with a blank message... or so it would seem.

And what version of Forge are you using ojn the client?

And why are you not using 152?

Any chance I could get you to run a packet logger. {Google if you don't know how}

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

I'm using 135 on both. It was just the recommended version I came across when I was setting things up at the end of last week.

 

I'm going to try migrating to 152 or 153 and see if that changes anything.

 

Also, what logging program do you recommend? The search results come up with several random ones, and I don't know which one is the best to use.

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.