Record Class StructureSpawnOverride
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.StructureSpawnOverride
public record StructureSpawnOverride(StructureSpawnOverride.BoundingBoxType boundingBox, WeightedRandomList<MobSpawnSettings.SpawnerData> spawns)
extends Record
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final StructureSpawnOverride.BoundingBoxTypeThe field for theboundingBoxrecord component.static final com.mojang.serialization.Codec<StructureSpawnOverride>private final WeightedRandomList<MobSpawnSettings.SpawnerData>The field for thespawnsrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionStructureSpawnOverride(StructureSpawnOverride.BoundingBoxType boundingBox, WeightedRandomList<MobSpawnSettings.SpawnerData> spawns) Creates an instance of aStructureSpawnOverriderecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of theboundingBoxrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.spawns()Returns the value of thespawnsrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
boundingBoxThe field for theboundingBoxrecord component.
- 
spawnsThe field for thespawnsrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
StructureSpawnOverridepublic StructureSpawnOverride(StructureSpawnOverride.BoundingBoxType boundingBox, WeightedRandomList<MobSpawnSettings.SpawnerData> spawns) Creates an instance of aStructureSpawnOverriderecord class.- Parameters:
- boundingBox- the value for the- boundingBoxrecord component
- spawns- the value for the- spawnsrecord component
 
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
boundingBoxReturns the value of theboundingBoxrecord component.- Returns:
- the value of the boundingBoxrecord component
 
- 
spawnsReturns the value of thespawnsrecord component.- Returns:
- the value of the spawnsrecord component
 
 
-