fix comment & make final int final
This commit is contained in:
parent
efa243386c
commit
5e0b333cfd
@ -114,10 +114,10 @@ public enum WorldScanner implements IWorldScanner {
|
|||||||
}
|
}
|
||||||
int yReal = y0 << 4;
|
int yReal = y0 << 4;
|
||||||
IBlockStateContainer bsc = (IBlockStateContainer) extendedblockstorage.getData();
|
IBlockStateContainer bsc = (IBlockStateContainer) extendedblockstorage.getData();
|
||||||
// the mapping of BlockStateContainer.getIndex from xyz to index is y << 8 | z << 4 | x;
|
// storageArray uses an optimized algorithm that's faster than getAt
|
||||||
// for better cache locality, iterate in that order
|
// creating this array and then using getAtPalette is faster than even getFast(int index)
|
||||||
int[] storage = bsc.storageArray();
|
int[] storage = bsc.storageArray();
|
||||||
int imax = 1 << 12;
|
final int imax = 1 << 12;
|
||||||
for (int i = 0; i < imax; i++) {
|
for (int i = 0; i < imax; i++) {
|
||||||
IBlockState state = bsc.getAtPalette(storage[i]);
|
IBlockState state = bsc.getAtPalette(storage[i]);
|
||||||
if (filter.has(state)) {
|
if (filter.has(state)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user