forked from xjboss/KCauldronX
Whoops, chunk coords stored in other order (fix #360)
This commit is contained in:
parent
7eba5f9dee
commit
ff7d6f4137
@ -13,7 +13,9 @@ public class VanillaChunkHashMap extends LongHashMap {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void add(long key, Object value) {
|
public void add(long key, Object value) {
|
||||||
manager.putChunk((Chunk) value);
|
final int z = (int) (key >>> 32);
|
||||||
|
final int x = (int) (key);
|
||||||
|
manager.putChunk((Chunk) value, x, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -23,15 +25,15 @@ public class VanillaChunkHashMap extends LongHashMap {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getValueByKey(long key) {
|
public Object getValueByKey(long key) {
|
||||||
final int x = (int) (key >>> 32);
|
final int z = (int) (key >>> 32);
|
||||||
final int z = (int) (key);
|
final int x = (int) (key);
|
||||||
return manager.getChunk(x, z);
|
return manager.getChunk(x, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object remove(long key) {
|
public Object remove(long key) {
|
||||||
final int x = (int) (key >>> 32);
|
final int z = (int) (key >>> 32);
|
||||||
final int z = (int) (key);
|
final int x = (int) (key);
|
||||||
return manager.remove(x, z);
|
return manager.remove(x, z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user