mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-05 10:29:45 +01:00
Fix reading the wrong block if palette only has one entry
This commit is contained in:
parent
3243c0c36e
commit
faa6965df3
@ -194,6 +194,7 @@ public int getSectionY() {
|
||||
}
|
||||
|
||||
public BlockState getBlockState(int x, int y, int z) {
|
||||
if (palette.length == 1) return palette[0];
|
||||
if (blocks.length == 0) return BlockState.AIR;
|
||||
|
||||
x &= 0xF; y &= 0xF; z &= 0xF; // Math.floorMod(pos.getX(), 16)
|
||||
|
@ -196,6 +196,7 @@ public int getSectionY() {
|
||||
}
|
||||
|
||||
public BlockState getBlockState(int x, int y, int z) {
|
||||
if (palette.length == 1) return palette[0];
|
||||
if (blocks.length == 0) return BlockState.AIR;
|
||||
|
||||
x &= 0xF; y &= 0xF; z &= 0xF; // Math.floorMod(pos.getX(), 16)
|
||||
|
@ -230,8 +230,8 @@ public int getSectionY() {
|
||||
}
|
||||
|
||||
public BlockState getBlockState(int x, int y, int z) {
|
||||
if (blocks.length == 0) return BlockState.AIR;
|
||||
if (palette.length == 1) return palette[0];
|
||||
if (blocks.length == 0) return BlockState.AIR;
|
||||
|
||||
x &= 0xF; y &= 0xF; z &= 0xF; // Math.floorMod(pos.getX(), 16)
|
||||
|
||||
|
@ -231,8 +231,8 @@ public int getSectionY() {
|
||||
}
|
||||
|
||||
public BlockState getBlockState(int x, int y, int z) {
|
||||
if (blocks.length == 0) return BlockState.AIR;
|
||||
if (blockPalette.length == 1) return blockPalette[0];
|
||||
if (blocks.length == 0) return BlockState.AIR;
|
||||
|
||||
x &= 0xF; y &= 0xF; z &= 0xF; // Math.floorMod(pos.getX(), 16)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user