Package net.minecraft.world.ticks
Record Class ScheduledTick<T>
java.lang.Object
java.lang.Record
net.minecraft.world.ticks.ScheduledTick<T>
public record ScheduledTick<T>(T type, BlockPos pos, long triggerTick, TickPriority priority, long subTickOrder)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<ScheduledTick<?>> static final Comparator<ScheduledTick<?>> private final BlockPosThe field for theposrecord component.private final TickPriorityThe field for thepriorityrecord component.private final longThe field for thesubTickOrderrecord component.private final longThe field for thetriggerTickrecord component.private final TThe field for thetyperecord component.static final it.unimi.dsi.fastutil.Hash.Strategy<ScheduledTick<?>> -
Constructor Summary
ConstructorsConstructorDescriptionScheduledTick(T p_193383_, BlockPos p_193384_, long p_193385_, long p_193386_) ScheduledTick(T type, BlockPos pos, long triggerTick, TickPriority priority, long subTickOrder) Creates an instance of aScheduledTickrecord 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.pos()Returns the value of theposrecord component.priority()Returns the value of thepriorityrecord component.static <T> ScheduledTick<T> longReturns the value of thesubTickOrderrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetriggerTickrecord component.type()Returns the value of thetyperecord component.
-
Field Details
-
type
The field for thetyperecord component. -
pos
The field for theposrecord component. -
triggerTick
private final long triggerTickThe field for thetriggerTickrecord component. -
priority
The field for thepriorityrecord component. -
subTickOrder
private final long subTickOrderThe field for thesubTickOrderrecord component. -
DRAIN_ORDER
-
INTRA_TICK_DRAIN_ORDER
-
UNIQUE_TICK_HASH
-
-
Constructor Details
-
ScheduledTick
-
ScheduledTick
public ScheduledTick(T type, BlockPos pos, long triggerTick, TickPriority priority, long subTickOrder) Creates an instance of aScheduledTickrecord class.- Parameters:
type- the value for thetyperecord componentpos- the value for theposrecord componenttriggerTick- the value for thetriggerTickrecord componentpriority- the value for thepriorityrecord componentsubTickOrder- the value for thesubTickOrderrecord component
-
-
Method Details
-
probe
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
triggerTick
public long triggerTick()Returns the value of thetriggerTickrecord component.- Returns:
- the value of the
triggerTickrecord component
-
priority
Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
subTickOrder
public long subTickOrder()Returns the value of thesubTickOrderrecord component.- Returns:
- the value of the
subTickOrderrecord component
-