Record Class TimerQueue.Event<T>
java.lang.Object
java.lang.Record
net.minecraft.world.level.timers.TimerQueue.Event<T>
- Enclosing class:
TimerQueue<T>
public static record TimerQueue.Event<T>(long triggerTime, UnsignedLong sequentialId, String id, TimerCallback<T> callback)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TimerCallback<T> The field for thecallbackrecord component.private final StringThe field for theidrecord component.private final UnsignedLongThe field for thesequentialIdrecord component.private final longThe field for thetriggerTimerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEvent(long triggerTime, UnsignedLong sequentialId, String id, TimerCallback<T> callback) Creates an instance of aEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncallback()Returns the value of thecallbackrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thesequentialIdrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetriggerTimerecord component.
-
Field Details
-
triggerTime
private final long triggerTimeThe field for thetriggerTimerecord component. -
sequentialId
The field for thesequentialIdrecord component. -
id
The field for theidrecord component. -
callback
The field for thecallbackrecord component.
-
-
Constructor Details
-
Event
Creates an instance of aEventrecord class.- Parameters:
triggerTime- the value for thetriggerTimerecord componentsequentialId- the value for thesequentialIdrecord componentid- the value for theidrecord componentcallback- the value for thecallbackrecord 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. -
triggerTime
public long triggerTime()Returns the value of thetriggerTimerecord component.- Returns:
- the value of the
triggerTimerecord component
-
sequentialId
Returns the value of thesequentialIdrecord component.- Returns:
- the value of the
sequentialIdrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
callback
Returns the value of thecallbackrecord component.- Returns:
- the value of the
callbackrecord component
-