Class PacketEncoder

All Implemented Interfaces:
ChannelHandler, ChannelOutboundHandler

public class PacketEncoder extends MessageToByteEncoder<Packet<?>>
Mappings:
Namespace Name
official um
intermediary net/minecraft/class_2545
named net/minecraft/network/handler/PacketEncoder
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Lum;a:Lorg/slf4j/Logger;
      intermediary field_11721 Lnet/minecraft/class_2545;field_11721:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/network/handler/PacketEncoder;LOGGER:Lorg/slf4j/Logger;
    • protocolKey

      private final AttributeKey<NetworkState.PacketHandler<?>> protocolKey
      Mappings:
      Namespace Name Mixin selector
      official b Lum;b:Lio/netty/util/AttributeKey;
      intermediary field_45678 Lnet/minecraft/class_2545;field_45678:Lio/netty/util/AttributeKey;
      named protocolKey Lnet/minecraft/network/handler/PacketEncoder;protocolKey:Lio/netty/util/AttributeKey;
  • Constructor Details

    • PacketEncoder

      public PacketEncoder(AttributeKey<NetworkState.PacketHandler<?>> protocolKey)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lum;<init>(Lio/netty/util/AttributeKey;)V
      intermediary <init> Lnet/minecraft/class_2545;<init>(Lio/netty/util/AttributeKey;)V
      named <init> Lnet/minecraft/network/handler/PacketEncoder;<init>(Lio/netty/util/AttributeKey;)V
  • Method Details

    • encode

      protected void encode(ChannelHandlerContext channelHandlerContext, Packet<?> packet, ByteBuf byteBuf) throws Exception
      Specified by:
      encode in class MessageToByteEncoder<Packet<?>>
      Throws:
      Exception
      Mappings:
      Namespace Name Mixin selector
      official a Lum;a(Lio/netty/channel/ChannelHandlerContext;Lxf;Lio/netty/buffer/ByteBuf;)V
      intermediary method_10838 Lnet/minecraft/class_2545;method_10838(Lio/netty/channel/ChannelHandlerContext;Lnet/minecraft/class_2596;Lio/netty/buffer/ByteBuf;)V
      named encode Lnet/minecraft/network/handler/PacketEncoder;encode(Lio/netty/channel/ChannelHandlerContext;Lnet/minecraft/network/packet/Packet;Lio/netty/buffer/ByteBuf;)V