Package net.minecraft.commands.execution
Class ExecutionContext<T>
java.lang.Object
net.minecraft.commands.execution.ExecutionContext<T>
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Deque<CommandQueueEntry<T>> private intprivate intprivate final intprivate static final org.slf4j.Loggerprivate static final intprivate final List<CommandQueueEntry<T>> private final ProfilerFillerprivate booleanprivate TraceCallbacks -
Constructor Summary
ConstructorsConstructorDescriptionExecutionContext(int pCommandLimit, int pForkLimit, ProfilerFiller pProfiler) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private static <T extends ExecutionCommandSource<T>>
FramecreateTopFrame(ExecutionContext<T> pExecutionContext, CommandResultCallback pReturnValueConsumer) voiddiscardAtDepthOrHigher(int pDepth) intframeControlForDepth(int pDepth) private voidvoidprofiler()private voidstatic <T extends ExecutionCommandSource<T>>
voidqueueInitialCommandExecution(ExecutionContext<T> pExecutionContext, String pCommandInput, com.mojang.brigadier.context.ContextChain<T> pCommand, T pSource, CommandResultCallback pReturnValueConsumer) static <T extends ExecutionCommandSource<T>>
voidqueueInitialFunctionCall(ExecutionContext<T> pExecutionContext, InstantiatedFunction<T> pFunction, T pSource, CommandResultCallback pReturnValueConsumer) voidqueueNext(CommandQueueEntry<T> pEntry) voidtracer()voidtracer(TraceCallbacks pTracer)
-
Field Details
-
MAX_QUEUE_DEPTH
private static final int MAX_QUEUE_DEPTH- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
commandLimit
private final int commandLimit -
forkLimit
private final int forkLimit -
profiler
-
tracer
-
commandQuota
private int commandQuota -
queueOverflow
private boolean queueOverflow -
commandQueue
-
newTopCommands
-
currentFrameDepth
private int currentFrameDepth
-
-
Constructor Details
-
ExecutionContext
-
-
Method Details
-
createTopFrame
private static <T extends ExecutionCommandSource<T>> Frame createTopFrame(ExecutionContext<T> pExecutionContext, CommandResultCallback pReturnValueConsumer) -
queueInitialFunctionCall
public static <T extends ExecutionCommandSource<T>> void queueInitialFunctionCall(ExecutionContext<T> pExecutionContext, InstantiatedFunction<T> pFunction, T pSource, CommandResultCallback pReturnValueConsumer) -
queueInitialCommandExecution
public static <T extends ExecutionCommandSource<T>> void queueInitialCommandExecution(ExecutionContext<T> pExecutionContext, String pCommandInput, com.mojang.brigadier.context.ContextChain<T> pCommand, T pSource, CommandResultCallback pReturnValueConsumer) -
handleQueueOverflow
private void handleQueueOverflow() -
queueNext
-
discardAtDepthOrHigher
public void discardAtDepthOrHigher(int pDepth) -
frameControlForDepth
-
runCommandQueue
public void runCommandQueue() -
pushNewCommands
private void pushNewCommands() -
tracer
-
tracer
-
profiler
-
forkLimit
public int forkLimit() -
incrementCost
public void incrementCost() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-