Record Class ServerboundRegisteredArgumentTypesPacket
java.lang.Object
java.lang.Record
net.kyori.adventure.platform.fabric.impl.ServerboundRegisteredArgumentTypesPacket
- Record Components:
known- Known argument type ids
public record ServerboundRegisteredArgumentTypesPacket(Set<net.minecraft.resources.ResourceLocation> known)
extends Record
A packet sent client to server, to let the server know which optional argument types are available on the server.
This packet is sent by players on join, before the command tree is sent to the client.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServerboundRegisteredArgumentTypesPacket(Set<net.minecraft.resources.ResourceLocation> known) Creates an instance of aServerboundRegisteredArgumentTypesPacketrecord 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.Set<net.minecraft.resources.ResourceLocation>known()Returns the value of theknownrecord component.of(@NotNull net.minecraft.network.FriendlyByteBuf buf) static voidregister()voidsendTo(net.fabricmc.fabric.api.networking.v1.PacketSender sender) Send the client's list of identifiers to the server.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
Method Details
-
register
public static void register() -
of
public static ServerboundRegisteredArgumentTypesPacket of(Set<net.minecraft.resources.ResourceLocation> idents) -
of
public static ServerboundRegisteredArgumentTypesPacket of(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) -
sendTo
public void sendTo(net.fabricmc.fabric.api.networking.v1.PacketSender sender) Send the client's list of identifiers to the server.- Parameters:
sender- the sender to send the packet to
-
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). -
known
Returns the value of theknownrecord component.- Returns:
- the value of the
knownrecord component
-