perform null check on biome in BorderMutator

This commit is contained in:
dfsek committed 2022-01-28 22:49:40 -07:00
1 parent 9fe8ac7b32
commit 6bd0efbcf0
2 files changed
+2 -2

No files matched your search

@@ -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;
@@ -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;
}