Record Class Structure.StructureSettings
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.Structure.StructureSettings
- Enclosing class:
- Structure
public static record Structure.StructureSettings(HolderSet<Biome> biomes, Map<MobCategory,StructureSpawnOverride> spawnOverrides, GenerationStep.Decoration step, TerrainAdjustment terrainAdaptation)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionThe field for thebiomes
record component.static final com.mojang.serialization.MapCodec<Structure.StructureSettings>
private final Map<MobCategory,
StructureSpawnOverride> The field for thespawnOverrides
record component.private final GenerationStep.Decoration
The field for thestep
record component.private final TerrainAdjustment
The field for theterrainAdaptation
record component. -
Constructor Summary
ConstructorDescriptionStructureSettings
(HolderSet<Biome> biomes, Map<MobCategory, StructureSpawnOverride> spawnOverrides, GenerationStep.Decoration step, TerrainAdjustment terrainAdaptation) Creates an instance of aStructureSettings
record class. -
Method Summary
Modifier and TypeMethodDescriptionbiomes()
Returns the value of thebiomes
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thespawnOverrides
record component.step()
Returns the value of thestep
record component.Returns the value of theterrainAdaptation
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
biomes
The field for thebiomes
record component. -
spawnOverrides
The field for thespawnOverrides
record component. -
step
The field for thestep
record component. -
terrainAdaptation
The field for theterrainAdaptation
record component. -
CODEC
-
-
Constructor Details
-
StructureSettings
public StructureSettings(HolderSet<Biome> biomes, Map<MobCategory, StructureSpawnOverride> spawnOverrides, GenerationStep.Decoration step, TerrainAdjustment terrainAdaptation) Creates an instance of aStructureSettings
record class.- Parameters:
biomes
- the value for thebiomes
record componentspawnOverrides
- the value for thespawnOverrides
record componentstep
- the value for thestep
record componentterrainAdaptation
- the value for theterrainAdaptation
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
biomes
Returns the value of thebiomes
record component.- Returns:
- the value of the
biomes
record component
-
spawnOverrides
Returns the value of thespawnOverrides
record component.- Returns:
- the value of the
spawnOverrides
record component
-
step
Returns the value of thestep
record component.- Returns:
- the value of the
step
record component
-
terrainAdaptation
Returns the value of theterrainAdaptation
record component.- Returns:
- the value of the
terrainAdaptation
record component
-