This commit is contained in:
kanesada2 2016-12-29 16:53:56 +09:00
parent a2bcce9ab1
commit a37ee09f17
2 changed files with 54 additions and 1 deletions

View File

@ -187,6 +187,17 @@ public class HashChunkletManager implements ChunkletManager {
int cx = x / 16; int cx = x / 16;
int cz = z / 16; int cz = z / 16;
int cy = y / 64; int cy = y / 64;
if(x < 0){
--cx;
}
if(z < 0){
--cz;
}
if(y < 0){
--cy;
}
String key = world.getName() + "," + cx + "," + cz + "," + cy; String key = world.getName() + "," + cx + "," + cz + "," + cy;
if (!store.containsKey(key)) { if (!store.containsKey(key)) {
@ -215,7 +226,17 @@ public class HashChunkletManager implements ChunkletManager {
int cx = x / 16; int cx = x / 16;
int cz = z / 16; int cz = z / 16;
int cy = y / 64; int cy = y / 64;
if(x < 0){
--cx;
}
if(z < 0){
--cz;
}
if(y < 0){
--cy;
}
int ix = Math.abs(x) % 16; int ix = Math.abs(x) % 16;
int iz = Math.abs(z) % 16; int iz = Math.abs(z) % 16;
int iy = Math.abs(y) % 64; int iy = Math.abs(y) % 64;
@ -248,6 +269,16 @@ public class HashChunkletManager implements ChunkletManager {
int cz = z / 16; int cz = z / 16;
int cy = y / 64; int cy = y / 64;
if(x < 0){
--cx;
}
if(z < 0){
--cz;
}
if(y < 0){
--cy;
}
int ix = Math.abs(x) % 16; int ix = Math.abs(x) % 16;
int iz = Math.abs(z) % 16; int iz = Math.abs(z) % 16;
int iy = Math.abs(y) % 64; int iy = Math.abs(y) % 64;

View File

@ -295,6 +295,14 @@ public class HashChunkManager implements ChunkManager {
int cx = x / 16; int cx = x / 16;
int cz = z / 16; int cz = z / 16;
if(x < 0){
--cx;
}
if(z < 0){
--cz;
}
String key = world.getName() + "," + cx + "," + cz; String key = world.getName() + "," + cx + "," + cz;
if (!store.containsKey(key)) { if (!store.containsKey(key)) {
@ -339,6 +347,13 @@ public class HashChunkManager implements ChunkManager {
int cx = x / 16; int cx = x / 16;
int cz = z / 16; int cz = z / 16;
if(x < 0){
--cx;
}
if(z < 0){
--cz;
}
int ix = Math.abs(x) % 16; int ix = Math.abs(x) % 16;
int iz = Math.abs(z) % 16; int iz = Math.abs(z) % 16;
@ -384,6 +399,13 @@ public class HashChunkManager implements ChunkManager {
int cx = x / 16; int cx = x / 16;
int cz = z / 16; int cz = z / 16;
if(x < 0){
--cx;
}
if(z < 0){
--cz;
}
int ix = Math.abs(x) % 16; int ix = Math.abs(x) % 16;
int iz = Math.abs(z) % 16; int iz = Math.abs(z) % 16;