Record Class SimplePacketTypesProvider<CU extends ClientboundPacketType,CM extends ClientboundPacketType,SM extends ServerboundPacketType,SU extends ServerboundPacketType>
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.protocol.packet.provider.SimplePacketTypesProvider<CU,CM,SM,SU>
- All Implemented Interfaces:
PacketTypesProvider<CU,CM, SM, SU>
public record SimplePacketTypesProvider<CU extends ClientboundPacketType,CM extends ClientboundPacketType,SM extends ServerboundPacketType,SU extends ServerboundPacketType> (Map<State,PacketTypeMap<CU extends ClientboundPacketType>> unmappedClientboundPacketTypes, Map<State,PacketTypeMap<CM extends ClientboundPacketType>> mappedClientboundPacketTypes, Map<State,PacketTypeMap<SM extends ServerboundPacketType>> mappedServerboundPacketTypes, Map<State,PacketTypeMap<SU extends ServerboundPacketType>> unmappedServerboundPacketTypes)
extends Record
implements PacketTypesProvider<CU,CM,SM,SU>
-
Constructor Summary
ConstructorsConstructorDescriptionSimplePacketTypesProvider(Map<State, PacketTypeMap<CU>> unmappedClientboundPacketTypes, Map<State, PacketTypeMap<CM>> mappedClientboundPacketTypes, Map<State, PacketTypeMap<SM>> mappedServerboundPacketTypes, Map<State, PacketTypeMap<SU>> unmappedServerboundPacketTypes) Creates an instance of aSimplePacketTypesProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themappedClientboundPacketTypesrecord component.Returns the value of themappedServerboundPacketTypesrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunmappedClientboundPacketTypesrecord component.Returns the value of theunmappedServerboundPacketTypesrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.viaversion.viaversion.api.protocol.packet.provider.PacketTypesProvider
unmappedClientboundType, unmappedClientboundType, unmappedServerboundType, unmappedServerboundType
-
Constructor Details
-
SimplePacketTypesProvider
public SimplePacketTypesProvider(Map<State, PacketTypeMap<CU>> unmappedClientboundPacketTypes, Map<State, PacketTypeMap<CM>> mappedClientboundPacketTypes, Map<State, PacketTypeMap<SM>> mappedServerboundPacketTypes, Map<State, PacketTypeMap<SU>> unmappedServerboundPacketTypes) Creates an instance of aSimplePacketTypesProviderrecord class.- Parameters:
unmappedClientboundPacketTypes- the value for theunmappedClientboundPacketTypesrecord componentmappedClientboundPacketTypes- the value for themappedClientboundPacketTypesrecord componentmappedServerboundPacketTypes- the value for themappedServerboundPacketTypesrecord componentunmappedServerboundPacketTypes- the value for theunmappedServerboundPacketTypesrecord component
-
-
Method Details
-
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). -
unmappedClientboundPacketTypes
Returns the value of theunmappedClientboundPacketTypesrecord component.- Specified by:
unmappedClientboundPacketTypesin interfacePacketTypesProvider<CU extends ClientboundPacketType,CM extends ClientboundPacketType, SM extends ServerboundPacketType, SU extends ServerboundPacketType> - Returns:
- the value of the
unmappedClientboundPacketTypesrecord component
-
mappedClientboundPacketTypes
Returns the value of themappedClientboundPacketTypesrecord component.- Specified by:
mappedClientboundPacketTypesin interfacePacketTypesProvider<CU extends ClientboundPacketType,CM extends ClientboundPacketType, SM extends ServerboundPacketType, SU extends ServerboundPacketType> - Returns:
- the value of the
mappedClientboundPacketTypesrecord component
-
mappedServerboundPacketTypes
Returns the value of themappedServerboundPacketTypesrecord component.- Specified by:
mappedServerboundPacketTypesin interfacePacketTypesProvider<CU extends ClientboundPacketType,CM extends ClientboundPacketType, SM extends ServerboundPacketType, SU extends ServerboundPacketType> - Returns:
- the value of the
mappedServerboundPacketTypesrecord component
-
unmappedServerboundPacketTypes
Returns the value of theunmappedServerboundPacketTypesrecord component.- Specified by:
unmappedServerboundPacketTypesin interfacePacketTypesProvider<CU extends ClientboundPacketType,CM extends ClientboundPacketType, SM extends ServerboundPacketType, SU extends ServerboundPacketType> - Returns:
- the value of the
unmappedServerboundPacketTypesrecord component
-