Record Class ConfigUpdateRequestPacket
java.lang.Object
java.lang.Record
johnsmith.configoverhauled.impl.network.common.packet.ConfigUpdateRequestPacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ConfigUpdateRequestPacket(ConfigDescription metadata, net.minecraft.nbt.CompoundTag payload)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, ConfigUpdateRequestPacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ConfigUpdateRequestPacket> -
Constructor Summary
ConstructorsConstructorDescriptionConfigUpdateRequestPacket(ConfigDescription metadata, net.minecraft.nbt.CompoundTag payload) Creates an instance of aConfigUpdateRequestPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigUpdateRequestPacketcreate(ConfigDescription metadata, net.minecraft.nbt.Tag encodedValue) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.nbt.Tagfinal inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.net.minecraft.nbt.CompoundTagpayload()Returns the value of thepayloadrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()Methods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ConfigUpdateRequestPacket> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, ConfigUpdateRequestPacket> STREAM_CODEC
-
-
Constructor Details
-
ConfigUpdateRequestPacket
Creates an instance of aConfigUpdateRequestPacketrecord class.- Parameters:
metadata- the value for themetadatarecord componentpayload- the value for thepayloadrecord component
-
-
Method Details
-
create
public static ConfigUpdateRequestPacket create(ConfigDescription metadata, net.minecraft.nbt.Tag encodedValue) -
getEncodedValue
public net.minecraft.nbt.Tag getEncodedValue() -
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
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). -
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
payload
public net.minecraft.nbt.CompoundTag payload()Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-