mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-01-22 23:41:27 +01:00
use setflatblock
This commit is contained in:
parent
005c91eb4d
commit
9ea6c34543
@ -43,8 +43,7 @@ public class ChunkSectionType1_13 extends Type<ChunkSection> {
|
|||||||
blockData[i] = buffer.readLong();
|
blockData[i] = buffer.readLong();
|
||||||
}
|
}
|
||||||
CompactArrayUtil.iterateCompactArray(bitsPerBlock, ChunkSection.SIZE, blockData,
|
CompactArrayUtil.iterateCompactArray(bitsPerBlock, ChunkSection.SIZE, blockData,
|
||||||
bitsPerBlock == GLOBAL_PALETTE ? (i, val) -> chunkSection.setBlock(i, val >> 4, val & 0xF)
|
bitsPerBlock == GLOBAL_PALETTE ? chunkSection::setFlatBlock : chunkSection::setPaletteIndex);
|
||||||
: chunkSection::setPaletteIndex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return chunkSection;
|
return chunkSection;
|
||||||
|
@ -52,7 +52,7 @@ public class ChunkSectionType1_9 extends Type<ChunkSection> {
|
|||||||
blockData[i] = buffer.readLong();
|
blockData[i] = buffer.readLong();
|
||||||
}
|
}
|
||||||
CompactArrayUtil.iterateCompactArray(bitsPerBlock, ChunkSection.SIZE, blockData,
|
CompactArrayUtil.iterateCompactArray(bitsPerBlock, ChunkSection.SIZE, blockData,
|
||||||
bitsPerBlock == GLOBAL_PALETTE ? (i, val) -> chunkSection.setBlock(i, val >> 4, val & 0xF)
|
bitsPerBlock == GLOBAL_PALETTE ? chunkSection::setFlatBlock
|
||||||
: chunkSection::setPaletteIndex);
|
: chunkSection::setPaletteIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user