ServerboundAcceptCodeOfConductPacket.java

net.minecraft.network.protocol.configuration.ServerboundAcceptCodeOfConductPacket

信息

  • 全限定名:net.minecraft.network.protocol.configuration.ServerboundAcceptCodeOfConductPacket
  • 类型:public record
  • 包:net.minecraft.network.protocol.configuration
  • 源码路径:src/main/java/net/minecraft/network/protocol/configuration/ServerboundAcceptCodeOfConductPacket.java
  • 起始行号:L8
  • 实现:Packet
  • 职责:

    TODO

字段/常量

  • INSTANCE

    • 类型: ServerboundAcceptCodeOfConductPacket
    • 修饰符: public static final
    • 源码定位: L9
    • 说明:

      TODO

  • STREAM_CODEC

    • 类型: StreamCodec<ByteBuf,ServerboundAcceptCodeOfConductPacket>
    • 修饰符: public static final
    • 源码定位: L10
    • 说明:

      TODO

内部类/嵌套类型

构造器

方法

下面的方法块按源码顺序生成。

public PacketType<ServerboundAcceptCodeOfConductPacket> type() @ L12

  • 方法名:type
  • 源码定位:L12
  • 返回类型:PacketType
  • 修饰符:public

参数:

说明:

TODO

public void handle(ServerConfigurationPacketListener listener) @ L17

  • 方法名:handle
  • 源码定位:L17
  • 返回类型:void
  • 修饰符:public

参数:

  • listener: ServerConfigurationPacketListener

说明:

TODO

代码

public record ServerboundAcceptCodeOfConductPacket() implements Packet<ServerConfigurationPacketListener> {
    public static final ServerboundAcceptCodeOfConductPacket INSTANCE = new ServerboundAcceptCodeOfConductPacket();
    public static final StreamCodec<ByteBuf, ServerboundAcceptCodeOfConductPacket> STREAM_CODEC = StreamCodec.unit(INSTANCE);
 
    @Override
    public PacketType<ServerboundAcceptCodeOfConductPacket> type() {
        return ConfigurationPacketTypes.SERVERBOUND_ACCEPT_CODE_OF_CONDUCT;
    }
 
    public void handle(ServerConfigurationPacketListener listener) {
        listener.handleAcceptCodeOfConduct(this);
    }
}

引用的其他类