Interface TimelineRegistryEntry.Builder
- All Superinterfaces:
RegistryBuilder<Timeline>, TimelineRegistryEntry
- Enclosing interface:
TimelineRegistryEntry
@NonExtendable
public static interface TimelineRegistryEntry.Builder
extends TimelineRegistryEntry, RegistryBuilder<Timeline>
A mutable builder for the
TimelineRegistryEntry plugins may change in applicable registry events.
The following values are required for each builder:
-
Nested Class Summary
Nested classes/interfaces inherited from interface TimelineRegistryEntry
TimelineRegistryEntry.Builder, TimelineRegistryEntry.TimeMarker -
Method Summary
Modifier and TypeMethodDescriptionaddTimeMarker(Key key, @NonNegative int ticks, boolean showInCommands) Adds or replaces a time marker on this timeline.Clears the timeline period.clock(TypedKey<WorldClock> clock) Sets the clock that drives this timeline.periodTicks(@Positive int periodTicks) Sets the timeline period.Methods inherited from interface TimelineRegistryEntry
clock, periodTicks, timeMarkers
-
Method Details
-
clock
@Contract(value="_ -> this", mutates="this") TimelineRegistryEntry.Builder clock(TypedKey<WorldClock> clock) Sets the clock that drives this timeline.- Parameters:
clock- the clock- Returns:
- this builder
-
periodTicks
@Contract(value="_ -> this", mutates="this") TimelineRegistryEntry.Builder periodTicks(@Positive int periodTicks) Sets the timeline period.- Parameters:
periodTicks- the period in ticks- Returns:
- this builder
-
clearPeriodTicks
Clears the timeline period.- Returns:
- this builder
-
addTimeMarker
@Contract(value="_, _, _ -> this", mutates="this") TimelineRegistryEntry.Builder addTimeMarker(Key key, @NonNegative int ticks, boolean showInCommands) Adds or replaces a time marker on this timeline.- Parameters:
key- the time marker keyticks- the marker tickshowInCommands- whether the marker should be suggested in commands- Returns:
- this builder
-