public static class ConfigTemplates.BiomeStructureConfig extends ConfigTemplates.StructureConfig
ConfigTemplates.StructureConfig
that allows allows stores what biomes a
structure should generate in. Use this setting in FMLCommonSetupEvent
to register the structure in the appropriate biomes.Constructor and Description |
---|
BiomeStructureConfig(net.minecraftforge.common.ForgeConfigSpec.Builder builder,
java.lang.String name,
double defaultProbability,
int defaultSpacing,
int defaultOffset,
java.lang.String defaultBiomesString) |
BiomeStructureConfig(net.minecraftforge.common.ForgeConfigSpec.Builder builder,
java.lang.String name,
double defaultProbability,
int defaultSpacing,
int defaultOffset,
java.lang.String defaultBiomesString,
boolean defaultIsWhitelist) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableList<net.minecraft.world.biome.Biome> |
getBiomes()
Gets the list of biomes for the filter.
Use isBiomeAllowed(Biome) to use the
whitelist/blacklist setting. |
boolean |
isBiomeAllowed(net.minecraft.world.biome.Biome biome)
Checks if the input biome is or isn't in the biomes list depending on if you
use whitelist or blacklist mode.
|
static com.google.common.collect.ImmutableList<net.minecraft.world.biome.Biome> |
parseBiomes(java.lang.String key) |
getOffset, getProbability, getSpacing
public BiomeStructureConfig(net.minecraftforge.common.ForgeConfigSpec.Builder builder, java.lang.String name, double defaultProbability, int defaultSpacing, int defaultOffset, java.lang.String defaultBiomesString, boolean defaultIsWhitelist)
builder
- name
- defaultProbability
- defaultSpacing
- defaultOffset
- defaultBiomesString
- defaultIsWhitelist
- : true by defaultpublic BiomeStructureConfig(net.minecraftforge.common.ForgeConfigSpec.Builder builder, java.lang.String name, double defaultProbability, int defaultSpacing, int defaultOffset, java.lang.String defaultBiomesString)
builder
- name
- defaultProbability
- defaultSpacing
- defaultOffset
- defaultBiomesString
- : Entered as a comma separated string of resource
locations. You can put spaces, but you don't need to. Ex: "plains,
minecraft:swamp, biomesoplenty:origin_beach"public com.google.common.collect.ImmutableList<net.minecraft.world.biome.Biome> getBiomes()
isBiomeAllowed(Biome)
to use the
whitelist/blacklist setting.ImmutableList
public boolean isBiomeAllowed(net.minecraft.world.biome.Biome biome)
biome
- public static com.google.common.collect.ImmutableList<net.minecraft.world.biome.Biome> parseBiomes(java.lang.String key)