Class RegisterDataMapTypesEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.registries.datamaps.RegisterDataMapTypesEvent
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
public class RegisterDataMapTypesEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.fml.event.IModBusEvent
Event fired on the mod event bus, in order to register
data map types
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<ResourceKey<Registry<?>>,
Map<ResourceLocation, DataMapType<?, ?>>> -
Constructor Summary
ConstructorDescriptionRegisterDataMapTypesEvent
(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.Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult
-
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 registry
-