Package net.minecraft.world.entity
Record Class SpawnPlacements.Data
java.lang.Object
java.lang.Record
net.minecraft.world.entity.SpawnPlacements.Data
- Enclosing class:
SpawnPlacements
static record SpawnPlacements.Data(Heightmap.Types heightMap, SpawnPlacementType placement, SpawnPlacements.SpawnPredicate<?> predicate)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Heightmap.TypesThe field for theheightMaprecord component.private final SpawnPlacementTypeThe field for theplacementrecord component.private final SpawnPlacements.SpawnPredicate<?> The field for thepredicaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionData(Heightmap.Types heightMap, SpawnPlacementType placement, SpawnPlacements.SpawnPredicate<?> predicate) Creates an instance of aDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theheightMaprecord component.Returns the value of theplacementrecord component.Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
heightMap
The field for theheightMaprecord component. -
placement
The field for theplacementrecord component. -
predicate
The field for thepredicaterecord component.
-
-
Constructor Details
-
Data
Data(Heightmap.Types heightMap, SpawnPlacementType placement, SpawnPlacements.SpawnPredicate<?> predicate) Creates an instance of aDatarecord class.- Parameters:
heightMap- the value for theheightMaprecord componentplacement- the value for theplacementrecord componentpredicate- the value for thepredicaterecord 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). -
heightMap
Returns the value of theheightMaprecord component.- Returns:
- the value of the
heightMaprecord component
-
placement
Returns the value of theplacementrecord component.- Returns:
- the value of the
placementrecord component
-
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-