Record Class ClockTimeMarkerImpl
java.lang.Object
java.lang.Record
net.minestom.server.world.clock.ClockTimeMarkerImpl
- All Implemented Interfaces:
ClockTimeMarker
public record ClockTimeMarkerImpl(RegistryKey<WorldClock> clock, int ticks, @Nullable Integer periodTicks, boolean showInCommands)
extends Record
implements ClockTimeMarker
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RegistryKey<ClockTimeMarker> static final RegistryKey<ClockTimeMarker> static final RegistryKey<ClockTimeMarker> static final RegistryKey<ClockTimeMarker> static final RegistryKey<ClockTimeMarker> static final RegistryKey<ClockTimeMarker> static final RegistryKey<ClockTimeMarker> Fields inherited from interface ClockTimeMarker
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionClockTimeMarkerImpl(RegistryKey<WorldClock> clock, int ticks, @Nullable Integer periodTicks, boolean showInCommands) Creates an instance of aClockTimeMarkerImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionclock()Returns the value of theclockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theperiodTicksrecord component.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
-
CLOCK_TIME_MARKER
-
DAY
-
NOON
-
NIGHT
-
MIDNIGHT
-
WAKE_UP_FROM_SLEEP
-
ROLL_VILLAGE_SIEGE
-
-
Constructor Details
-
ClockTimeMarkerImpl
public ClockTimeMarkerImpl(RegistryKey<WorldClock> clock, int ticks, @Nullable @Nullable Integer periodTicks, boolean showInCommands) Creates an instance of aClockTimeMarkerImplrecord class.- Parameters:
clock- the value for theclockrecord componentticks- the value for theticksrecord componentperiodTicks- the value for theperiodTicksrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
clock
Returns the value of theclockrecord component.- Specified by:
clockin interfaceClockTimeMarker- Returns:
- the value of the
clockrecord component
-
ticks
public int ticks()Returns the value of theticksrecord component.- Specified by:
ticksin interfaceClockTimeMarker- Returns:
- the value of the
ticksrecord component
-
periodTicks
Returns the value of theperiodTicksrecord component.- Specified by:
periodTicksin interfaceClockTimeMarker- Returns:
- the value of the
periodTicksrecord component
-
showInCommands
public boolean showInCommands()Returns the value of theshowInCommandsrecord component.- Specified by:
showInCommandsin interfaceClockTimeMarker- Returns:
- the value of the
showInCommandsrecord component
-