3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 08:10:09 +01:00

Don't unload the chunks twice (#350)

Dieser Commit ist enthalten in:
Mats 2016-04-13 13:25:41 +02:00 committet von Myles
Ursprung d11c18c024
Commit 1c9229a2fc

Datei anzeigen

@ -128,15 +128,11 @@ public class ChunkType extends PartialType<Chunk, ClientChunks> {
@Override
public void write(ByteBuf output, ClientChunks param, Chunk chunk) throws Exception {
if (chunk.isUnloadPacket()) {
output.clear();
Type.VAR_INT.write(output, 0x1D); // Unload packet ID
}
if (chunk.isUnloadPacket()) return;
// Write primary info
output.writeInt(chunk.getX());
output.writeInt(chunk.getZ());
if (chunk.isUnloadPacket()) return;
output.writeByte(chunk.isGroundUp() ? 0x01 : 0x00);
Type.VAR_INT.write(output, chunk.getPrimaryBitmask());