Record Class EntitySpawnRequest
java.lang.Object
java.lang.Record
net.minecraft.world.entity.EntitySpawnRequest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theignoreChecksrecord component.private final EntitySpawnReasonThe field for thereasonrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntitySpawnRequest(EntitySpawnReason reason, boolean ignoreChecks) Creates an instance of aEntitySpawnRequestrecord 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.booleanReturns the value of theignoreChecksrecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
reason
The field for thereasonrecord component. -
ignoreChecks
private final boolean ignoreChecksThe field for theignoreChecksrecord component.
-
-
Constructor Details
-
EntitySpawnRequest
Creates an instance of aEntitySpawnRequestrecord class.- Parameters:
reason- the value for thereasonrecord componentignoreChecks- the value for theignoreChecksrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
ignoreChecks
public boolean ignoreChecks()Returns the value of theignoreChecksrecord component.- Returns:
- the value of the
ignoreChecksrecord component
-