Record Class MinecraftRegisterPayload
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.payload.MinecraftRegisterPayload
- All Implemented Interfaces:
CustomPacketPayload
@Internal
public record MinecraftRegisterPayload(Set<Identifier> newChannels)
extends Record
implements CustomPacketPayload
-
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 Set<Identifier> The field for thenewChannelsrecord component.static final StreamCodec<FriendlyByteBuf, MinecraftRegisterPayload> static final CustomPacketPayload.Type<MinecraftRegisterPayload> -
Constructor Summary
ConstructorsConstructorDescriptionMinecraftRegisterPayload(Set<Identifier> newChannels) Creates an instance of aMinecraftRegisterPayloadrecord 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.Returns the value of thenewChannelsrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
newChannels
The field for thenewChannelsrecord component. -
ID
-
TYPE
-
STREAM_CODEC
-
-
Constructor Details
-
MinecraftRegisterPayload
Creates an instance of aMinecraftRegisterPayloadrecord class.- Parameters:
newChannels- the value for thenewChannelsrecord 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). -
newChannels
Returns the value of thenewChannelsrecord component.- Returns:
- the value of the
newChannelsrecord component
-