Record Class FrozenRegistrySyncStartPayload
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.payload.FrozenRegistrySyncStartPayload
- Record Components:
toAccess
- The registries to access.
- All Implemented Interfaces:
CustomPacketPayload
@Internal
public record FrozenRegistrySyncStartPayload(List<ResourceLocation> toAccess)
extends Record
implements CustomPacketPayload
Packet payload sent to the client to start the frozen registry sync.
It indicates to the client which registries it should expect to receive.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
CustomPacketPayload.FallbackProvider<B extends FriendlyByteBuf>, CustomPacketPayload.Type<T extends CustomPacketPayload>, CustomPacketPayload.TypeAndCodec<B extends FriendlyByteBuf,
T extends CustomPacketPayload> -
Field Summary
Modifier and TypeFieldDescriptionstatic final StreamCodec
<FriendlyByteBuf, FrozenRegistrySyncStartPayload> private final List
<ResourceLocation> The field for thetoAccess
record component.static final CustomPacketPayload.Type
<FrozenRegistrySyncStartPayload> -
Constructor Summary
ConstructorDescriptionFrozenRegistrySyncStartPayload
(List<ResourceLocation> toAccess) Creates an instance of aFrozenRegistrySyncStartPayload
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.toAccess()
Returns the value of thetoAccess
record component.final String
toString()
Returns a string representation of this record class.type()
-
Field Details
-
toAccess
The field for thetoAccess
record component. -
TYPE
-
STREAM_CODEC
-
-
Constructor Details
-
FrozenRegistrySyncStartPayload
Creates an instance of aFrozenRegistrySyncStartPayload
record class.- Parameters:
toAccess
- the value for thetoAccess
record component
-
-
Method Details
-
type
- Specified by:
type
in interfaceCustomPacketPayload
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
toAccess
Returns the value of thetoAccess
record component.- Returns:
- the value of the
toAccess
record component
-