Record Class OpaqueByteBufHolder

java.lang.Object
java.lang.Record
net.minecraft.network.OpaqueByteBufHolder
Record Components:
contents -
All Implemented Interfaces:
ReferenceCounted

public record OpaqueByteBufHolder(ByteBuf contents) extends Record implements ReferenceCounted
A holder of ByteBuf. This is used in local connection to skip unnecessary operations that check instanceof ByteBuf.
Mappings:
Namespace Name
named net/minecraft/network/OpaqueByteBufHolder
intermediary net/minecraft/class_10550
official vn
named contents
intermediary comp_3473
official a
  • Field Details Link icon

    • contents Link icon

      private final ByteBuf contents
      The field for the contents record component.
  • Constructor Details Link icon

    • OpaqueByteBufHolder Link icon

      public OpaqueByteBufHolder(ByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/network/OpaqueByteBufHolder;<init>(Lio/netty/buffer/ByteBuf;)V
      intermediary <init> Lnet/minecraft/class_10550;<init>(Lio/netty/buffer/ByteBuf;)V
      official <init> Lvn;<init>(Lio/netty/buffer/ByteBuf;)V
  • Method Details Link icon

    • pack Link icon

      public static Object pack(Object buf)
      Mappings:
      Namespace Name Mixin selector
      named pack Lnet/minecraft/network/OpaqueByteBufHolder;pack(Ljava/lang/Object;)Ljava/lang/Object;
      intermediary method_65937 Lnet/minecraft/class_10550;method_65937(Ljava/lang/Object;)Ljava/lang/Object;
      official a Lvn;a(Ljava/lang/Object;)Ljava/lang/Object;
    • unpack Link icon

      public static Object unpack(Object holder)
      Mappings:
      Namespace Name Mixin selector
      named unpack Lnet/minecraft/network/OpaqueByteBufHolder;unpack(Ljava/lang/Object;)Ljava/lang/Object;
      intermediary method_65939 Lnet/minecraft/class_10550;method_65939(Ljava/lang/Object;)Ljava/lang/Object;
      official b Lvn;b(Ljava/lang/Object;)Ljava/lang/Object;
    • refCnt Link icon

      public int refCnt()
      Specified by:
      refCnt in interface ReferenceCounted
    • retain Link icon

      public OpaqueByteBufHolder retain()
      Specified by:
      retain in interface ReferenceCounted
      Mappings:
      Namespace Name Mixin selector
      named retain Lnet/minecraft/network/OpaqueByteBufHolder;retain()Lnet/minecraft/network/OpaqueByteBufHolder;
      intermediary method_65935 Lnet/minecraft/class_10550;method_65935()Lnet/minecraft/class_10550;
      official a Lvn;a()Lvn;
    • retain Link icon

      public OpaqueByteBufHolder retain(int int2)
      Specified by:
      retain in interface ReferenceCounted
      Mappings:
      Namespace Name Mixin selector
      named retain Lnet/minecraft/network/OpaqueByteBufHolder;retain(I)Lnet/minecraft/network/OpaqueByteBufHolder;
      intermediary method_65936 Lnet/minecraft/class_10550;method_65936(I)Lnet/minecraft/class_10550;
      official a Lvn;a(I)Lvn;
    • touch Link icon

      public OpaqueByteBufHolder touch()
      Specified by:
      touch in interface ReferenceCounted
      Mappings:
      Namespace Name Mixin selector
      named touch Lnet/minecraft/network/OpaqueByteBufHolder;touch()Lnet/minecraft/network/OpaqueByteBufHolder;
      intermediary method_65938 Lnet/minecraft/class_10550;method_65938()Lnet/minecraft/class_10550;
      official b Lvn;b()Lvn;
    • touch Link icon

      public OpaqueByteBufHolder touch(Object object)
      Specified by:
      touch in interface ReferenceCounted
      Mappings:
      Namespace Name Mixin selector
      named touch Lnet/minecraft/network/OpaqueByteBufHolder;touch(Ljava/lang/Object;)Lnet/minecraft/network/OpaqueByteBufHolder;
      intermediary method_65940 Lnet/minecraft/class_10550;method_65940(Ljava/lang/Object;)Lnet/minecraft/class_10550;
      official c Lvn;c(Ljava/lang/Object;)Lvn;
    • release Link icon

      public boolean release()
      Specified by:
      release in interface ReferenceCounted
    • release Link icon

      public boolean release(int count)
      Specified by:
      release in interface ReferenceCounted
      Mappings:
      Namespace Name Mixin selector
      named release Lnet/minecraft/network/OpaqueByteBufHolder;release(I)Z
      intermediary release Lnet/minecraft/class_10550;release(I)Z
      official release Lvn;release(I)Z
    • toString Link icon

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode Link icon

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals Link icon

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • contents Link icon

      public ByteBuf contents()
      Returns the value of the contents record component.
      Returns:
      the value of the contents record component