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
Modifier and TypeFieldDescriptionprivate final List
<RegistrySynchronization.PackedRegistryEntry> The field for theentries
record component.private final ResourceKey
<? extends Registry<?>> The field for theregistry
record component.private static final StreamCodec
<io.netty.buffer.ByteBuf, ResourceKey<? extends Registry<?>>> static final StreamCodec
<FriendlyByteBuf, ClientboundRegistryDataPacket> -
Constructor Summary
ConstructorDescriptionClientboundRegistryDataPacket
(ResourceKey<? extends Registry<?>> registry, List<RegistrySynchronization.PackedRegistryEntry> entries) Creates an instance of aClientboundRegistryDataPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionentries()
Returns the value of theentries
record component.final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientConfigurationPacketListener p_296114_) final int
hashCode()
Returns a hash code value for this object.ResourceKey
<? extends Registry<?>> registry()
Returns the value of theregistry
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.Packet
isSkippable, isTerminal
-
Field Details
-
registry
The field for theregistry
record component. -
entries
The field for theentries
record 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 aClientboundRegistryDataPacket
record class.- Parameters:
registry
- the value for theregistry
record componententries
- the value for theentries
record component
-
-
Method Details
-
type
- Specified by:
type
in interfacePacket<ClientConfigurationPacketListener>
-
handle
- Specified by:
handle
in 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 theregistry
record component.- Returns:
- the value of the
registry
record component
-
entries
Returns the value of theentries
record component.- Returns:
- the value of the
entries
record component
-