Interface TimeMarker
- All Superinterfaces:
Keyed, Registerable<TimeMarker>, Wrapper
@NullMarked
@AsOf("3.2.0")
public interface TimeMarker
extends Wrapper, Keyed, Registerable<TimeMarker>
Represents a time marker in a world clock.
- Since:
- 3.2.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResourceKeystatic final ResourceKeystatic final ResourceKeystatic final ResourceKeystatic final ResourceKeystatic final ResourceKey -
Method Summary
Modifier and TypeMethodDescriptionkey()The key of this time marker.static TimeMarkerof(ResourceKey key, int ticks) Creates a new time marker with the given key and ticks.static TimeMarkerof(ResourceKey key, int ticks, boolean showInCommands) Creates a new time marker with the given key, ticks, and showInCommands.booleanWhether this time marker should be shown in the /time command.intticks()The number of ticks this time marker represents.default TimeMarker.BuilderCreates a new builder with the same values as this time marker.Methods inherited from interface Registerable
registerMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Field Details
-
DAY
-
NOON
-
NIGHT
-
MIDNIGHT
-
WAKE_UP_FROM_SLEEP
-
ROLL_VILLAGE_SIEGE
-
-
Method Details
-
key
The key of this time marker. -
ticks
The number of ticks this time marker represents.- Returns:
- the number of ticks this time marker represents
- Since:
- 3.2.0
-
showInCommands
Whether this time marker should be shown in the /time command.- Returns:
- whether this time marker should be shown in the /time command
- Since:
- 3.2.0
-
toBuilder
Creates a new builder with the same values as this time marker.- Returns:
- a new builder with the same values
- Since:
- 3.3.0
-
of
Creates a new time marker with the given key and ticks.- Parameters:
key- the key of the time markerticks- the number of ticks the time marker represents- Returns:
- a new time marker with the given key and ticks
- Since:
- 3.2.0
-
of
Creates a new time marker with the given key, ticks, and showInCommands.- Parameters:
key- the key of the time markerticks- the number of ticks the time marker representsshowInCommands- whether the time marker should be shown in the /time command- Returns:
- a new time marker with the given key, ticks, and showInCommands
- Since:
- 3.2.0
-