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$Entryintermediary net/minecraft/class_1317$class_1318official buk$anamed heightmapTypeintermediary comp_2253official anamed locationintermediary comp_2254official bnamed predicateintermediary comp_2255official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Heightmap.TypeThe field for theheightmapTyperecord component.private final SpawnLocationThe field for thelocationrecord component.private final SpawnRestriction.SpawnPredicate<?> The field for thepredicaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntry(Heightmap.Type heightmapType, SpawnLocation location, SpawnRestriction.SpawnPredicate<?> predicate) Creates an instance of aEntryrecord 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 theheightmapTyperecord component.location()Returns the value of thelocationrecord component.Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
heightmapType
The field for theheightmapTyperecord component. -
location
The field for thelocationrecord component. -
predicate
The field for thepredicaterecord component.
-
-
Constructor Details
-
Entry
Entry(Heightmap.Type heightmapType, SpawnLocation location, SpawnRestriction.SpawnPredicate<?> predicate) Creates an instance of aEntryrecord class.- Parameters:
heightmapType- the value for theheightmapTyperecord componentlocation- the value for thelocationrecord 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). -
heightmapType
Returns the value of theheightmapTyperecord component.- Returns:
- the value of the
heightmapTyperecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-