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
Modifier and TypeFieldDescriptionstatic final Comparator<ScheduledTick<?>>
static final Comparator<ScheduledTick<?>>
private final BlockPos
The field for thepos
record component.private final TickPriority
The field for thepriority
record component.private final long
The field for thesubTickOrder
record component.private final long
The field for thetriggerTick
record component.private final T
The field for thetype
record component.static final it.unimi.dsi.fastutil.Hash.Strategy<ScheduledTick<?>>
-
Constructor Summary
ConstructorDescriptionScheduledTick
(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 aScheduledTick
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.pos()
Returns the value of thepos
record component.priority()
Returns the value of thepriority
record component.static <T> ScheduledTick<T>
long
Returns the value of thesubTickOrder
record component.final String
toString()
Returns a string representation of this record class.long
Returns the value of thetriggerTick
record component.type()
Returns the value of thetype
record component.
-
Field Details
-
type
The field for thetype
record component. -
pos
The field for thepos
record component. -
triggerTick
private final long triggerTickThe field for thetriggerTick
record component. -
priority
The field for thepriority
record component. -
subTickOrder
private final long subTickOrderThe field for thesubTickOrder
record 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 aScheduledTick
record class.- Parameters:
type
- the value for thetype
record componentpos
- the value for thepos
record componenttriggerTick
- the value for thetriggerTick
record componentpriority
- the value for thepriority
record componentsubTickOrder
- the value for thesubTickOrder
record 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 thetype
record component.- Returns:
- the value of the
type
record component
-
pos
Returns the value of thepos
record component.- Returns:
- the value of the
pos
record component
-
triggerTick
public long triggerTick()Returns the value of thetriggerTick
record component.- Returns:
- the value of the
triggerTick
record component
-
priority
Returns the value of thepriority
record component.- Returns:
- the value of the
priority
record component
-
subTickOrder
public long subTickOrder()Returns the value of thesubTickOrder
record component.- Returns:
- the value of the
subTickOrder
record component
-