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
Modifier and TypeFieldDescriptionprivate final Heightmap.Types
The field for theheightMap
record component.private final SpawnPlacementType
The field for theplacement
record component.private final SpawnPlacements.SpawnPredicate
<?> The field for thepredicate
record component. -
Constructor Summary
ConstructorDescriptionData
(Heightmap.Types heightMap, SpawnPlacementType placement, SpawnPlacements.SpawnPredicate<?> predicate) Creates an instance of aData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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 theheightMap
record component.Returns the value of theplacement
record component.Returns the value of thepredicate
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
heightMap
The field for theheightMap
record component. -
placement
The field for theplacement
record component. -
predicate
The field for thepredicate
record component.
-
-
Constructor Details
-
Data
Data(Heightmap.Types heightMap, SpawnPlacementType placement, SpawnPlacements.SpawnPredicate<?> predicate) Creates an instance of aData
record class.- Parameters:
heightMap
- the value for theheightMap
record componentplacement
- the value for theplacement
record componentpredicate
- the value for thepredicate
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)
. -
heightMap
Returns the value of theheightMap
record component.- Returns:
- the value of the
heightMap
record component
-
placement
Returns the value of theplacement
record component.- Returns:
- the value of the
placement
record component
-
predicate
Returns the value of thepredicate
record component.- Returns:
- the value of the
predicate
record component
-