Worldborder check fixed.
This commit is contained in:
parent
2178dac54f
commit
dd1b6d76c8
@ -199,9 +199,9 @@ public class FLocation implements Serializable {
|
|||||||
Chunk chunk = border.getCenter().getChunk();
|
Chunk chunk = border.getCenter().getChunk();
|
||||||
|
|
||||||
int lim = FLocation.chunkToRegion((int) border.getSize()) - buffer;
|
int lim = FLocation.chunkToRegion((int) border.getSize()) - buffer;
|
||||||
int diffX = Math.abs(chunk.getX() - x);
|
int diffX = chunk.getX() - x;
|
||||||
int diffZ = Math.abs(chunk.getZ() - z);
|
int diffZ = chunk.getZ() - z;
|
||||||
return diffX > lim || diffZ > lim;
|
return diffX > lim || diffZ > lim || -diffX > lim - 1 || -diffZ > lim - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------//
|
//----------------------------------------------//
|
||||||
|
Loading…
Reference in New Issue
Block a user