ServerboundDebugSubscriptionRequestPacket.java
net.minecraft.network.protocol.game.ServerboundDebugSubscriptionRequestPacket
信息
- 全限定名:net.minecraft.network.protocol.game.ServerboundDebugSubscriptionRequestPacket
- 类型:public record
- 包:net.minecraft.network.protocol.game
- 源码路径:src/main/java/net/minecraft/network/protocol/game/ServerboundDebugSubscriptionRequestPacket.java
- 起始行号:L13
- 实现:Packet
- 职责:
TODO
字段/常量
-
SET_STREAM_CODEC- 类型:
StreamCodec<RegistryFriendlyByteBuf,Set<DebugSubscription<?>>> - 修饰符:
private static final - 源码定位:
L14 - 说明:
TODO
- 类型:
-
STREAM_CODEC- 类型:
StreamCodec<RegistryFriendlyByteBuf,ServerboundDebugSubscriptionRequestPacket> - 修饰符:
public static final - 源码定位:
L18 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public PacketType<ServerboundDebugSubscriptionRequestPacket> type() @ L22
- 方法名:type
- 源码定位:L22
- 返回类型:PacketType
- 修饰符:public
参数:
- 无
说明:
TODO
public void handle(ServerGamePacketListener listener) @ L27
- 方法名:handle
- 源码定位:L27
- 返回类型:void
- 修饰符:public
参数:
- listener: ServerGamePacketListener
说明:
TODO
代码
public record ServerboundDebugSubscriptionRequestPacket(Set<DebugSubscription<?>> subscriptions) implements Packet<ServerGamePacketListener> {
private static final StreamCodec<RegistryFriendlyByteBuf, Set<DebugSubscription<?>>> SET_STREAM_CODEC = ByteBufCodecs.registry(
Registries.DEBUG_SUBSCRIPTION
)
.apply(ByteBufCodecs.collection(ReferenceOpenHashSet::new));
public static final StreamCodec<RegistryFriendlyByteBuf, ServerboundDebugSubscriptionRequestPacket> STREAM_CODEC = SET_STREAM_CODEC.map(
ServerboundDebugSubscriptionRequestPacket::new, ServerboundDebugSubscriptionRequestPacket::subscriptions
);
@Override
public PacketType<ServerboundDebugSubscriptionRequestPacket> type() {
return GamePacketTypes.SERVERBOUND_DEBUG_SUBSCRIPTION_REQUEST;
}
public void handle(ServerGamePacketListener listener) {
listener.handleDebugSubscriptionRequest(this);
}
}引用的其他类
-
- 引用位置:
字段
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
ByteBufCodecs.collection(), ByteBufCodecs.registry()
- 引用位置:
-
- 引用位置:
字段
- 引用位置:
-
- 引用位置:
实现
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
字段
- 引用位置: