public class FunctionManager extends java.lang.Object implements IResourceManagerReloadListener
Modifier and Type | Class and Description |
---|---|
static class |
FunctionManager.QueuedCommand |
IFutureReloadListener.IStage
Modifier and Type | Field and Description |
---|---|
private java.util.List<FunctionManager.QueuedCommand> |
commandChain |
private java.util.ArrayDeque<FunctionManager.QueuedCommand> |
commandQueue |
private java.util.Map<ResourceLocation,FunctionObject> |
functions |
private boolean |
isExecuting |
private static ResourceLocation |
LOAD_TAG_ID |
private boolean |
loadFunctionsRun |
private static org.apache.logging.log4j.Logger |
LOGGER |
static int |
PATH_PREFIX_LENGTH |
static int |
PATH_SUFFIX_LENGTH |
private MinecraftServer |
server |
private TagCollection<FunctionObject> |
tagCollection |
private static ResourceLocation |
TICK_TAG_ID |
private java.util.List<FunctionObject> |
tickFunctions |
Constructor and Description |
---|
FunctionManager(MinecraftServer p_i47920_1_) |
Modifier and Type | Method and Description |
---|---|
int |
execute(FunctionObject p_195447_1_,
CommandSource p_195447_2_) |
CommandSource |
func_223402_g() |
java.util.Optional<FunctionObject> |
get(ResourceLocation p_215361_1_) |
com.mojang.brigadier.CommandDispatcher<CommandSource> |
getCommandDispatcher() |
CommandSource |
getCommandSource() |
java.util.Map<ResourceLocation,FunctionObject> |
getFunctions() |
int |
getMaxCommandChainLength() |
MinecraftServer |
getServer() |
TagCollection<FunctionObject> |
getTagCollection() |
private FunctionObject |
load(FunctionObject function,
java.lang.Throwable error,
ResourceLocation id) |
void |
onResourceManagerReload(IResourceManager resourceManager) |
private static java.util.List<java.lang.String> |
readLines(IResourceManager p_195449_0_,
ResourceLocation p_195449_1_) |
void |
tick() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceType, reload
func_225594_i_
private static final org.apache.logging.log4j.Logger LOGGER
private static final ResourceLocation TICK_TAG_ID
private static final ResourceLocation LOAD_TAG_ID
public static final int PATH_PREFIX_LENGTH
public static final int PATH_SUFFIX_LENGTH
private final MinecraftServer server
private final java.util.Map<ResourceLocation,FunctionObject> functions
private boolean isExecuting
private final java.util.ArrayDeque<FunctionManager.QueuedCommand> commandQueue
private final java.util.List<FunctionManager.QueuedCommand> commandChain
private final TagCollection<FunctionObject> tagCollection
private final java.util.List<FunctionObject> tickFunctions
private boolean loadFunctionsRun
public FunctionManager(MinecraftServer p_i47920_1_)
public java.util.Optional<FunctionObject> get(ResourceLocation p_215361_1_)
public MinecraftServer getServer()
public int getMaxCommandChainLength()
public java.util.Map<ResourceLocation,FunctionObject> getFunctions()
public com.mojang.brigadier.CommandDispatcher<CommandSource> getCommandDispatcher()
public void tick()
public int execute(FunctionObject p_195447_1_, CommandSource p_195447_2_)
public void onResourceManagerReload(IResourceManager resourceManager)
onResourceManagerReload
in interface IResourceManagerReloadListener
@Nullable private FunctionObject load(FunctionObject function, @Nullable java.lang.Throwable error, ResourceLocation id)
private static java.util.List<java.lang.String> readLines(IResourceManager p_195449_0_, ResourceLocation p_195449_1_)
public CommandSource getCommandSource()
public CommandSource func_223402_g()
public TagCollection<FunctionObject> getTagCollection()