public class FunctionLoader extends Object implements ResourceReloadListener
ResourceReloadListener.Synchronizer
Modifier and Type | Field and Description |
---|---|
private com.mojang.brigadier.CommandDispatcher<ServerCommandSource> |
commandDispatcher |
private Map<Identifier,CommandFunction> |
functions |
private int |
level |
private static Logger |
LOGGER |
private static int |
PATH_PREFIX_LENGTH |
private static int |
PATH_SUFFIX_LENGTH |
private TagGroupLoader<CommandFunction> |
tagLoader |
private TagGroup<CommandFunction> |
tags |
Constructor and Description |
---|
FunctionLoader(int level,
com.mojang.brigadier.CommandDispatcher<ServerCommandSource> commandDispatcher) |
Modifier and Type | Method and Description |
---|---|
Optional<CommandFunction> |
get(Identifier id) |
Map<Identifier,CommandFunction> |
getFunctions() |
Tag<CommandFunction> |
getOrCreateTag(Identifier id) |
TagGroup<CommandFunction> |
getTags() |
private static List<String> |
readLines(ResourceManager resourceManager,
Identifier id) |
CompletableFuture<Void> |
reload(ResourceReloadListener.Synchronizer synchronizer,
ResourceManager manager,
Profiler prepareProfiler,
Profiler applyProfiler,
Executor prepareExecutor,
Executor applyExecutor) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
private static final Logger LOGGER
private static final int PATH_PREFIX_LENGTH
private static final int PATH_SUFFIX_LENGTH
private volatile Map<Identifier,CommandFunction> functions
private final TagGroupLoader<CommandFunction> tagLoader
private volatile TagGroup<CommandFunction> tags
private final int level
private final com.mojang.brigadier.CommandDispatcher<ServerCommandSource> commandDispatcher
public FunctionLoader(int level, com.mojang.brigadier.CommandDispatcher<ServerCommandSource> commandDispatcher)
public Optional<CommandFunction> get(Identifier id)
public Map<Identifier,CommandFunction> getFunctions()
public TagGroup<CommandFunction> getTags()
public Tag<CommandFunction> getOrCreateTag(Identifier id)
public CompletableFuture<Void> reload(ResourceReloadListener.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor)
reload
in interface ResourceReloadListener
private static List<String> readLines(ResourceManager resourceManager, Identifier id)