Class NetherNetPacket

java.lang.Object
io.netty.buffer.DefaultByteBufHolder
org.cloudburstmc.netty.channel.nethernet.NetherNetPacket
All Implemented Interfaces:
io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted

public final class NetherNetPacket extends io.netty.buffer.DefaultByteBufHolder
A message written to the data channel it names. Plain ByteBuf writes go on the reliable one. An unreliable message has to fit one segment, as Bedrock never splits those.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Fired right before each inbound message, on the same event loop, naming the data channel it came on.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NetherNetPacket(io.netty.buffer.ByteBuf content, boolean reliable)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    replace(io.netty.buffer.ByteBuf content)
     

    Methods inherited from class io.netty.buffer.DefaultByteBufHolder

    content, contentToString, copy, duplicate, equals, hashCode, refCnt, release, release, retain, retain, retainedDuplicate, toString, touch, touch

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NetherNetPacket

      public NetherNetPacket(io.netty.buffer.ByteBuf content, boolean reliable)
  • Method Details

    • reliable

      public boolean reliable()
    • replace

      public NetherNetPacket replace(io.netty.buffer.ByteBuf content)
      Specified by:
      replace in interface io.netty.buffer.ByteBufHolder
      Overrides:
      replace in class io.netty.buffer.DefaultByteBufHolder