Record Class ModdedNetworkPayload
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.payload.ModdedNetworkPayload
- Record Components:
configuration- The configuration components.play- The play components.
- All Implemented Interfaces:
CustomPacketPayload
@Internal
public record ModdedNetworkPayload(NetworkPayloadSetup setup)
extends Record
implements CustomPacketPayload
A payload that contains the modded network configuration and play components.
-
Nested Class Summary
Nested classes/interfaces inherited from interface CustomPacketPayload
CustomPacketPayload.FallbackProvider<B>, CustomPacketPayload.Type<T>, CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Identifierprivate final NetworkPayloadSetupThe field for thesetuprecord component.static final StreamCodec<FriendlyByteBuf, ModdedNetworkPayload> static final CustomPacketPayload.Type<ModdedNetworkPayload> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aModdedNetworkPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.setup()Returns the value of thesetuprecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
setup
The field for thesetuprecord component. -
ID
-
TYPE
-
STREAM_CODEC
-
-
Constructor Details
-
ModdedNetworkPayload
Creates an instance of aModdedNetworkPayloadrecord class.- Parameters:
setup- the value for thesetuprecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomPacketPayload
-
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). -
setup
Returns the value of thesetuprecord component.- Returns:
- the value of the
setuprecord component
-