Record Class Timeline.TimeMarkerInfo
java.lang.Object
java.lang.Record
net.minecraft.world.timeline.Timeline.TimeMarkerInfo
- Enclosing class:
Timeline
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Timeline.TimeMarkerInfo> private static final com.mojang.serialization.Codec<Timeline.TimeMarkerInfo> private final booleanThe field for theshowInCommandsrecord component.private final intThe field for theticksrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTimeMarkerInfo(int ticks, boolean showInCommands) Creates an instance of aTimeMarkerInforecord 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 theshowInCommandsrecord component.intticks()Returns the value of theticksrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ticks
private final int ticksThe field for theticksrecord component. -
showInCommands
private final boolean showInCommandsThe field for theshowInCommandsrecord component. -
FULL_CODEC
-
CODEC
-
-
Constructor Details
-
TimeMarkerInfo
private TimeMarkerInfo(int ticks, boolean showInCommands) Creates an instance of aTimeMarkerInforecord class.- Parameters:
ticks- the value for theticksrecord componentshowInCommands- the value for theshowInCommandsrecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
ticks
public int ticks()Returns the value of theticksrecord component.- Returns:
- the value of the
ticksrecord component
-
showInCommands
public boolean showInCommands()Returns the value of theshowInCommandsrecord component.- Returns:
- the value of the
showInCommandsrecord component
-