public static class ConfigTemplates.StructureConfig
extends java.lang.Object
Constructor and Description |
---|
StructureConfig(net.minecraftforge.common.ForgeConfigSpec.Builder builder,
java.lang.String name) |
StructureConfig(net.minecraftforge.common.ForgeConfigSpec.Builder builder,
java.lang.String name,
double probability,
int spacing,
int offset) |
Modifier and Type | Method and Description |
---|---|
ConfigTemplates.StructureConfig |
biomes(boolean isWhitelist,
java.lang.String biomes) |
java.util.List<net.minecraft.util.ResourceLocation> |
getBiomes()
Gets the list of biomes for the filter.
|
java.lang.String |
getBiomeString()
Returns the biome filter for determining where the structure should be
allowed to generate.
|
java.util.List<net.minecraft.world.gen.DimensionSettings> |
getNoiseSettings()
Returns the dimension noise settings that this structure is allowed to
generate with.
|
java.lang.String |
getNoiseSettingsString()
Returns the dimension noise settings that this structure is allowed to
generate with.
|
int |
getOffset()
Gets the offset for the structure in chunks.
|
double |
getProbability()
Gets the probability for the structure to generate.
|
int |
getSpacing()
Gets the spacing for the structure in chunks.
|
java.util.Map<net.minecraft.entity.EntityClassification,java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners>> |
getSpawns()
Returns all spawn entries.
|
java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> |
getSpawnsForClassification(net.minecraft.entity.EntityClassification classification)
Returns the spawn list for the specific classification.
|
java.lang.String |
getSpawnsString(net.minecraft.entity.EntityClassification classification)
Returns the specific spawns string for the classification passed.
|
java.util.Map<net.minecraft.entity.EntityClassification,net.minecraftforge.common.ForgeConfigSpec.ConfigValue<java.lang.String>> |
getSpawnsStrings()
Returns all spawns strings as a map.
|
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.
|
boolean |
isBiomeAllowed(net.minecraft.util.RegistryKey<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.
|
boolean |
isBiomeAllowed(net.minecraft.util.ResourceLocation biome)
Checks if the input biome is or isn't in the biomes list depending on if you
use whitelist or blacklist mode.
|
boolean |
isWhitelist()
Gets the whitelist mode for picking what biomes a structure should generate
in.
|
ConfigTemplates.StructureConfig |
noiseSettings(net.minecraft.world.gen.DimensionSettings... noiseSettings) |
ConfigTemplates.StructureConfig |
noiseSettings(java.lang.String noiseSettings) |
ConfigTemplates.StructureConfig |
offset(int offset) |
java.util.List<net.minecraft.util.ResourceLocation> |
parseBiomes(java.lang.String key)
Reads the biomes and tags from the config string and assigns them to the
biomes list.
|
java.util.List<net.minecraft.world.gen.DimensionSettings> |
parseNoiseSettings(java.lang.String key)
Reads the dimension noise settings listed in the string and returns a list
containing their registered versions.
|
java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> |
parseSpawns(java.lang.String key)
Reads the spawns set from the string and puts them into a list.
|
ConfigTemplates.StructureConfig |
probability(double probability) |
ConfigTemplates.StructureConfig |
spacing(int spacing) |
ConfigTemplates.StructureConfig |
spawns(java.util.Map<net.minecraft.entity.EntityClassification,java.lang.String> spawns) |
public StructureConfig(net.minecraftforge.common.ForgeConfigSpec.Builder builder, java.lang.String name)
builder
- name
- public StructureConfig(net.minecraftforge.common.ForgeConfigSpec.Builder builder, java.lang.String name, double probability, int spacing, int offset)
builder
- name
- probability
- spacing
- offset
- public ConfigTemplates.StructureConfig probability(double probability)
public ConfigTemplates.StructureConfig spacing(int spacing)
public ConfigTemplates.StructureConfig offset(int offset)
public ConfigTemplates.StructureConfig biomes(boolean isWhitelist, java.lang.String biomes)
public ConfigTemplates.StructureConfig spawns(java.util.Map<net.minecraft.entity.EntityClassification,java.lang.String> spawns)
public ConfigTemplates.StructureConfig noiseSettings(java.lang.String noiseSettings)
public ConfigTemplates.StructureConfig noiseSettings(net.minecraft.world.gen.DimensionSettings... noiseSettings)
public double getProbability()
Double
public int getSpacing()
Integer
public int getOffset()
Integer
public boolean isWhitelist()
Boolean
public java.lang.String getBiomeString()
String
public java.util.List<net.minecraft.util.ResourceLocation> getBiomes()
isBiomeAllowed(Biome)
to use the
whitelist/blacklist setting.List
public java.util.Map<net.minecraft.entity.EntityClassification,net.minecraftforge.common.ForgeConfigSpec.ConfigValue<java.lang.String>> getSpawnsStrings()
Map
public java.lang.String getSpawnsString(net.minecraft.entity.EntityClassification classification)
getSpawnsForClassification(EntityClassification)
classification
- String
@Nullable public java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> getSpawnsForClassification(net.minecraft.entity.EntityClassification classification)
classification
- List
public java.util.Map<net.minecraft.entity.EntityClassification,java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners>> getSpawns()
Map
@Nullable public java.lang.String getNoiseSettingsString()
String
@Nullable public java.util.List<net.minecraft.world.gen.DimensionSettings> getNoiseSettings()
List
public boolean isBiomeAllowed(net.minecraft.world.biome.Biome biome)
biome
- Boolean
public boolean isBiomeAllowed(net.minecraft.util.RegistryKey<net.minecraft.world.biome.Biome> biome)
biome
- Boolean
public boolean isBiomeAllowed(net.minecraft.util.ResourceLocation biome)
biome
- Boolean
public java.util.List<net.minecraft.util.ResourceLocation> parseBiomes(java.lang.String key)
key
- List
public java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> parseSpawns(java.lang.String key)
key
- List
@Nullable public java.util.List<net.minecraft.world.gen.DimensionSettings> parseNoiseSettings(java.lang.String key)
key
- List