IsolatedCall.java
net.minecraft.commands.execution.tasks.IsolatedCall
信息
- 全限定名:net.minecraft.commands.execution.tasks.IsolatedCall
- 类型:public class
- 包:net.minecraft.commands.execution.tasks
- 源码路径:src/main/java/net/minecraft/commands/execution/tasks/IsolatedCall.java
- 起始行号:L11
- 实现:EntryAction
- 职责:
TODO
字段/常量
-
taskProducer- 类型:
Consumer<ExecutionControl<T>> - 修饰符:
private final - 源码定位:
L12 - 说明:
TODO
- 类型:
-
output- 类型:
CommandResultCallback - 修饰符:
private final - 源码定位:
L13 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public IsolatedCall(Consumer<ExecutionControl<T>> taskOutput, CommandResultCallback output) @ L15
- 构造器名:IsolatedCall
- 源码定位:L15
- 修饰符:public
参数:
- taskOutput: Consumer<ExecutionControl
> - output: CommandResultCallback
说明:
TODO
方法
下面的方法块按源码顺序生成。
public void execute(ExecutionContext<T> context, Frame frame) @ L20
- 方法名:execute
- 源码定位:L20
- 返回类型:void
- 修饰符:public
参数:
- context: ExecutionContext
- frame: Frame
说明:
TODO
代码
public class IsolatedCall<T extends ExecutionCommandSource<T>> implements EntryAction<T> {
private final Consumer<ExecutionControl<T>> taskProducer;
private final CommandResultCallback output;
public IsolatedCall(Consumer<ExecutionControl<T>> taskOutput, CommandResultCallback output) {
this.taskProducer = taskOutput;
this.output = output;
}
@Override
public void execute(ExecutionContext<T> context, Frame frame) {
int newFrameDepth = frame.depth() + 1;
Frame newFrame = new Frame(newFrameDepth, this.output, context.frameControlForDepth(newFrameDepth));
this.taskProducer.accept(ExecutionControl.create(context, newFrame));
}
}引用的其他类
-
- 引用位置:
参数/字段
- 引用位置:
-
- 引用位置:
实现
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数/字段/方法调用 - 关联成员:
ExecutionControl.create()
- 引用位置:
-
- 引用位置:
参数/构造调用 - 关联成员:
Frame()
- 引用位置: