Class RegistrationHelperImpl
java.lang.Object
net.neoforged.testframework.impl.reg.RegistrationHelperImpl
- All Implemented Interfaces:
RegistrationHelper
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static interface
private final class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final RegistrationHelperImpl.DeferredRegistrar
<AttachmentType<?>, DeferredAttachmentTypes> private DeferredBlocks
private net.neoforged.bus.api.IEventBus
private final List
<Function<GatherDataEvent, DataProvider>> private DeferredEntityTypes
private DeferredItems
private final String
private final net.neoforged.fml.ModContainer
private final com.google.common.collect.ListMultimap
<Class<?>, Consumer<? extends DataProvider>> private static final Map
<Class<?>, RegistrationHelperImpl.DataGenProvider<?>> private final Map
<ResourceKey<? extends Registry<?>>, DeferredRegister<?>> -
Constructor Summary
ConstructorDescriptionRegistrationHelperImpl
(String modId) RegistrationHelperImpl
(String modId, net.neoforged.fml.ModContainer owner) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProvider
(Function<GatherDataEvent, DataProvider> provider) Returns a helper for attachment type registration.blocks()
Returns a helper for block registration.Returns a helper for entity type registration.private void
gather
(GatherDataEvent event) items()
Returns a helper for item registration.modId()
Returns the mod id of this helper.<T extends DataProvider>
voidvoid
register
(net.neoforged.bus.api.IEventBus bus) <M extends DataMapType<?,
?>>
MregisterDataMap
(M map) Registers a data map.registerSubpack
(String name) <T> DeferredRegister
<T> registrar
(ResourceKey<Registry<T>> registry) Returns a deferred register for the givenregistry
.
-
Field Details
-
owner
private final net.neoforged.fml.ModContainer owner -
PROVIDERS
-
modId
-
providers
private final com.google.common.collect.ListMultimap<Class<?>,Consumer<? extends DataProvider>> providers -
directProviders
-
registrars
-
blocks
-
items
-
entityTypes
-
attachments
private final RegistrationHelperImpl.DeferredRegistrar<AttachmentType<?>,DeferredAttachmentTypes> attachments -
bus
private net.neoforged.bus.api.IEventBus bus -
listeners
-
-
Constructor Details
-
RegistrationHelperImpl
-
RegistrationHelperImpl
-
-
Method Details
-
registrar
Description copied from interface:RegistrationHelper
Returns a deferred register for the givenregistry
.- Specified by:
registrar
in interfaceRegistrationHelper
- Returns:
- a deferred register for the given
registry
-
blocks
Description copied from interface:RegistrationHelper
Returns a helper for block registration.- Specified by:
blocks
in interfaceRegistrationHelper
- Returns:
- a helper for block registration
-
items
Description copied from interface:RegistrationHelper
Returns a helper for item registration.- Specified by:
items
in interfaceRegistrationHelper
- Returns:
- a helper for item registration
-
entityTypes
Description copied from interface:RegistrationHelper
Returns a helper for entity type registration.- Specified by:
entityTypes
in interfaceRegistrationHelper
- Returns:
- a helper for entity type registration
-
attachments
Description copied from interface:RegistrationHelper
Returns a helper for attachment type registration.- Specified by:
attachments
in interfaceRegistrationHelper
- Returns:
- a helper for attachment type registration
-
registerDataMap
Description copied from interface:RegistrationHelper
Registers a data map.- Specified by:
registerDataMap
in interfaceRegistrationHelper
-
modId
Description copied from interface:RegistrationHelper
Returns the mod id of this helper.- Specified by:
modId
in interfaceRegistrationHelper
- Returns:
- the mod id of this helper
-
registerSubpack
- Specified by:
registerSubpack
in interfaceRegistrationHelper
-
provider
- Specified by:
provider
in interfaceRegistrationHelper
-
addProvider
- Specified by:
addProvider
in interfaceRegistrationHelper
-
register
public void register(net.neoforged.bus.api.IEventBus bus) - Specified by:
register
in interfaceRegistrationHelper
-
eventListeners
- Specified by:
eventListeners
in interfaceRegistrationHelper
-
gather
-