mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
perform null check on biome in BorderMutator
This commit is contained in:
parent
9fe8ac7b32
commit
6bd0efbcf0
@ -42,7 +42,7 @@ public class BorderListMutator implements BiomeMutator {
|
|||||||
for(int zi = -1; zi <= 1; zi++) {
|
for(int zi = -1; zi <= 1; zi++) {
|
||||||
if(xi == 0 && zi == 0) continue;
|
if(xi == 0 && zi == 0) continue;
|
||||||
BiomeDelegate current = viewPoint.getBiome(xi, zi);
|
BiomeDelegate current = viewPoint.getBiome(xi, zi);
|
||||||
if(current.getTags().contains(border)) {
|
if(current != null && current.getTags().contains(border)) {
|
||||||
if(replace.containsKey(origin)) {
|
if(replace.containsKey(origin)) {
|
||||||
BiomeDelegate biome = replace.get(origin).get(noiseSampler, x, z, seed);
|
BiomeDelegate biome = replace.get(origin).get(noiseSampler, x, z, seed);
|
||||||
return biome.isSelf() ? origin : biome;
|
return biome.isSelf() ? origin : biome;
|
||||||
|
@ -38,7 +38,7 @@ public class BorderMutator implements BiomeMutator {
|
|||||||
for(int zi = -1; zi <= 1; zi++) {
|
for(int zi = -1; zi <= 1; zi++) {
|
||||||
if(xi == 0 && zi == 0) continue;
|
if(xi == 0 && zi == 0) continue;
|
||||||
BiomeDelegate current = viewPoint.getBiome(xi, zi);
|
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);
|
BiomeDelegate biome = replace.get(noiseSampler, x, z, seed);
|
||||||
return biome.isSelf() ? origin : biome;
|
return biome.isSelf() ? origin : biome;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user