Jump to content

[1.7.10] [and higher] Packet size of custom items?


robijnvogel

Recommended Posts

qCraft adds the functionality to travel between two separate Minecraft servers, taking your items with you.

However, the possibility exists that an item on one of both servers does not exist on the other server (even when using the same mods on both servers, but using different configs).

 

This would typically result in the loss of the item(s) that are brought to a place that does not recognize them.

For that, I'm trying to implement a new qCraft Item that can be used to "wrap" these non-existent items in, so you can keep them.

 

In their current state, I'd have expected them to work, however they don't seem to.

 

When I try to bring a Magical Crops Enchanted Book with me to a server where these books have been disabled by configs, I immediately get kicked from the server with the message: "NetworkDispatcher exception

io.netty.handler.codec.DecoderException: java.io.IOException: Packet was larger than I expected, found 5 bytes extra whilst reading packet 47"

 

I think I am handling the extra information in ItemMissing wrongly, making it take up too much space, but I'd have no idea how to handle it neatly. Could someone help me with this?

 

This is the "dummy" item in question on Github.

 

And this is the piece of code that potentially creates one.

 

Note: I know it's not the most elegant code.

I walk amongst titans.

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.



×
×
  • Create New...

Important Information

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