use setflatblock

This commit is contained in:
creeper123123321 2019-10-19 15:35:34 -03:00
parent 005c91eb4d
commit 9ea6c34543
2 changed files with 2 additions and 3 deletions

View File

@ -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;

View File

@ -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);
} }