Closed Speiger closed 2 years ago
The problem with PacketBuffer.writeItem() is that it only writes the count as a byte. My routine is meant for cases where you want counts that are larger. i.e. like when TOP wants to show the total amount of some item in a chest. That's why this function exists
@McJty yes but it is much more efficient then your "writeNBT + writeInt" variant. What i ask you is to: "writeItem + writeInt" instead.
That way you are not sending to much Junk Over. But only have 1 byte of waste. Instead of 50 bytes of waste.
Ok I can do that
Fixed
https://github.com/McJtyMods/TheOneProbe/blob/1.16/src/main/java/mcjty/theoneprobe/network/NetworkTools.java#L24
You are aware that PacketBuffer.writeItem() exists? That has specially optimized network code that has less overhead then writing a CompoundNBT that is not even compressed? Instead of sending 1 varInt, 1 byte, and If NBT exist NBT you are sending a lot of extra data over. Including wrapper data that shouldn't even be synced?
Is a thing 1.16-1.18.
Just a service issue.