ClientboundCodeOfConductPacket.java
net.minecraft.network.protocol.configuration.ClientboundCodeOfConductPacket
信息
- 全限定名:net.minecraft.network.protocol.configuration.ClientboundCodeOfConductPacket
- 类型:public record
- 包:net.minecraft.network.protocol.configuration
- 源码路径:src/main/java/net/minecraft/network/protocol/configuration/ClientboundCodeOfConductPacket.java
- 起始行号:L9
- 实现:Packet
- 职责:
TODO
字段/常量
STREAM_CODEC- 类型:
StreamCodec<ByteBuf,ClientboundCodeOfConductPacket> - 修饰符:
public static final - 源码定位:
L10 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public PacketType<ClientboundCodeOfConductPacket> type() @ L14
- 方法名:type
- 源码定位:L14
- 返回类型:PacketType
- 修饰符:public
参数:
- 无
说明:
TODO
public void handle(ClientConfigurationPacketListener listener) @ L19
- 方法名:handle
- 源码定位:L19
- 返回类型:void
- 修饰符:public
参数:
- listener: ClientConfigurationPacketListener
说明:
TODO
代码
public record ClientboundCodeOfConductPacket(String codeOfConduct) implements Packet<ClientConfigurationPacketListener> {
public static final StreamCodec<ByteBuf, ClientboundCodeOfConductPacket> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.STRING_UTF8, ClientboundCodeOfConductPacket::codeOfConduct, ClientboundCodeOfConductPacket::new
);
@Override
public PacketType<ClientboundCodeOfConductPacket> type() {
return ConfigurationPacketTypes.CLIENTBOUND_CODE_OF_CONDUCT;
}
public void handle(ClientConfigurationPacketListener listener) {
listener.handleCodeOfConduct(this);
}
}引用的其他类
-
- 引用位置:
字段/方法调用 - 关联成员:
StreamCodec.composite()
- 引用位置:
-
- 引用位置:
实现
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
ClientConfigurationPacketListener
- 引用位置:
参数
- 引用位置: