Record Class PacketType<T extends AbstractPacket>
java.lang.Object
java.lang.Record
net.thewinnt.cutscenes.platform.PacketType<T>
public record PacketType<T extends AbstractPacket>(net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends AbstractPacket> type, AbstractPacket.PacketReader<T extends AbstractPacket> reader)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPacketType(net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T> type, AbstractPacket.PacketReader<T> reader) Creates an instance of aPacketTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, T> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reader()Returns the value of thereaderrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T> type()Returns the value of thetyperecord component.
-
Constructor Details
-
PacketType
public PacketType(net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T> type, AbstractPacket.PacketReader<T> reader) Creates an instance of aPacketTyperecord class.- Parameters:
type- the value for thetyperecord componentreader- the value for thereaderrecord component
-
-
Method Details
-
codec
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
reader
Returns the value of thereaderrecord component.- Returns:
- the value of the
readerrecord component
-