Warning when geodata block is not found.

This commit is contained in:
MobiusDev 2017-09-26 12:11:24 +00:00
parent 54cc890ab8
commit 8d7db0906c
5 changed files with 35 additions and 5 deletions

View File

@ -280,7 +280,13 @@ public class GeoEngine
*/
public final boolean hasGeoPos(int geoX, int geoY)
{
return getBlock(geoX, geoY).hasGeoPos();
final ABlock block = getBlock(geoX, geoY);
if (block == null) // NPE check
{
_log.warning("Cound not find geodata block at " + getWorldX(geoX) + ", " + getWorldY(geoY) + ".");
return false;
}
return block.hasGeoPos();
}
/**

View File

@ -280,7 +280,13 @@ public class GeoEngine
*/
public final boolean hasGeoPos(int geoX, int geoY)
{
return getBlock(geoX, geoY).hasGeoPos();
final ABlock block = getBlock(geoX, geoY);
if (block == null) // NPE check
{
_log.warning("Cound not find geodata block at " + getWorldX(geoX) + ", " + getWorldY(geoY) + ".");
return false;
}
return block.hasGeoPos();
}
/**

View File

@ -280,7 +280,13 @@ public class GeoEngine
*/
public final boolean hasGeoPos(int geoX, int geoY)
{
return getBlock(geoX, geoY).hasGeoPos();
final ABlock block = getBlock(geoX, geoY);
if (block == null) // NPE check
{
_log.warning("Cound not find geodata block at " + getWorldX(geoX) + ", " + getWorldY(geoY) + ".");
return false;
}
return block.hasGeoPos();
}
/**

View File

@ -278,7 +278,13 @@ public class GeoEngine
*/
public final boolean hasGeoPos(int geoX, int geoY)
{
return getBlock(geoX, geoY).hasGeoPos();
final ABlock block = getBlock(geoX, geoY);
if (block == null) // NPE check
{
_log.warning("Cound not find geodata block at " + getWorldX(geoX) + ", " + getWorldY(geoY) + ".");
return false;
}
return block.hasGeoPos();
}
/**

View File

@ -280,7 +280,13 @@ public class GeoEngine
*/
public final boolean hasGeoPos(int geoX, int geoY)
{
return getBlock(geoX, geoY).hasGeoPos();
final ABlock block = getBlock(geoX, geoY);
if (block == null) // NPE check
{
_log.warning("Cound not find geodata block at " + getWorldX(geoX) + ", " + getWorldY(geoY) + ".");
return false;
}
return block.hasGeoPos();
}
/**