Record Class VanillaPacketTypes
java.lang.Object
java.lang.Record
net.fabricmc.fabric.impl.networking.VanillaPacketTypes
public record VanillaPacketTypes(net.minecraft.network.protocol.PacketType<?>[] types)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VanillaPacketTypesstatic final VanillaPacketTypesstatic final VanillaPacketTypesstatic final VanillaPacketTypes -
Constructor Summary
ConstructorsConstructorDescriptionVanillaPacketTypes(net.minecraft.network.protocol.PacketType<?>[] types) Creates an instance of aVanillaPacketTypesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.network.protocol.PacketType<?> get(int id) static VanillaPacketTypesget(net.minecraft.network.ProtocolInfo<?> protocolInfo) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.PacketType<?>[]types()Returns the value of thetypesrecord component.
-
Field Details
-
PLAY_S2C
-
PLAY_C2S
-
CONFIGURATION_S2C
-
CONFIGURATION_C2S
-
-
Constructor Details
-
VanillaPacketTypes
public VanillaPacketTypes(net.minecraft.network.protocol.PacketType<?>[] types) Creates an instance of aVanillaPacketTypesrecord class.- Parameters:
types- the value for thetypesrecord component
-
-
Method Details
-
get
public @Nullable net.minecraft.network.protocol.PacketType<?> get(int id) -
get
-
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). -
types
public net.minecraft.network.protocol.PacketType<?>[] types()Returns the value of thetypesrecord component.- Returns:
- the value of the
typesrecord component
-