类 FunctionLoader

  • 所有已实现的接口:
    ResourceReloader

    public class FunctionLoader
    extends Object
    implements ResourceReloader
    Mappings:
    Namespace Name
    official xa
    intermediary net/minecraft/class_5349
    named net/minecraft/server/function/FunctionLoader
    • 字段详细资料

      • LOGGER

        private static final Logger LOGGER
        Mappings:
        Namespace Name Mixin selector
        official a Lxa;a:Lorg/apache/logging/log4j/Logger;
        intermediary field_25326 Lnet/minecraft/class_5349;field_25326:Lorg/apache/logging/log4j/Logger;
        named LOGGER Lnet/minecraft/server/function/FunctionLoader;LOGGER:Lorg/apache/logging/log4j/Logger;
      • field_33385

        private static final String field_33385
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official b Lxa;b:Ljava/lang/String;
        intermediary field_33385 Lnet/minecraft/class_5349;field_33385:Ljava/lang/String;
        named field_33385 Lnet/minecraft/server/function/FunctionLoader;field_33385:Ljava/lang/String;
      • PATH_PREFIX_LENGTH

        private static final int PATH_PREFIX_LENGTH
        Mappings:
        Namespace Name Mixin selector
        official c Lxa;c:I
        intermediary field_25327 Lnet/minecraft/class_5349;field_25327:I
        named PATH_PREFIX_LENGTH Lnet/minecraft/server/function/FunctionLoader;PATH_PREFIX_LENGTH:I
      • PATH_SUFFIX_LENGTH

        private static final int PATH_SUFFIX_LENGTH
        Mappings:
        Namespace Name Mixin selector
        official d Lxa;d:I
        intermediary field_25328 Lnet/minecraft/class_5349;field_25328:I
        named PATH_SUFFIX_LENGTH Lnet/minecraft/server/function/FunctionLoader;PATH_SUFFIX_LENGTH:I
      • functions

        private volatile Map<Identifier,​CommandFunction> functions
        Mappings:
        Namespace Name Mixin selector
        official e Lxa;e:Ljava/util/Map;
        intermediary field_25329 Lnet/minecraft/class_5349;field_25329:Ljava/util/Map;
        named functions Lnet/minecraft/server/function/FunctionLoader;functions:Ljava/util/Map;
      • tagLoader

        private final TagGroupLoader<CommandFunction> tagLoader
        Mappings:
        Namespace Name Mixin selector
        official f Lxa;f:Lafv;
        intermediary field_25330 Lnet/minecraft/class_5349;field_25330:Lnet/minecraft/class_3503;
        named tagLoader Lnet/minecraft/server/function/FunctionLoader;tagLoader:Lnet/minecraft/tag/TagGroupLoader;
      • tags

        private volatile TagGroup<CommandFunction> tags
        Mappings:
        Namespace Name Mixin selector
        official g Lxa;g:Laft;
        intermediary field_25801 Lnet/minecraft/class_5349;field_25801:Lnet/minecraft/class_5414;
        named tags Lnet/minecraft/server/function/FunctionLoader;tags:Lnet/minecraft/tag/TagGroup;
      • level

        private final int level
        Mappings:
        Namespace Name Mixin selector
        official h Lxa;h:I
        intermediary field_25331 Lnet/minecraft/class_5349;field_25331:I
        named level Lnet/minecraft/server/function/FunctionLoader;level:I
      • commandDispatcher

        private final com.mojang.brigadier.CommandDispatcher<ServerCommandSource> commandDispatcher
        Mappings:
        Namespace Name Mixin selector
        official i Lxa;i:Lcom/mojang/brigadier/CommandDispatcher;
        intermediary field_25332 Lnet/minecraft/class_5349;field_25332:Lcom/mojang/brigadier/CommandDispatcher;
        named commandDispatcher Lnet/minecraft/server/function/FunctionLoader;commandDispatcher:Lcom/mojang/brigadier/CommandDispatcher;
    • 构造器详细资料

      • FunctionLoader

        public FunctionLoader​(int level,
                              com.mojang.brigadier.CommandDispatcher<ServerCommandSource> commandDispatcher)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lxa;<init>(ILcom/mojang/brigadier/CommandDispatcher;)V
        intermediary <init> Lnet/minecraft/class_5349;<init>(ILcom/mojang/brigadier/CommandDispatcher;)V
        named <init> Lnet/minecraft/server/function/FunctionLoader;<init>(ILcom/mojang/brigadier/CommandDispatcher;)V
    • 方法详细资料

      • get

        public Optional<CommandFunction> get​(Identifier id)
        Mappings:
        Namespace Name Mixin selector
        official a Lxa;a(Lwp;)Ljava/util/Optional;
        intermediary method_29456 Lnet/minecraft/class_5349;method_29456(Lnet/minecraft/class_2960;)Ljava/util/Optional;
        named get Lnet/minecraft/server/function/FunctionLoader;get(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
      • getFunctions

        public Map<Identifier,​CommandFunction> getFunctions()
        Mappings:
        Namespace Name Mixin selector
        official a Lxa;a()Ljava/util/Map;
        intermediary method_29447 Lnet/minecraft/class_5349;method_29447()Ljava/util/Map;
        named getFunctions Lnet/minecraft/server/function/FunctionLoader;getFunctions()Ljava/util/Map;
      • getTags

        public TagGroup<CommandFunction> getTags()
        Mappings:
        Namespace Name Mixin selector
        official b Lxa;b()Laft;
        intermediary method_29458 Lnet/minecraft/class_5349;method_29458()Lnet/minecraft/class_5414;
        named getTags Lnet/minecraft/server/function/FunctionLoader;getTags()Lnet/minecraft/tag/TagGroup;
      • getOrCreateTag

        public Tag<CommandFunction> getOrCreateTag​(Identifier id)
        Mappings:
        Namespace Name Mixin selector
        official b Lxa;b(Lwp;)Lafs;
        intermediary method_29459 Lnet/minecraft/class_5349;method_29459(Lnet/minecraft/class_2960;)Lnet/minecraft/class_3494;
        named getOrCreateTag Lnet/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 of thenAcceptAsync.

        指定者:
        reload 在接口中 ResourceReloader
        参数:
        synchronizer - the synchronizer
        manager - the resource manager
        prepareProfiler - the profiler for prepare stage
        applyProfiler - the profiler for apply stage
        prepareExecutor - the executor for prepare stage
        applyExecutor - the executor for apply stage
        返回:
        a future for the reload
        另请参阅:
        ReloadableResourceManager.reload(Executor, Executor, CompletableFuture, List)
        Mappings:
        Namespace Name Mixin selector
        official a Ladg;a(Ladg$a;Ladl;Lapl;Lapl;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
        intermediary method_25931 Lnet/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 reload Lnet/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

        private static List<String> readLines​(ResourceManager resourceManager,
                                              Identifier id)
        Mappings:
        Namespace Name Mixin selector
        official a Lxa;a(Ladl;Lwp;)Ljava/util/List;
        intermediary method_29450 Lnet/minecraft/class_5349;method_29450(Lnet/minecraft/class_3300;Lnet/minecraft/class_2960;)Ljava/util/List;
        named readLines Lnet/minecraft/server/function/FunctionLoader;readLines(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/Identifier;)Ljava/util/List;