Key check
This commit is contained in:
parent
11c116618a
commit
637a5a25b2
2 changed files with 7 additions and 4 deletions
|
@ -367,7 +367,12 @@ public class BCLBiome {
|
||||||
public void setSurface(RuleSource surface) {
|
public void setSurface(RuleSource surface) {
|
||||||
this.surfaceInit = (actualBiome) -> {
|
this.surfaceInit = (actualBiome) -> {
|
||||||
ResourceKey key = BiomeAPI.getBiomeKey(actualBiome);
|
ResourceKey key = BiomeAPI.getBiomeKey(actualBiome);
|
||||||
|
if (key == null) {
|
||||||
|
BCLib.LOGGER.warning("BCL Biome " + biomeID + " don't have registry key!");
|
||||||
|
}
|
||||||
|
else {
|
||||||
BiomeAPI.addSurfaceRule(biomeID, SurfaceRules.ifTrue(SurfaceRules.isBiome(key), surface));
|
BiomeAPI.addSurfaceRule(biomeID, SurfaceRules.ifTrue(SurfaceRules.isBiome(key), surface));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,8 +420,7 @@ public class BCLBiome {
|
||||||
String group = this.configGroup();
|
String group = this.configGroup();
|
||||||
float chance = Configs.BIOMES_CONFIG.getFloat(group, "generation_chance", this.getGenChance());
|
float chance = Configs.BIOMES_CONFIG.getFloat(group, "generation_chance", this.getGenChance());
|
||||||
float fog = Configs.BIOMES_CONFIG.getFloat(group, "fog_density", this.getFogDensity());
|
float fog = Configs.BIOMES_CONFIG.getFloat(group, "fog_density", this.getFogDensity());
|
||||||
this.setGenChance(chance)
|
this.setGenChance(chance).setFogDensity(fog);
|
||||||
.setFogDensity(fog);
|
|
||||||
|
|
||||||
if (this.getEdge()!=null){
|
if (this.getEdge()!=null){
|
||||||
int edgeSize = Configs.BIOMES_CONFIG.getInt(group, "edge_size", this.getEdgeSize());
|
int edgeSize = Configs.BIOMES_CONFIG.getInt(group, "edge_size", this.getEdgeSize());
|
||||||
|
|
|
@ -2,7 +2,6 @@ package ru.bclib.world.generator;
|
||||||
|
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import ru.bclib.config.Configs;
|
import ru.bclib.config.Configs;
|
||||||
import ru.bclib.config.MainConfig;
|
|
||||||
|
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue