-
-
Save Techdaan/23d125f24c1669a9eaca092b05fdcb77 to your computer and use it in GitHub Desktop.
WorldAreaType
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void decode(ByteBuf buffer) { | |
for (int opcode = buffer.readUnsignedByte(); opcode != 0; opcode = buffer.readUnsignedByte()) { | |
if (opcode == 2) { // No clue | |
op1 = buffer.readMedium(); | |
} else if (opcode == 3) { // Seem to be regions | |
CoordGrid first = new CoordGrid(buffer.readInt()); | |
CoordGrid second = new CoordGrid(buffer.readInt()); | |
} else if (opcode == 4) { // Seem to be chunks | |
CoordGrid first = new CoordGrid(buffer.readInt()); | |
CoordGrid second = new CoordGrid(buffer.readInt()); | |
} else { | |
throw new IllegalArgumentException("Unknown WorldAreaType opcode '" + opcode + "'"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment