Skip to content

Package net.minecraft.commands.execution.tasks

Part 1/1


BuildContexts

  • Full name: net.minecraft.commands.execution.tasks.BuildContexts
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/BuildContexts.java
  • Type: class
  • Modifiers: public

net.minecraft.commands.execution.tasks.BuildContexts#BuildContexts(String,ContextChain<T>)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:35
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BuildContexts ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: commandInput, command.

Parameters

  • String string
  • ContextChain<T> contextChain

ตัวอย่างใช้งาน

ContextChain<T> contextChain = ...;
BuildContexts instance = new BuildContexts("value", contextChain);

net.minecraft.commands.execution.tasks.BuildContexts#execute(T,List<T>,ExecutionContext<T>,Frame,ChainModifiers)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:40
  • Modifiers: protected
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: getStage(), profiler(), push(), forkLimit(), getTopContext(), isForked(), setForked(), getRedirectModifier(). สร้างออบเจ็กต์: ObjectArrayList<>, CommandQueueEntry<>, ExecuteCommand<>.

Parameters

  • T executionCommandSource
  • List<T> list
  • ExecutionContext<T> executionContext
  • Frame frame
  • ChainModifiers chainModifiers

ตัวอย่างใช้งาน

T executionCommandSource = ...;
List<T> list = ...;
ExecutionContext<T> executionContext = ...;
Frame frame = ...;
ChainModifiers chainModifiers = ...;
@Override
protected void execute(T executionCommandSource, List<T> list, ExecutionContext<T> executionContext, Frame frame, ChainModifiers chainModifiers) {
    super.execute(executionCommandSource, list, executionContext, frame, chainModifiers);
}

net.minecraft.commands.execution.tasks.BuildContexts#toString()

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:130
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ BuildContexts

ทำงานยังไง

คืนค่า: this.commandInput.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BuildContexts instance = ...;
String result = instance.toString();

net.minecraft.commands.execution.tasks.BuildContexts#traceCommandStart(ExecutionContext<T>,Frame)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:123
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ traceCommandStart ตาม implementation ของ BuildContexts

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: tracer(), onCommand(), depth().

Parameters

  • ExecutionContext<T> executionContext
  • Frame frame

ตัวอย่างใช้งาน

ExecutionContext<T> executionContext = ...;
Frame frame = ...;
@Override
protected void traceCommandStart(ExecutionContext<T> executionContext, Frame frame) {
    super.traceCommandStart(executionContext, frame);
}

BuildContexts$Continuation

  • Full name: net.minecraft.commands.execution.tasks.BuildContexts$Continuation
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/BuildContexts.java
  • Type: class
  • Modifiers: public static
  • Extends: BuildContexts<T>
  • Implements: EntryAction<T>

net.minecraft.commands.execution.tasks.BuildContexts$Continuation#Continuation(String,ContextChain<T>,ChainModifiers,T,List<T>)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:140
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BuildContexts.Continuation ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: originalSource, sources, modifiers.

Parameters

  • String string
  • ContextChain<T> contextChain
  • ChainModifiers chainModifiers
  • T executionCommandSource
  • List<T> list

ตัวอย่างใช้งาน

ContextChain<T> contextChain = ...;
ChainModifiers chainModifiers = ...;
T executionCommandSource = ...;
List<T> list = ...;
BuildContexts.Continuation instance = new BuildContexts.Continuation("value", contextChain, chainModifiers, executionCommandSource, list);

net.minecraft.commands.execution.tasks.BuildContexts$Continuation#execute(ExecutionContext<T>,Frame)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:147
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ExecutionContext<T> executionContext
  • Frame frame

ตัวอย่างใช้งาน

BuildContexts.Continuation instance = ...;
ExecutionContext<T> executionContext = ...;
Frame frame = ...;
instance.execute(executionContext, frame);

BuildContexts$TopLevel

  • Full name: net.minecraft.commands.execution.tasks.BuildContexts$TopLevel
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/BuildContexts.java
  • Type: class
  • Modifiers: public static
  • Extends: BuildContexts<T>
  • Implements: EntryAction<T>

net.minecraft.commands.execution.tasks.BuildContexts$TopLevel#execute(ExecutionContext<T>,Frame)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:161
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

เรียกต่อ: traceCommandStart(), of().

Parameters

  • ExecutionContext<T> executionContext
  • Frame frame

ตัวอย่างใช้งาน

BuildContexts.TopLevel instance = ...;
ExecutionContext<T> executionContext = ...;
Frame frame = ...;
instance.execute(executionContext, frame);

net.minecraft.commands.execution.tasks.BuildContexts$TopLevel#TopLevel(String,ContextChain<T>,T)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:156
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BuildContexts.TopLevel ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: source.

Parameters

  • String string
  • ContextChain<T> contextChain
  • T executionCommandSource

ตัวอย่างใช้งาน

ContextChain<T> contextChain = ...;
T executionCommandSource = ...;
BuildContexts.TopLevel instance = new BuildContexts.TopLevel("value", contextChain, executionCommandSource);

BuildContexts$Unbound

  • Full name: net.minecraft.commands.execution.tasks.BuildContexts$Unbound
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/BuildContexts.java
  • Type: class
  • Modifiers: public static
  • Extends: BuildContexts<T>
  • Implements: UnboundEntryAction<T>

net.minecraft.commands.execution.tasks.BuildContexts$Unbound#execute(T,ExecutionContext<T>,Frame)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:173
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

เรียกต่อ: traceCommandStart(), of().

Parameters

  • T executionCommandSource
  • ExecutionContext<T> executionContext
  • Frame frame

ตัวอย่างใช้งาน

BuildContexts.Unbound instance = ...;
T executionCommandSource = ...;
ExecutionContext<T> executionContext = ...;
Frame frame = ...;
instance.execute(executionCommandSource, executionContext, frame);

net.minecraft.commands.execution.tasks.BuildContexts$Unbound#Unbound(String,ContextChain<T>)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/BuildContexts.java:169
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BuildContexts.Unbound ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • String string
  • ContextChain<T> contextChain

ตัวอย่างใช้งาน

ContextChain<T> contextChain = ...;
BuildContexts.Unbound instance = new BuildContexts.Unbound("value", contextChain);

CallFunction

  • Full name: net.minecraft.commands.execution.tasks.CallFunction
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/CallFunction.java
  • Type: class
  • Modifiers: public
  • Implements: UnboundEntryAction<T>

net.minecraft.commands.execution.tasks.CallFunction#CallFunction(InstantiatedFunction<T>,CommandResultCallback,boolean)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/CallFunction.java:18
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ CallFunction ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: function, resultCallback, returnParentFrame.

Parameters

  • InstantiatedFunction<T> instantiatedFunction
  • CommandResultCallback commandResultCallback
  • boolean bl

ตัวอย่างใช้งาน

InstantiatedFunction<T> instantiatedFunction = ...;
CommandResultCallback commandResultCallback = ...;
CallFunction instance = new CallFunction(instantiatedFunction, commandResultCallback, true);

net.minecraft.commands.execution.tasks.CallFunction#execute(T,ExecutionContext<T>,Frame)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/CallFunction.java:24
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: incrementCost(), entries(), tracer(), onCall(), depth(), id(), size(), frameControl(). สร้างออบเจ็กต์: Frame, CommandQueueEntry<>.

Parameters

  • T executionCommandSource
  • ExecutionContext<T> executionContext
  • Frame frame

ตัวอย่างใช้งาน

CallFunction instance = ...;
T executionCommandSource = ...;
ExecutionContext<T> executionContext = ...;
Frame frame = ...;
instance.execute(executionCommandSource, executionContext, frame);

ContinuationTask

  • Full name: net.minecraft.commands.execution.tasks.ContinuationTask
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/ContinuationTask.java
  • Type: class
  • Modifiers: public
  • Implements: EntryAction<T>

net.minecraft.commands.execution.tasks.ContinuationTask#execute(ExecutionContext<T>,Frame)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/ContinuationTask.java:21
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), queueNext(), create(), size().

Parameters

  • ExecutionContext<T> executionContext
  • Frame frame

ตัวอย่างใช้งาน

ContinuationTask instance = ...;
ExecutionContext<T> executionContext = ...;
Frame frame = ...;
instance.execute(executionContext, frame);

net.minecraft.commands.execution.tasks.ContinuationTask#schedule(ExecutionContext<T>,Frame,List<P>,ContinuationTask.TaskProvider<T, P>)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/ContinuationTask.java:30
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ schedule ตาม implementation ของ ContinuationTask

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: size(), queueNext(), create(), get(). สร้างออบเจ็กต์: ContinuationTask<>.

Parameters

  • ExecutionContext<T> executionContext
  • Frame frame
  • List<P> list
  • ContinuationTask.TaskProvider<T, P> taskProvider

ตัวอย่างใช้งาน

ExecutionContext<T> executionContext = ...;
Frame frame = ...;
List<P> list = ...;
ContinuationTask.TaskProvider<T, P> taskProvider = ...;
ContinuationTask.schedule(executionContext, frame, list, taskProvider);

ContinuationTask$TaskProvider

  • Full name: net.minecraft.commands.execution.tasks.ContinuationTask$TaskProvider
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/ContinuationTask.java
  • Type: interface
  • Modifiers: public

net.minecraft.commands.execution.tasks.ContinuationTask$TaskProvider#create(Frame,P)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/ContinuationTask.java:49
  • Modifiers: ``
  • Return: CommandQueueEntry<T>

คืออะไร

สร้าง create

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • Frame frame
  • P object

ตัวอย่างใช้งาน

ContinuationTask.TaskProvider instance = ...;
Frame frame = ...;
P object = ...;
CommandQueueEntry<T> result = instance.create(frame, object);

ExecuteCommand

  • Full name: net.minecraft.commands.execution.tasks.ExecuteCommand
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/ExecuteCommand.java
  • Type: class
  • Modifiers: public
  • Implements: UnboundEntryAction<T>

net.minecraft.commands.execution.tasks.ExecuteCommand#execute(T,ExecutionContext<T>,Frame)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/ExecuteCommand.java:24
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการจัดการ exception. เรียกต่อ: profiler(), push(), incrementCost(), runExecutable(), resultConsumer(), isForked(), tracer(), onReturn().

Parameters

  • T executionCommandSource
  • ExecutionContext<T> executionContext
  • Frame frame

ตัวอย่างใช้งาน

ExecuteCommand instance = ...;
T executionCommandSource = ...;
ExecutionContext<T> executionContext = ...;
Frame frame = ...;
instance.execute(executionCommandSource, executionContext, frame);

net.minecraft.commands.execution.tasks.ExecuteCommand#ExecuteCommand(String,ChainModifiers,CommandContext<T>)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/ExecuteCommand.java:18
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ExecuteCommand ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: commandInput, modifiers, executionContext.

Parameters

  • String string
  • ChainModifiers chainModifiers
  • CommandContext<T> commandContext

ตัวอย่างใช้งาน

ChainModifiers chainModifiers = ...;
CommandContext<T> commandContext = ...;
ExecuteCommand instance = new ExecuteCommand("value", chainModifiers, commandContext);

FallthroughTask

  • Full name: net.minecraft.commands.execution.tasks.FallthroughTask
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/FallthroughTask.java
  • Type: class
  • Modifiers: public
  • Implements: EntryAction<T>

net.minecraft.commands.execution.tasks.FallthroughTask#execute(ExecutionContext<T>,Frame)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/FallthroughTask.java:15
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

เรียกต่อ: returnFailure(), discard().

Parameters

  • ExecutionContext<T> executionContext
  • Frame frame

ตัวอย่างใช้งาน

FallthroughTask instance = ...;
ExecutionContext<T> executionContext = ...;
Frame frame = ...;
instance.execute(executionContext, frame);

net.minecraft.commands.execution.tasks.FallthroughTask#instance()

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/FallthroughTask.java:11
  • Modifiers: public static
  • Return: EntryAction<T>

คืออะไร

ดำเนินการ instance ตาม implementation ของ FallthroughTask

ทำงานยังไง

คืนค่า: (EntryAction<T>)INSTANCE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

EntryAction<T> result = FallthroughTask.instance();

IsolatedCall

  • Full name: net.minecraft.commands.execution.tasks.IsolatedCall
  • Package: net.minecraft.commands.execution.tasks
  • Source: commonnet/minecraft/commands/execution/tasks/IsolatedCall.java
  • Type: class
  • Modifiers: public
  • Implements: EntryAction<T>

net.minecraft.commands.execution.tasks.IsolatedCall#execute(ExecutionContext<T>,Frame)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/IsolatedCall.java:20
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

เรียกต่อ: depth(), frameControlForDepth(), accept(), create(). สร้างออบเจ็กต์: Frame.

Parameters

  • ExecutionContext<T> executionContext
  • Frame frame

ตัวอย่างใช้งาน

IsolatedCall instance = ...;
ExecutionContext<T> executionContext = ...;
Frame frame = ...;
instance.execute(executionContext, frame);

net.minecraft.commands.execution.tasks.IsolatedCall#IsolatedCall(Consumer<ExecutionControl<T>>,CommandResultCallback)

  • Origin: common
  • Source: net/minecraft/commands/execution/tasks/IsolatedCall.java:15
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ IsolatedCall ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: taskProducer, output.

Parameters

  • Consumer<ExecutionControl<T>> consumer
  • CommandResultCallback commandResultCallback

ตัวอย่างใช้งาน

Consumer<ExecutionControl<T>> consumer = ...;
CommandResultCallback commandResultCallback = ...;
IsolatedCall instance = new IsolatedCall(consumer, commandResultCallback);