Record Class ModdedNetworkQueryPayload
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.payload.ModdedNetworkQueryPayload
- Record Components:
queries- The query components
- All Implemented Interfaces:
CustomPacketPayload
@Internal
public record ModdedNetworkQueryPayload(Map<ConnectionProtocol, Set<ModdedNetworkQueryComponent>> queries)
extends Record
implements CustomPacketPayload
Payload for the modded network query request.
Sent clientbound with no data to ask for the client's channels. The client will then reply with
fromRegistry(Map).-
Nested Class Summary
Nested classes/interfaces inherited from interface CustomPacketPayload
CustomPacketPayload.FallbackProvider<B>, CustomPacketPayload.Type<T>, CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Identifierprivate final Map<ConnectionProtocol, Set<ModdedNetworkQueryComponent>> The field for thequeriesrecord component.static final CustomPacketPayload.Type<ModdedNetworkQueryPayload> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aModdedNetworkQueryPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ModdedNetworkQueryPayloadfromRegistry(Map<ConnectionProtocol, Map<Identifier, PayloadRegistration<?>>> registry) final inthashCode()Returns a hash code value for this object.queries()Returns the value of thequeriesrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
queries
The field for thequeriesrecord component. -
ID
-
TYPE
-
STREAM_CODEC
-
-
Constructor Details
-
ModdedNetworkQueryPayload
Creates an instance of aModdedNetworkQueryPayloadrecord class.- Parameters:
queries- the value for thequeriesrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomPacketPayload
-
fromRegistry
public static ModdedNetworkQueryPayload fromRegistry(Map<ConnectionProtocol, Map<Identifier, PayloadRegistration<?>>> registry) -
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). -
queries
-