Package net.minecraft.entity
Record Class SpawnRestriction.Entry
java.lang.Object
java.lang.Record
net.minecraft.entity.SpawnRestriction.Entry
- Record Components:
heightmapType
-location
-predicate
-
- Enclosing class:
SpawnRestriction
private static record SpawnRestriction.Entry(Heightmap.Type heightmapType, SpawnLocation location, SpawnRestriction.SpawnPredicate<?> predicate)
extends Record
- Mappings:
Namespace Name named net/minecraft/entity/SpawnRestriction$Entry
intermediary net/minecraft/class_1317$class_1318
official bum$a
named heightmapType
intermediary comp_2253
official a
named location
intermediary comp_2254
official b
named predicate
intermediary comp_2255
official c
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Heightmap.Type
The field for theheightmapType
record component.private final SpawnLocation
The field for thelocation
record component.private final SpawnRestriction.SpawnPredicate
<?> The field for thepredicate
record component. -
Constructor Summary
ConstructorDescriptionEntry
(Heightmap.Type heightmapType, SpawnLocation location, SpawnRestriction.SpawnPredicate<?> predicate) Creates an instance of aEntry
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 theheightmapType
record component.location()
Returns the value of thelocation
record component.Returns the value of thepredicate
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
heightmapType
The field for theheightmapType
record component. -
location
The field for thelocation
record component. -
predicate
The field for thepredicate
record component.
-
-
Constructor Details
-
Entry
Entry(Heightmap.Type heightmapType, SpawnLocation location, SpawnRestriction.SpawnPredicate<?> predicate) Creates an instance of aEntry
record class.- Parameters:
heightmapType
- the value for theheightmapType
record componentlocation
- the value for thelocation
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)
. -
heightmapType
Returns the value of theheightmapType
record component.- Returns:
- the value of the
heightmapType
record component
-
location
Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
predicate
Returns the value of thepredicate
record component.- Returns:
- the value of the
predicate
record component
-