Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChunkPacketProcessor.fromMapPacket() throws "Field index out of bounds" #47

Open
maxosprojects opened this issue Nov 11, 2017 · 1 comment

Comments

@maxosprojects
Copy link

maxosprojects commented Nov 11, 2017

Hi,

I've been trying to replace certain blocks with other blocks (e.g. disguise TNT as Wool).
When calling ChunkPacketProcessor.fromMapPacket() it throws "Field index out of bounds" exception.
I've looked at the source and I see that it tries to access a field that isn't in PacketPlayOutMapChunk:

processor.extraMask = ints.read(3);  // packet.d;

PacketPlayOutMapChunk contains only 3 int fields.

I tried to figure out which server version PacketWrapper is supposed to be used with and can't find that information anywhere.
Also, i checked PacketPlayOutMapChunk in all versions from 1.12 back to 1.8 and wasn't able to spot more that 3 int fields in any of them.

I'm trying it on 1.12

After having spent some time looking at the protocol ( http://wiki.vg/Chunk_Format ) and PacketWrapper I have couple of questions:

  1. Which version(s) does PacketWrapper support?
  2. How hard would be to fix fromMapPacket() ? If not hard then how soon it can be fixed?
  3. Alternatively, would it it possible to describe how to fix it? I tried to figure out the purpose of extraMask in ChunkPacketProcessor and fail to find any reference to it in the protocol
@konsolas
Copy link

I don't think ChunkPacketProcessor has been updated since 1.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants