Class TimeCommand
java.lang.Object
net.minecraft.server.commands.TimeCommand
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DynamicCommandExceptionTypeprivate static final Dynamic2CommandExceptionTypeprivate static final Dynamic2CommandExceptionTypeprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <A extends ArgumentBuilder<CommandSourceStack, A>>
AaddClockNodes(CommandBuildContext context, A node, TimeCommand.ClockGetter clockGetter) private static intaddTime(CommandSourceStack source, Holder<WorldClock> clock, int time) private static Holder<WorldClock> getDefaultClock(CommandSourceStack source) private static intqueryGameTime(CommandSourceStack source) private static intqueryTime(CommandSourceStack source, Holder<WorldClock> clock) private static intqueryTimelineRepetitions(CommandSourceStack source, Holder<WorldClock> clock, Holder<Timeline> timeline) private static intqueryTimelineTicks(CommandSourceStack source, Holder<WorldClock> clock, Holder<Timeline> timeline) static voidregister(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) private static intsetPaused(CommandSourceStack source, Holder<WorldClock> clock, boolean paused) private static intsetRate(CommandSourceStack source, Holder<WorldClock> clock, float rate) private static intsetTimeToTimeMarker(CommandSourceStack source, Holder<WorldClock> clock, ResourceKey<ClockTimeMarker> timeMarkerId) private static intsetTotalTicks(CommandSourceStack source, Holder<WorldClock> clock, int totalTicks) private static CompletableFuture<Suggestions> suggestTimelines(CommandSourceStack source, SuggestionsBuilder builder, Holder<WorldClock> clock) private static CompletableFuture<Suggestions> suggestTimeMarkers(CommandSourceStack source, SuggestionsBuilder builder, Holder<WorldClock> clock) private static intwrapTime(long ticks)
-
Field Details
-
ERROR_NO_DEFAULT_CLOCK
-
ERROR_NO_TIME_MARKER_FOUND
-
ERROR_WRONG_TIMELINE_FOR_CLOCK
-
MAX_CLOCK_RATE
private static final int MAX_CLOCK_RATE- See Also:
-
-
Constructor Details
-
TimeCommand
public TimeCommand()
-
-
Method Details
-
register
public static void register(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
addClockNodes
private static <A extends ArgumentBuilder<CommandSourceStack, A>> A addClockNodes(CommandBuildContext context, A node, TimeCommand.ClockGetter clockGetter) -
suggestTimeMarkers
private static CompletableFuture<Suggestions> suggestTimeMarkers(CommandSourceStack source, SuggestionsBuilder builder, Holder<WorldClock> clock) -
suggestTimelines
private static CompletableFuture<Suggestions> suggestTimelines(CommandSourceStack source, SuggestionsBuilder builder, Holder<WorldClock> clock) -
queryGameTime
-
queryTime
-
queryTimelineTicks
private static int queryTimelineTicks(CommandSourceStack source, Holder<WorldClock> clock, Holder<Timeline> timeline) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
queryTimelineRepetitions
private static int queryTimelineRepetitions(CommandSourceStack source, Holder<WorldClock> clock, Holder<Timeline> timeline) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setTotalTicks
private static int setTotalTicks(CommandSourceStack source, Holder<WorldClock> clock, int totalTicks) -
addTime
-
setTimeToTimeMarker
private static int setTimeToTimeMarker(CommandSourceStack source, Holder<WorldClock> clock, ResourceKey<ClockTimeMarker> timeMarkerId) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setPaused
-
setRate
-
wrapTime
private static int wrapTime(long ticks) -
getDefaultClock
private static Holder<WorldClock> getDefaultClock(CommandSourceStack source) throws CommandSyntaxException - Throws:
CommandSyntaxException
-