RemoteSampleLogger.java
net.minecraft.util.debugchart.RemoteSampleLogger
信息
- 全限定名:net.minecraft.util.debugchart.RemoteSampleLogger
- 类型:public class
- 包:net.minecraft.util.debugchart
- 源码路径:src/main/java/net/minecraft/util/debugchart/RemoteSampleLogger.java
- 起始行号:L6
- 继承:AbstractSampleLogger
- 职责:
TODO
字段/常量
-
subscribers- 类型:
ServerDebugSubscribers - 修饰符:
private final - 源码定位:
L7 - 说明:
TODO
- 类型:
-
sampleType- 类型:
RemoteDebugSampleType - 修饰符:
private final - 源码定位:
L8 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public RemoteSampleLogger(int dimensions, ServerDebugSubscribers subscribers, RemoteDebugSampleType sampleType) @ L10
- 构造器名:RemoteSampleLogger
- 源码定位:L10
- 修饰符:public
参数:
- dimensions: int
- subscribers: ServerDebugSubscribers
- sampleType: RemoteDebugSampleType
说明:
TODO
public RemoteSampleLogger(int dimensions, ServerDebugSubscribers subscribers, RemoteDebugSampleType sampleType, long[] defaults) @ L14
- 构造器名:RemoteSampleLogger
- 源码定位:L14
- 修饰符:public
参数:
- dimensions: int
- subscribers: ServerDebugSubscribers
- sampleType: RemoteDebugSampleType
- defaults: long[]
说明:
TODO
方法
下面的方法块按源码顺序生成。
protected void useSample() @ L20
- 方法名:useSample
- 源码定位:L20
- 返回类型:void
- 修饰符:protected
参数:
- 无
说明:
TODO
代码
public class RemoteSampleLogger extends AbstractSampleLogger {
private final ServerDebugSubscribers subscribers;
private final RemoteDebugSampleType sampleType;
public RemoteSampleLogger(int dimensions, ServerDebugSubscribers subscribers, RemoteDebugSampleType sampleType) {
this(dimensions, subscribers, sampleType, new long[dimensions]);
}
public RemoteSampleLogger(int dimensions, ServerDebugSubscribers subscribers, RemoteDebugSampleType sampleType, long[] defaults) {
super(dimensions, defaults);
this.subscribers = subscribers;
this.sampleType = sampleType;
}
@Override
protected void useSample() {
if (this.subscribers.hasAnySubscriberFor(this.sampleType.subscription())) {
this.subscribers.broadcastToAll(this.sampleType.subscription(), new ClientboundDebugSamplePacket((long[])this.sample.clone(), this.sampleType));
}
}
}引用的其他类
-
- 引用位置:
构造调用 - 关联成员:
ClientboundDebugSamplePacket()
- 引用位置:
-
- 引用位置:
参数/字段
- 引用位置:
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
参数/字段
- 引用位置: