Make sure we do not crash out

This commit is contained in:
Frank 2021-12-01 19:38:57 +01:00
parent 3801c44aab
commit 9f9849d9b0

View file

@ -49,7 +49,7 @@ public class HexBiomeMap implements BiomeMap {
@Override @Override
public BCLBiome getBiome(double x, double z) { public BCLBiome getBiome(double x, double z) {
BCLBiome BCLBiome = getRawBiome(x, z); BCLBiome BCLBiome = getRawBiome(x, z);
if (BCLBiome.getEdge() != null) { if (BCLBiome!=null && BCLBiome.getEdge() != null) {
float offset = scale * BCLBiome.getEdgeSize(); float offset = scale * BCLBiome.getEdgeSize();
for (byte i = 0; i < 8; i++) { for (byte i = 0; i < 8; i++) {
if (getRawBiome(x + offset * EDGE_CIRCLE_X[i], z + offset * EDGE_CIRCLE_Z[i]) != BCLBiome) { if (getRawBiome(x + offset * EDGE_CIRCLE_X[i], z + offset * EDGE_CIRCLE_Z[i]) != BCLBiome) {