Package net.minecraft.world.ticks
Record Class SavedTick<T>
java.lang.Object
java.lang.Record
net.minecraft.world.ticks.SavedTick<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thedelayrecord component.private final BlockPosThe field for theposrecord component.private final TickPriorityThe field for thepriorityrecord component.private final TThe field for thetyperecord component.static final it.unimi.dsi.fastutil.Hash.Strategy<SavedTick<?>> -
Constructor Summary
ConstructorsConstructorDescriptionSavedTick(T type, BlockPos pos, int delay, TickPriority priority) Creates an instance of aSavedTickrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<SavedTick<T>> codec(com.mojang.serialization.Codec<T> pCodec) intdelay()Returns the value of thedelayrecord component.final booleanIndicates whether some other object is "equal to" this one.filterTickListForChunk(List<SavedTick<T>> pTickList, ChunkPos pChunkPos) 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> SavedTick<T> final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.unpack(long pGameTime, long pSubTickOrder)
-
Field Details
-
type
The field for thetyperecord component. -
pos
The field for theposrecord component. -
delay
private final int delayThe field for thedelayrecord component. -
priority
The field for thepriorityrecord component. -
UNIQUE_TICK_HASH
-
-
Constructor Details
-
SavedTick
Creates an instance of aSavedTickrecord class.- Parameters:
type- the value for thetyperecord componentpos- the value for theposrecord componentdelay- the value for thedelayrecord componentpriority- the value for thepriorityrecord component
-
-
Method Details
-
codec
public static <T> com.mojang.serialization.Codec<SavedTick<T>> codec(com.mojang.serialization.Codec<T> pCodec) -
filterTickListForChunk
-
unpack
-
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
-
delay
public int delay()Returns the value of thedelayrecord component.- Returns:
- the value of the
delayrecord component
-
priority
Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-