Record Class RegistryDataMapSyncPayload<T>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.payload.RegistryDataMapSyncPayload<T>
- All Implemented Interfaces:
- CustomPacketPayload
@Internal
public record RegistryDataMapSyncPayload<T>(ResourceKey<? extends Registry<T>> registryKey, Map<ResourceLocation,Map<ResourceKey<T>,?>> dataMaps)
extends Record
implements CustomPacketPayload  
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayloadCustomPacketPayload.FallbackProvider<B extends FriendlyByteBuf>, CustomPacketPayload.Type<T extends CustomPacketPayload>, CustomPacketPayload.TypeAndCodec<B extends FriendlyByteBuf,T extends CustomPacketPayload> 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Map<ResourceLocation, Map<ResourceKey<T>, ?>> The field for thedataMapsrecord component.private final ResourceKey<? extends Registry<T>> The field for theregistryKeyrecord component.static final StreamCodec<FriendlyByteBuf, RegistryDataMapSyncPayload<?>> static final CustomPacketPayload.Type<RegistryDataMapSyncPayload<?>> 
- 
Constructor SummaryConstructorsConstructorDescriptionRegistryDataMapSyncPayload(ResourceKey<? extends Registry<T>> registryKey, Map<ResourceLocation, Map<ResourceKey<T>, ?>> dataMaps) Creates an instance of aRegistryDataMapSyncPayloadrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionMap<ResourceLocation, Map<ResourceKey<T>, ?>> dataMaps()Returns the value of thedataMapsrecord component.static <T> RegistryDataMapSyncPayload<T> decode(FriendlyByteBuf buf) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.ResourceKey<? extends Registry<T>> Returns the value of theregistryKeyrecord component.final StringtoString()Returns a string representation of this record class.type()voidwrite(FriendlyByteBuf buf) 
- 
Field Details- 
registryKeyThe field for theregistryKeyrecord component.
- 
dataMapsThe field for thedataMapsrecord component.
- 
TYPE
- 
STREAM_CODEC
 
- 
- 
Constructor Details- 
RegistryDataMapSyncPayloadpublic RegistryDataMapSyncPayload(ResourceKey<? extends Registry<T>> registryKey, Map<ResourceLocation, Map<ResourceKey<T>, ?>> dataMaps) Creates an instance of aRegistryDataMapSyncPayloadrecord class.- Parameters:
- registryKey- the value for the- registryKeyrecord component
- dataMaps- the value for the- dataMapsrecord component
 
 
- 
- 
Method Details- 
decode
- 
write
- 
type- Specified by:
- typein interface- CustomPacketPayload
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
registryKeyReturns the value of theregistryKeyrecord component.- Returns:
- the value of the registryKeyrecord component
 
- 
dataMapsReturns the value of thedataMapsrecord component.- Returns:
- the value of the dataMapsrecord component
 
 
-