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 - bwe$a- named - heightmapType- intermediary - comp_2253- official - a- named - location- intermediary - comp_2254- official - b- named - predicate- intermediary - comp_2255- official - c
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionEntry(Heightmap.Type heightmapType, SpawnLocation location, SpawnRestriction.SpawnPredicate<?> predicate) Creates an instance of aEntryrecord class.
- 
Method SummaryModifier 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- 
heightmapTypeThe field for theheightmapTyperecord component.
- 
locationThe field for thelocationrecord component.
- 
predicateThe field for thepredicaterecord component.
 
- 
- 
Constructor Details- 
EntryEntry(Heightmap.Type heightmapType, SpawnLocation location, SpawnRestriction.SpawnPredicate<?> predicate) Creates an instance of aEntryrecord class.- Parameters:
- heightmapType- the value for the- heightmapTyperecord component
- location- the value for the- locationrecord component
- predicate- the value for the- predicaterecord 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).
- 
heightmapTypeReturns the value of theheightmapTyperecord component.- Returns:
- the value of the heightmapTyperecord component
 
- 
locationReturns the value of thelocationrecord component.- Returns:
- the value of the locationrecord component
 
- 
predicateReturns the value of thepredicaterecord component.- Returns:
- the value of the predicaterecord component
 
 
-