Contents
Record Class PacketRegistry.PacketInfo
java.lang.Object
java.lang.Record
com.hypixel.hytale.protocol.PacketRegistry.PacketInfo
- Enclosing class:
PacketRegistry
public static record PacketRegistry.PacketInfo(int id, @Nonnull String name, @Nonnull NetworkChannel channel, @Nonnull Class<? extends Packet> type, int fixedBlockSize, int maxSize, boolean compressed, PacketRegistry.DeserializeFunc<MemorySegment> toObject)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPacketInfo(int id, String name, NetworkChannel channel, Class<? extends Packet> type, int fixedBlockSize, int maxSize, boolean compressed, PacketRegistry.DeserializeFunc<MemorySegment> toObject) Creates an instance of aPacketInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionchannel()Returns the value of thechannelrecord component.booleanReturns the value of thecompressedrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefixedBlockSizerecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.intmaxSize()Returns the value of themaxSizerecord component.name()Returns the value of thenamerecord component.toObject()Returns the value of thetoObjectrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
PacketInfo
public PacketInfo(int id, @Nonnull String name, @Nonnull NetworkChannel channel, @Nonnull Class<? extends Packet> type, int fixedBlockSize, int maxSize, boolean compressed, PacketRegistry.DeserializeFunc<MemorySegment> toObject) Creates an instance of aPacketInforecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentchannel- the value for thechannelrecord componenttype- the value for thetyperecord componentfixedBlockSize- the value for thefixedBlockSizerecord componentmaxSize- the value for themaxSizerecord componentcompressed- the value for thecompressedrecord componenttoObject- the value for thetoObjectrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
channel
Returns the value of thechannelrecord component.- Returns:
- the value of the
channelrecord component
-
type
-
fixedBlockSize
public int fixedBlockSize()Returns the value of thefixedBlockSizerecord component.- Returns:
- the value of the
fixedBlockSizerecord component
-
maxSize
public int maxSize()Returns the value of themaxSizerecord component.- Returns:
- the value of the
maxSizerecord component
-
compressed
public boolean compressed()Returns the value of thecompressedrecord component.- Returns:
- the value of the
compressedrecord component
-
toObject
Returns the value of thetoObjectrecord component.- Returns:
- the value of the
toObjectrecord component
-