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 p_296114_) 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.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
- Specified by:
handlein interfacePacket<ClientConfigurationPacketListener>
-
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). -
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
-