Record Class ConfigNetwork.UpdateResultPayload
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcore.internal.config.network.ConfigNetwork.UpdateResultPayload
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
- Enclosing class:
ConfigNetwork
public static record ConfigNetwork.UpdateResultPayload(net.minecraft.resources.ResourceLocation configId, boolean accepted, List<net.minecraft.network.chat.Component> errors)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
Whether the server took a player's changes, and what it rejected.
-
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 extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ConfigNetwork.UpdateResultPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ConfigNetwork.UpdateResultPayload> -
Constructor Summary
ConstructorsConstructorDescriptionUpdateResultPayload(net.minecraft.resources.ResourceLocation configId, boolean accepted, List<net.minecraft.network.chat.Component> errors) Creates an instance of aUpdateResultPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepted()Returns the value of theacceptedrecord component.net.minecraft.resources.ResourceLocationconfigId()Returns the value of theconfigIdrecord component.final booleanIndicates whether some other object is "equal to" this one.List<net.minecraft.network.chat.Component> errors()Returns the value of theerrorsrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ConfigNetwork.UpdateResultPayload> type()
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ConfigNetwork.UpdateResultPayload> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ConfigNetwork.UpdateResultPayload> STREAM_CODEC
-
-
Constructor Details
-
UpdateResultPayload
public UpdateResultPayload(net.minecraft.resources.ResourceLocation configId, boolean accepted, List<net.minecraft.network.chat.Component> errors) Creates an instance of aUpdateResultPayloadrecord class.- Parameters:
configId- the value for theconfigIdrecord componentaccepted- the value for theacceptedrecord componenterrors- the value for theerrorsrecord component
-
-
Method Details
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ConfigNetwork.UpdateResultPayload> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
configId
public net.minecraft.resources.ResourceLocation configId()Returns the value of theconfigIdrecord component.- Returns:
- the value of the
configIdrecord component
-
accepted
public boolean accepted()Returns the value of theacceptedrecord component.- Returns:
- the value of the
acceptedrecord component
-
errors
Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-