idk why I did &3

half fixes #769
This commit is contained in:
dordsor21 2020-12-16 12:34:54 +00:00
parent 6676d77aaa
commit e4709eb6dc
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
2 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ public class CharSetBlocks extends CharBlocks implements IChunkSet {
if (biomes == null) {
return null;
}
return biomes[(y >> 2) << 4 | (z & 3) << 2 | x & 3];
return biomes[(y >> 2) << 4 | (z >> 2) << 2 | x >> 2];
}
@Override
@ -90,7 +90,7 @@ public class CharSetBlocks extends CharBlocks implements IChunkSet {
if (biomes == null) {
biomes = new BiomeType[1024];
}
biomes[(y >> 2) << 4 | (z & 3) << 2 | x & 3] = biome;
biomes[(y >> 2) << 4 | (z >> 2) << 2 | x >> 2] = biome;
return true;
}

View File

@ -481,7 +481,7 @@ public class MCAChunk implements IChunk {
@Override
public BiomeType getBiomeType(int x, int y, int z) {
return this.biomes[(y >> 2) << 4 | (z & 3) << 2 | x & 3];
return this.biomes[(y >> 2) << 4 | (z >> 2) << 2 | x >> 2];
}
@Override
@ -505,7 +505,7 @@ public class MCAChunk implements IChunk {
@Override
public boolean setBiome(int x, int y, int z, BiomeType biome) {
setModified();
biomes[(y >> 2) << 4 | (z & 3) << 2 | x & 3] = biome;
biomes[(y >> 2) << 4 | (z >> 2) << 2 | x >> 2] = biome;
return true;
}