Package net.minecraft.server.function
Class FunctionLoader
java.lang.Object
net.minecraft.server.function.FunctionLoader
- All Implemented Interfaces:
ResourceReloader
- Mappings:
Namespace Name official xhintermediary net/minecraft/class_5349named net/minecraft/server/function/FunctionLoader
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.mojang.brigadier.CommandDispatcher<ServerCommandSource>private Map<Identifier,CommandFunction>private intprivate static Loggerprivate static intprivate static Stringprivate static intprivate TagGroupLoader<CommandFunction>private TagGroup<CommandFunction> -
Constructor Summary
ConstructorsConstructorDescriptionFunctionLoader(int level, com.mojang.brigadier.CommandDispatcher<ServerCommandSource> commandDispatcher) -
Method Summary
Modifier and TypeMethodDescriptionget(Identifier id)getOrCreateTag(Identifier id)getTags()readLines(ResourceManager resourceManager, Identifier id)reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor)Performs a reload.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourceReloader
getName
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official aLxh;a:Lorg/apache/logging/log4j/Logger;intermediary field_25326Lnet/minecraft/class_5349;field_25326:Lorg/apache/logging/log4j/Logger;named LOGGERLnet/minecraft/server/function/FunctionLoader;LOGGER:Lorg/apache/logging/log4j/Logger;
-
PATH_SUFFIX
- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official bLxh;b:Ljava/lang/String;intermediary field_33385Lnet/minecraft/class_5349;field_33385:Ljava/lang/String;named PATH_SUFFIXLnet/minecraft/server/function/FunctionLoader;PATH_SUFFIX:Ljava/lang/String;
-
PATH_PREFIX_LENGTH
private static final int PATH_PREFIX_LENGTH- Mappings:
Namespace Name Mixin selector official cLxh;c:Iintermediary field_25327Lnet/minecraft/class_5349;field_25327:Inamed PATH_PREFIX_LENGTHLnet/minecraft/server/function/FunctionLoader;PATH_PREFIX_LENGTH:I
-
PATH_SUFFIX_LENGTH
private static final int PATH_SUFFIX_LENGTH- Mappings:
Namespace Name Mixin selector official dLxh;d:Iintermediary field_25328Lnet/minecraft/class_5349;field_25328:Inamed PATH_SUFFIX_LENGTHLnet/minecraft/server/function/FunctionLoader;PATH_SUFFIX_LENGTH:I
-
functions
- Mappings:
Namespace Name Mixin selector official eLxh;e:Ljava/util/Map;intermediary field_25329Lnet/minecraft/class_5349;field_25329:Ljava/util/Map;named functionsLnet/minecraft/server/function/FunctionLoader;functions:Ljava/util/Map;
-
tagLoader
- Mappings:
Namespace Name Mixin selector official fLxh;f:Lagd;intermediary field_25330Lnet/minecraft/class_5349;field_25330:Lnet/minecraft/class_3503;named tagLoaderLnet/minecraft/server/function/FunctionLoader;tagLoader:Lnet/minecraft/tag/TagGroupLoader;
-
tags
- Mappings:
Namespace Name Mixin selector official gLxh;g:Lagb;intermediary field_25801Lnet/minecraft/class_5349;field_25801:Lnet/minecraft/class_5414;named tagsLnet/minecraft/server/function/FunctionLoader;tags:Lnet/minecraft/tag/TagGroup;
-
level
private final int level- Mappings:
Namespace Name Mixin selector official hLxh;h:Iintermediary field_25331Lnet/minecraft/class_5349;field_25331:Inamed levelLnet/minecraft/server/function/FunctionLoader;level:I
-
commandDispatcher
- Mappings:
Namespace Name Mixin selector official iLxh;i:Lcom/mojang/brigadier/CommandDispatcher;intermediary field_25332Lnet/minecraft/class_5349;field_25332:Lcom/mojang/brigadier/CommandDispatcher;named commandDispatcherLnet/minecraft/server/function/FunctionLoader;commandDispatcher:Lcom/mojang/brigadier/CommandDispatcher;
-
-
Constructor Details
-
FunctionLoader
public FunctionLoader(int level, com.mojang.brigadier.CommandDispatcher<ServerCommandSource> commandDispatcher)- Mappings:
Namespace Name Mixin selector official <init>Lxh;<init>(ILcom/mojang/brigadier/CommandDispatcher;)Vintermediary <init>Lnet/minecraft/class_5349;<init>(ILcom/mojang/brigadier/CommandDispatcher;)Vnamed <init>Lnet/minecraft/server/function/FunctionLoader;<init>(ILcom/mojang/brigadier/CommandDispatcher;)V
-
-
Method Details
-
get
- Mappings:
Namespace Name Mixin selector official aLxh;a(Lww;)Ljava/util/Optional;intermediary method_29456Lnet/minecraft/class_5349;method_29456(Lnet/minecraft/class_2960;)Ljava/util/Optional;named getLnet/minecraft/server/function/FunctionLoader;get(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
-
getFunctions
- Mappings:
Namespace Name Mixin selector official aLxh;a()Ljava/util/Map;intermediary method_29447Lnet/minecraft/class_5349;method_29447()Ljava/util/Map;named getFunctionsLnet/minecraft/server/function/FunctionLoader;getFunctions()Ljava/util/Map;
-
getTags
- Mappings:
Namespace Name Mixin selector official bLxh;b()Lagb;intermediary method_29458Lnet/minecraft/class_5349;method_29458()Lnet/minecraft/class_5414;named getTagsLnet/minecraft/server/function/FunctionLoader;getTags()Lnet/minecraft/tag/TagGroup;
-
getOrCreateTag
- Mappings:
Namespace Name Mixin selector official bLxh;b(Lww;)Laga;intermediary method_29459Lnet/minecraft/class_5349;method_29459(Lnet/minecraft/class_2960;)Lnet/minecraft/class_3494;named getOrCreateTagLnet/minecraft/server/function/FunctionLoader;getOrCreateTag(Lnet/minecraft/util/Identifier;)Lnet/minecraft/tag/Tag;
-
reload
public CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor)Performs a reload. Returns a future that is completed when the reload is completed.In a reload, there is a prepare stage and an apply stage. For the prepare stage, you should create completable futures with CompletableFuture.supplyAsync(..., prepareExecutor) to ensure the prepare actions are done with the prepare executor. Then, you should have a completable future for all the prepared actions, and call combinedPrepare.thenCompose(synchronizer::waitFor) to notify the
synchronizer. Finally, you should run CompletableFuture.thenAcceptAsync(..., applyExecutor) for apply actions. In the end, returns the result ofthenAcceptAsync.- Specified by:
reloadin interfaceResourceReloader- Parameters:
synchronizer- the synchronizermanager- the resource managerprepareProfiler- the profiler for prepare stageapplyProfiler- the profiler for apply stageprepareExecutor- the executor for prepare stageapplyExecutor- the executor for apply stage- Returns:
- a future for the reload
- See Also:
ReloadableResourceManager.reload(Executor, Executor, CompletableFuture, List)- Mappings:
Namespace Name Mixin selector official aLado;a(Lado$a;Ladt;Lapu;Lapu;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;intermediary method_25931Lnet/minecraft/class_3302;method_25931(Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;Lnet/minecraft/class_3695;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;named reloadLnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Synchronizer;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;Lnet/minecraft/util/profiler/Profiler;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
readLines
- Mappings:
Namespace Name Mixin selector official aLxh;a(Ladt;Lww;)Ljava/util/List;intermediary method_29450Lnet/minecraft/class_5349;method_29450(Lnet/minecraft/class_3300;Lnet/minecraft/class_2960;)Ljava/util/List;named readLinesLnet/minecraft/server/function/FunctionLoader;readLines(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/Identifier;)Ljava/util/List;
-