Class RegisterDataMapTypesEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.registries.datamaps.RegisterDataMapTypesEvent
- All Implemented Interfaces:
IModBusEvent
Event fired on the mod event bus, in order to register
data map types.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ResourceKey<Registry<?>>, Map<ResourceLocation, DataMapType<?, ?>>> -
Constructor Summary
ConstructorsConstructorDescriptionRegisterDataMapTypesEvent(Map<ResourceKey<Registry<?>>, Map<ResourceLocation, DataMapType<?, ?>>> attachments) -
Method Summary
Modifier and TypeMethodDescription<T,R> void register(DataMapType<R, T> type) Register a registry data map.
-
Field Details
-
attachments
-
-
Constructor Details
-
RegisterDataMapTypesEvent
@Internal public RegisterDataMapTypesEvent(Map<ResourceKey<Registry<?>>, Map<ResourceLocation, DataMapType<?, ?>>> attachments)
-
-
Method Details
-
register
Register a registry data map.- Type Parameters:
T- the type of the data mapR- the type of the registry- Parameters:
type- the data map type to register- Throws:
IllegalArgumentException- if a type with the same ID has already been registered for that registryUnsupportedOperationException- if the registry is a non-synced datapack registry and the data map is synced
-