Mekanism

Mekanism

111M Downloads

Cardboard box can cause "internal exception io.netty.handler.codec.decoderexception"

Mementh opened this issue ยท 12 comments

commented

ok.. consider this.. a person is packing up things to move their base.. and wants to "pack light"

they use cardboard boxes to pack up a few ME drives with disks in them.. and those drives have deep storage units that are full... they also place it into a diamond chest with ALOT of other things.. so everything is quite full..

then this person puts that into a cardboard box so they can carry it...

they get disconnected with "internal exception io.netty.handler.codec.decoderexception" with various port errors and saying packets are too large.

When they login they could fall through the world till they hit like -1.6XX and can't do anything (solution to this is to be killed.. its better if you have a gravestone so the box can be stored in it since its now a crashing box)

I understand its because it has to send all the data thats in the cardboard box to the user and its just too much!

So does this discribe a silly person? :)

I wonder if there can be a check to see if the packet would be too large as you put on the cardboard box and have it reject/pop off if it would be too much?

commented

While I think doing that is really dumb, I agree that it should not be possible to put a block with an inventory into a cardboard box if the inventory already contains a cardboard box. The dolly from JABBA should probably also be blacklisted if it contains something.

commented

its not dumb per say.. it could have backpacks full of stuff ...
I understand blacklisting but feel it wont make sense is there a way to see how big the dataload would be and then fail?
Also the issue would be cardbard boxes in a ME system would cause this as well! so it would need the data check still.

commented

I doubt that it is possible to get the size of the data. What I don't really get is why the client needs the NBT data from the cardboard box.

commented

@iKaneki-Ken why does the client need to know what's in the box? As far as I recall the cardboard box is not like the JABBA dolly which changes its texture when you transport something with it.

commented

@XFactHD If the client doesn't know what's in the box, it can cause a visual desync, which in turn can make it seem like if you remove the item in the box and put it in your inventory, nothing will show up in your inventory until the next player inventory event triggered.

So while the client doesn't necessarily NEED to be updated, recommended that sync packets are sent to avoid desyncs like that.

commented

unknown.. but it is only a theory?

commented

@XFactHD To eliminate visual desyncs, that's why. How is your client supposed to know what is inside the box on the server if no packet is set to tell your client that it is in the box?

And the reason the cap is in is to prevent people from doing things like that, because it can legitimately use up all of a persons bandwidth just trying to send the data for that over.

TL:DR Just because Minecraft is a sandbox game, doesn't mean it is limitless, there have to be restrictions put in place as to make sure you don't melt peoples computers.

commented

Right. As far as I know, there really isn't a way to see the "size" of the data of a cardboard box. I can't say that I intended boxes to be used for ME drive transport :)

commented

@XFactHD Understood, irregardless though, a sync packet is still recommended for a situation like that.

commented

good knowlage
Maybe there could be a warning @aidancbrady that happens when you do pack a ME drive or other known items that could be a issue?
this way people don't do it if they are stupid like me :)

commented

@iKaneki-Ken the cardboard box is not like a pouch, you can't take anything out of the box and put it in your inventory. You need to place the box and shift right click it to reveal the contents, which in my opinion is where the client needs to know what's inside the box.

commented

@iKaneki-Ken recomendeed or REQUIRED? IE are is it sending data that does not need to be sent and could just be kept on the server side and not cause a crash?