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.Identifier 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>, 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.RegistryFriendlyByteBuf, ConfigNetwork.UpdateResultPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ConfigNetwork.UpdateResultPayload> -
Constructor Summary
ConstructorsConstructorDescriptionUpdateResultPayload(net.minecraft.resources.Identifier 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.IdentifierconfigId()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.Identifier 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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
configId
public net.minecraft.resources.Identifier 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
-