mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 07:28:19 +01:00
Better flow control
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
b3ee3e2345
commit
29a06487ce
@ -267,19 +267,19 @@ final class FlexiblePalette implements SpecializedPalette, Cloneable {
|
|||||||
consumer.accept(x, y, z, 0);
|
consumer.accept(x, y, z, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue;
|
} else {
|
||||||
}
|
int bitIndex = 0;
|
||||||
int bitIndex = 0;
|
for (; index < maxIndex; index++) {
|
||||||
for (; index < maxIndex; index++) {
|
final short paletteIndex = (short) (value >> bitIndex & magicMask);
|
||||||
final short paletteIndex = (short) (value >> bitIndex & magicMask);
|
if (paletteIndex != 0 || consumeEmpty) {
|
||||||
if (paletteIndex != 0 || consumeEmpty) {
|
final int result = ids != null ? ids[paletteIndex] : paletteIndex;
|
||||||
final int result = ids != null ? ids[paletteIndex] : paletteIndex;
|
final int y = index >> shiftedDimensionBitCount;
|
||||||
final int y = index >> shiftedDimensionBitCount;
|
final int z = index >> dimensionBitCount & dimensionMinus;
|
||||||
final int z = index >> dimensionBitCount & dimensionMinus;
|
final int x = index & dimensionMinus;
|
||||||
final int x = index & dimensionMinus;
|
consumer.accept(x, y, z, result);
|
||||||
consumer.accept(x, y, z, result);
|
}
|
||||||
|
bitIndex += bitsPerEntry;
|
||||||
}
|
}
|
||||||
bitIndex += bitsPerEntry;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user