Record Class FrozenRegistryPayload
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.payload.FrozenRegistryPayload
- Record Components:
registryName- The name of the registrysnapshot- The snapshot of the registry
- All Implemented Interfaces:
CustomPacketPayload
@Internal
public record FrozenRegistryPayload(Identifier registryName, RegistrySnapshot snapshot)
extends Record
implements CustomPacketPayload
Packet payload for sending a frozen registry to the client
-
Nested Class Summary
Nested classes/interfaces inherited from interface CustomPacketPayload
CustomPacketPayload.FallbackProvider<B>, CustomPacketPayload.Type<T>, CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdentifierThe field for theregistryNamerecord component.private final RegistrySnapshotThe field for thesnapshotrecord component.static final StreamCodec<FriendlyByteBuf, FrozenRegistryPayload> static final CustomPacketPayload.Type<FrozenRegistryPayload> -
Constructor Summary
ConstructorsConstructorDescriptionFrozenRegistryPayload(Identifier registryName, RegistrySnapshot snapshot) Creates an instance of aFrozenRegistryPayloadrecord 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 theregistryNamerecord component.snapshot()Returns the value of thesnapshotrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
registryName
The field for theregistryNamerecord component. -
snapshot
The field for thesnapshotrecord component. -
TYPE
-
STREAM_CODEC
-
-
Constructor Details
-
FrozenRegistryPayload
Creates an instance of aFrozenRegistryPayloadrecord class.- Parameters:
registryName- the value for theregistryNamerecord componentsnapshot- the value for thesnapshotrecord 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). -
registryName
Returns the value of theregistryNamerecord component.- Returns:
- the value of the
registryNamerecord component
-
snapshot
-