Record Class ClientboundRegistryDataPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.configuration.ClientboundRegistryDataPacket
- All Implemented Interfaces:
Packet<ClientConfigurationPacketListener>
public record ClientboundRegistryDataPacket(ResourceKey<? extends Registry<?>> registry, List<RegistrySynchronization.PackedRegistryEntry> entries)
extends Record
implements Packet<ClientConfigurationPacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<RegistrySynchronization.PackedRegistryEntry> The field for theentriesrecord component.private final ResourceKey<? extends Registry<?>> The field for theregistryrecord component.private static final StreamCodec<io.netty.buffer.ByteBuf, ResourceKey<? extends Registry<?>>> static final StreamCodec<FriendlyByteBuf, ClientboundRegistryDataPacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientboundRegistryDataPacket(ResourceKey<? extends Registry<?>> registry, List<RegistrySynchronization.PackedRegistryEntry> entries) Creates an instance of aClientboundRegistryDataPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientConfigurationPacketListener listener) Passes this Packet on to the PacketListener for processing.final inthashCode()Returns a hash code value for this object.ResourceKey<? extends Registry<?>> registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
registry
The field for theregistryrecord component. -
entries
The field for theentriesrecord component. -
REGISTRY_KEY_STREAM_CODEC
private static final StreamCodec<io.netty.buffer.ByteBuf, ResourceKey<? extends Registry<?>>> REGISTRY_KEY_STREAM_CODEC -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundRegistryDataPacket
public ClientboundRegistryDataPacket(ResourceKey<? extends Registry<?>> registry, List<RegistrySynchronization.PackedRegistryEntry> entries) Creates an instance of aClientboundRegistryDataPacketrecord class.- Parameters:
registry- the value for theregistryrecord componententries- the value for theentriesrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientConfigurationPacketListener>
-
handle
Description copied from interface:PacketPasses this Packet on to the PacketListener for processing.- Specified by:
handlein interfacePacket<ClientConfigurationPacketListener>
-
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). -
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-