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 net.minecraft.network.protocol.common.custom.CustomPacketPayload
CustomPacketPayload.FallbackProvider<B extends FriendlyByteBuf>, CustomPacketPayload.Type<T extends CustomPacketPayload>, CustomPacketPayload.TypeAndCodec<B extends FriendlyByteBuf,
T extends CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResourceLocation
private final Map
<ConnectionProtocol, Set<ModdedNetworkQueryComponent>> The field for thequeries
record component.static final CustomPacketPayload.Type
<ModdedNetworkQueryPayload> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aModdedNetworkQueryPayload
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static ModdedNetworkQueryPayload
fromRegistry
(Map<ConnectionProtocol, Map<ResourceLocation, PayloadRegistration<?>>> registry) final int
hashCode()
Returns a hash code value for this object.queries()
Returns the value of thequeries
record component.final String
toString()
Returns a string representation of this record class.type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
queries
The field for thequeries
record component. -
ID
-
TYPE
-
STREAM_CODEC
-
-
Constructor Details
-
ModdedNetworkQueryPayload
Creates an instance of aModdedNetworkQueryPayload
record class.- Parameters:
queries
- the value for thequeries
record component
-
-
Method Details
-
type
- Specified by:
type
in interfaceCustomPacketPayload
-
fromRegistry
public static ModdedNetworkQueryPayload fromRegistry(Map<ConnectionProtocol, Map<ResourceLocation, PayloadRegistration<?>>> registry) -
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)
. -
queries
Returns the value of thequeries
record component.- Returns:
- the value of the
queries
record component
-