perform null check on biome in BorderMutator

This commit is contained in:
dfsek 2022-01-28 22:49:40 -07:00
parent 9fe8ac7b32
commit 6bd0efbcf0
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ public class BorderListMutator implements BiomeMutator {
for(int zi = -1; zi <= 1; zi++) {
if(xi == 0 && zi == 0) continue;
BiomeDelegate current = viewPoint.getBiome(xi, zi);
if(current.getTags().contains(border)) {
if(current != null && current.getTags().contains(border)) {
if(replace.containsKey(origin)) {
BiomeDelegate biome = replace.get(origin).get(noiseSampler, x, z, seed);
return biome.isSelf() ? origin : biome;

View File

@ -38,7 +38,7 @@ public class BorderMutator implements BiomeMutator {
for(int zi = -1; zi <= 1; zi++) {
if(xi == 0 && zi == 0) continue;
BiomeDelegate current = viewPoint.getBiome(xi, zi);
if(current.getTags().contains(border)) {
if(current != null && current.getTags().contains(border)) {
BiomeDelegate biome = replace.get(noiseSampler, x, z, seed);
return biome.isSelf() ? origin : biome;
}