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 SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionClientboundRegistryDataPacket(ResourceKey<? extends Registry<?>> registry, List<RegistrySynchronization.PackedRegistryEntry> entries) Creates an instance of aClientboundRegistryDataPacketrecord class.
- 
Method SummaryModifier 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.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.PacketisSkippable, isTerminal
- 
Field Details- 
registryThe field for theregistryrecord component.
- 
entriesThe field for theentriesrecord component.
- 
REGISTRY_KEY_STREAM_CODECprivate static final StreamCodec<io.netty.buffer.ByteBuf,ResourceKey<? extends Registry<?>>> REGISTRY_KEY_STREAM_CODEC
- 
STREAM_CODEC
 
- 
- 
Constructor Details- 
ClientboundRegistryDataPacketpublic ClientboundRegistryDataPacket(ResourceKey<? extends Registry<?>> registry, List<RegistrySynchronization.PackedRegistryEntry> entries) Creates an instance of aClientboundRegistryDataPacketrecord class.- Parameters:
- registry- the value for the- registryrecord component
- entries- the value for the- entriesrecord component
 
 
- 
- 
Method Details- 
type- Specified by:
- typein interface- Packet<ClientConfigurationPacketListener>
 
- 
handle- Specified by:
- handlein interface- Packet<ClientConfigurationPacketListener>
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
registryReturns the value of theregistryrecord component.- Returns:
- the value of the registryrecord component
 
- 
entriesReturns the value of theentriesrecord component.- Returns:
- the value of the entriesrecord component
 
 
-