Fix a duping bug that uses a coordinate error. Fixes #2979 and fixes #3429.

This commit is contained in:
Glitchfinder 2018-04-15 10:19:31 -07:00
parent 6876f192de
commit be2de1d487
2 changed files with 17 additions and 15 deletions

View File

@ -184,9 +184,10 @@ public class HashChunkletManager implements ChunkletManager {
@Override
public boolean isTrue(int x, int y, int z, World world) {
int cx = x / 16;
int cz = z / 16;
int cy = y / 64;
int cx = x >> 4;
int cz = z >> 4;
int cy = y >> 6;
String key = world.getName() + "," + cx + "," + cz + "," + cy;
if (!store.containsKey(key)) {
@ -212,9 +213,9 @@ public class HashChunkletManager implements ChunkletManager {
@Override
public void setTrue(int x, int y, int z, World world) {
int cx = x / 16;
int cz = z / 16;
int cy = y / 64;
int cx = x >> 4;
int cz = z >> 4;
int cy = y >> 6;
int ix = Math.abs(x) % 16;
int iz = Math.abs(z) % 16;
@ -244,9 +245,9 @@ public class HashChunkletManager implements ChunkletManager {
@Override
public void setFalse(int x, int y, int z, World world) {
int cx = x / 16;
int cz = z / 16;
int cy = y / 64;
int cx = x >> 4;
int cz = z >> 4;
int cy = y >> 6;
int ix = Math.abs(x) % 16;
int iz = Math.abs(z) % 16;

View File

@ -293,8 +293,9 @@ public class HashChunkManager implements ChunkManager {
return false;
}
int cx = x / 16;
int cz = z / 16;
int cx = x >> 4;
int cz = z >> 4;
String key = world.getName() + "," + cx + "," + cz;
if (!store.containsKey(key)) {
@ -336,8 +337,8 @@ public class HashChunkManager implements ChunkManager {
return;
}
int cx = x / 16;
int cz = z / 16;
int cx = x >> 4;
int cz = z >> 4;
int ix = Math.abs(x) % 16;
int iz = Math.abs(z) % 16;
@ -382,8 +383,8 @@ public class HashChunkManager implements ChunkManager {
return;
}
int cx = x / 16;
int cz = z / 16;
int cx = x >> 4;
int cz = z >> 4;
int ix = Math.abs(x) % 16;
int iz = Math.abs(z) % 16;