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
ConstructorDescriptionSimplePacketTypesProvider
(Map<State, PacketTypeMap<CU>> unmappedClientboundPacketTypes, Map<State, PacketTypeMap<CM>> mappedClientboundPacketTypes, Map<State, PacketTypeMap<SM>> mappedServerboundPacketTypes, Map<State, PacketTypeMap<SU>> unmappedServerboundPacketTypes) Creates an instance of aSimplePacketTypesProvider
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themappedClientboundPacketTypes
record component.Returns the value of themappedServerboundPacketTypes
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theunmappedClientboundPacketTypes
record component.Returns the value of theunmappedServerboundPacketTypes
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 aSimplePacketTypesProvider
record class.- Parameters:
unmappedClientboundPacketTypes
- the value for theunmappedClientboundPacketTypes
record componentmappedClientboundPacketTypes
- the value for themappedClientboundPacketTypes
record componentmappedServerboundPacketTypes
- the value for themappedServerboundPacketTypes
record componentunmappedServerboundPacketTypes
- the value for theunmappedServerboundPacketTypes
record 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 theunmappedClientboundPacketTypes
record component.- Specified by:
unmappedClientboundPacketTypes
in interfacePacketTypesProvider<CU extends ClientboundPacketType,
CM extends ClientboundPacketType, SM extends ServerboundPacketType, SU extends ServerboundPacketType> - Returns:
- the value of the
unmappedClientboundPacketTypes
record component
-
mappedClientboundPacketTypes
Returns the value of themappedClientboundPacketTypes
record component.- Specified by:
mappedClientboundPacketTypes
in interfacePacketTypesProvider<CU extends ClientboundPacketType,
CM extends ClientboundPacketType, SM extends ServerboundPacketType, SU extends ServerboundPacketType> - Returns:
- the value of the
mappedClientboundPacketTypes
record component
-
mappedServerboundPacketTypes
Returns the value of themappedServerboundPacketTypes
record component.- Specified by:
mappedServerboundPacketTypes
in interfacePacketTypesProvider<CU extends ClientboundPacketType,
CM extends ClientboundPacketType, SM extends ServerboundPacketType, SU extends ServerboundPacketType> - Returns:
- the value of the
mappedServerboundPacketTypes
record component
-
unmappedServerboundPacketTypes
Returns the value of theunmappedServerboundPacketTypes
record component.- Specified by:
unmappedServerboundPacketTypes
in interfacePacketTypesProvider<CU extends ClientboundPacketType,
CM extends ClientboundPacketType, SM extends ServerboundPacketType, SU extends ServerboundPacketType> - Returns:
- the value of the
unmappedServerboundPacketTypes
record component
-