Package net.minecraft.network
Record Class HiddenByteBuf
java.lang.Object
java.lang.Record
net.minecraft.network.HiddenByteBuf
- All Implemented Interfaces:
io.netty.util.ReferenceCounted
public record HiddenByteBuf(io.netty.buffer.ByteBuf contents)
extends Record
implements io.netty.util.ReferenceCounted
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.netty.buffer.ByteBufThe field for thecontentsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHiddenByteBuf(io.netty.buffer.ByteBuf contents) Creates an instance of aHiddenByteBufrecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.netty.buffer.ByteBufcontents()Returns the value of thecontentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ObjectintrefCnt()booleanrelease()booleanrelease(int pDecrement) retain()retain(int pIncrement) final StringtoString()Returns a string representation of this record class.touch()static Object
-
Field Details
-
contents
private final io.netty.buffer.ByteBuf contentsThe field for thecontentsrecord component.
-
-
Constructor Details
-
HiddenByteBuf
public HiddenByteBuf(io.netty.buffer.ByteBuf contents) Creates an instance of aHiddenByteBufrecord class.- Parameters:
contents- the value for thecontentsrecord component
-
-
Method Details
-
pack
-
unpack
-
refCnt
public int refCnt()- Specified by:
refCntin interfaceio.netty.util.ReferenceCounted
-
retain
- Specified by:
retainin interfaceio.netty.util.ReferenceCounted
-
retain
- Specified by:
retainin interfaceio.netty.util.ReferenceCounted
-
touch
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
touch
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
release
public boolean release()- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
release
public boolean release(int pDecrement) - Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
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. -
hashCode
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. -
equals
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 withObjects::equals(Object,Object). -
contents
public io.netty.buffer.ByteBuf contents()Returns the value of thecontentsrecord component.- Returns:
- the value of the
contentsrecord component
-