Fixed planet world border check on Z axis

This commit is contained in:
LemADEC 2016-08-07 18:18:11 +02:00
parent fd4916b7d5
commit 9e53014d83

View file

@ -49,7 +49,7 @@ public class Planet implements Cloneable {
*/
public int isInsideBorder(AxisAlignedBB aabb) {
double rangeX = Math.max(Math.abs(aabb.minX - dimensionCenterX), Math.abs(aabb.maxX - dimensionCenterX));
double rangeZ = Math.max(Math.abs(aabb.minX - dimensionCenterX), Math.abs(aabb.maxX - dimensionCenterX));
double rangeZ = Math.max(Math.abs(aabb.minZ - dimensionCenterZ), Math.abs(aabb.maxZ - dimensionCenterZ));
if ((rangeX <= borderSizeX) && (rangeZ <= borderSizeZ)) {
return 0;
}