mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Temporarily fix block count
This commit is contained in:
parent
9bf57b8c13
commit
4ec59b4bc9
@ -77,7 +77,8 @@ public class Section implements PublicCloneable<Section> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if the new block is air, used for counting none air blocks.
|
// Check if the new block is air, used for counting none air blocks.
|
||||||
final boolean isAir = Block.fromStateId(blockId).isAir();
|
// FIXME: once block data is working
|
||||||
|
final boolean isAir = blockId == 0;//Block.fromStateId(blockId).isAir();
|
||||||
|
|
||||||
// Change to palette value
|
// Change to palette value
|
||||||
blockId = getPaletteIndex(blockId);
|
blockId = getPaletteIndex(blockId);
|
||||||
@ -93,8 +94,10 @@ public class Section implements PublicCloneable<Section> {
|
|||||||
final long clear = MAGIC_MASKS[bitsPerEntry];
|
final long clear = MAGIC_MASKS[bitsPerEntry];
|
||||||
|
|
||||||
final long value = block >> bitIndex & clear;
|
final long value = block >> bitIndex & clear;
|
||||||
final boolean isCurrentAir = Block.fromStateId(
|
|
||||||
hasPalette ? paletteBlockMap.get((short) value) : (short) value).isAir();
|
// FIXME: once block data is working
|
||||||
|
final boolean isCurrentAir = (hasPalette ? paletteBlockMap.get((short) value) : (short) value) == 0;
|
||||||
|
//Block.fromStateId(hasPalette ? paletteBlockMap.get((short) value) : (short) value).isAir();
|
||||||
|
|
||||||
block |= clear << bitIndex;
|
block |= clear << bitIndex;
|
||||||
block ^= clear << bitIndex;
|
block ^= clear << bitIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user