public class StructuresConfig extends Object
Modifier and Type | Field and Description |
---|---|
static com.mojang.serialization.Codec<StructuresConfig> |
CODEC |
static StrongholdConfig |
DEFAULT_STRONGHOLD
Default placement settings for the stronghold.
|
static ImmutableMap<StructureFeature<?>,StructureConfig> |
DEFAULT_STRUCTURES
Default placement settings for each known structure type.
|
private StrongholdConfig |
stronghold
Placement settings for the stronghold for this particular combination of settings,
may be null to disable placement of strongholds.
|
private Map<StructureFeature<?>,StructureConfig> |
structures |
Constructor and Description |
---|
StructuresConfig(boolean withStronghold)
Creates a new structure placement configuration with default values.
|
StructuresConfig(Optional<StrongholdConfig> stronghold,
Map<StructureFeature<?>,StructureConfig> structures) |
Modifier and Type | Method and Description |
---|---|
StructureConfig |
getForType(StructureFeature<?> structureType)
Gets the placement configuration for a specific structure type, or
a default placement if placement for the structure was not explicitly configured.
|
StrongholdConfig |
getStronghold() |
Map<StructureFeature<?>,StructureConfig> |
getStructures() |
public static final com.mojang.serialization.Codec<StructuresConfig> CODEC
public static final ImmutableMap<StructureFeature<?>,StructureConfig> DEFAULT_STRUCTURES
public static final StrongholdConfig DEFAULT_STRONGHOLD
private final Map<StructureFeature<?>,StructureConfig> structures
@Nullable private final StrongholdConfig stronghold
public StructuresConfig(Optional<StrongholdConfig> stronghold, Map<StructureFeature<?>,StructureConfig> structures)
public StructuresConfig(boolean withStronghold)
withStronghold
- determines if the default stronghold configuration should be includedpublic Map<StructureFeature<?>,StructureConfig> getStructures()
@Nullable public StructureConfig getForType(StructureFeature<?> structureType)
@Nullable public StrongholdConfig getStronghold()