Class MinecraftDecoder

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    public class MinecraftDecoder
    extends io.netty.handler.codec.MessageToMessageDecoder<io.netty.buffer.ByteBuf>
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean DEBUG  
    • Constructor Summary

      Constructors 
      Constructor Description
      MinecraftDecoder​(Protocol protocol, boolean server, int protocolVersion)  
      MinecraftDecoder​(Protocol protocol, boolean server, int protocolVersion, boolean supportsForge)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void decode​(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> out)  
      void setProtocol​(Protocol protocol)  
      void setProtocolVersion​(int protocolVersion)  
      void setSupportsForge​(boolean supportsForge)  
      • Methods inherited from class io.netty.handler.codec.MessageToMessageDecoder

        acceptInboundMessage, channelRead
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Field Detail

      • DEBUG

        public static final boolean DEBUG
    • Constructor Detail

      • MinecraftDecoder

        public MinecraftDecoder​(Protocol protocol,
                                boolean server,
                                int protocolVersion)
      • MinecraftDecoder

        public MinecraftDecoder​(Protocol protocol,
                                boolean server,
                                int protocolVersion,
                                boolean supportsForge)
    • Method Detail

      • decode

        protected void decode​(io.netty.channel.ChannelHandlerContext ctx,
                              io.netty.buffer.ByteBuf in,
                              List<Object> out)
                       throws Exception
        Specified by:
        decode in class io.netty.handler.codec.MessageToMessageDecoder<io.netty.buffer.ByteBuf>
        Throws:
        Exception
      • setProtocol

        public void setProtocol​(Protocol protocol)
      • setProtocolVersion

        public void setProtocolVersion​(int protocolVersion)
      • setSupportsForge

        public void setSupportsForge​(boolean supportsForge)