Class RegistrationHelperImpl
java.lang.Object
net.neoforged.testframework.impl.reg.RegistrationHelperImpl
- All Implemented Interfaces:
RegistrationHelper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceprivate final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistrationHelperImpl.DeferredRegistrar<AttachmentType<?>, DeferredAttachmentTypes> private DeferredBlocksprivate net.neoforged.bus.api.IEventBusprivate final List<Function<GatherDataEvent, DataProvider>> private DeferredEntityTypesprivate DeferredItemsprivate final Stringprivate final net.neoforged.fml.ModContainerprivate 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
ConstructorsConstructorDescriptionRegistrationHelperImpl(String modId) RegistrationHelperImpl(String modId, net.neoforged.fml.ModContainer owner) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProvider(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 voidgather(GatherDataEvent event) items()Returns a helper for item registration.modId()Returns the mod id of this helper.<T extends DataProvider>
voidvoidregister(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:RegistrationHelperReturns a deferred register for the givenregistry.- Specified by:
registrarin interfaceRegistrationHelper- Returns:
- a deferred register for the given
registry
-
blocks
Description copied from interface:RegistrationHelperReturns a helper for block registration.- Specified by:
blocksin interfaceRegistrationHelper- Returns:
- a helper for block registration
-
items
Description copied from interface:RegistrationHelperReturns a helper for item registration.- Specified by:
itemsin interfaceRegistrationHelper- Returns:
- a helper for item registration
-
entityTypes
Description copied from interface:RegistrationHelperReturns a helper for entity type registration.- Specified by:
entityTypesin interfaceRegistrationHelper- Returns:
- a helper for entity type registration
-
attachments
Description copied from interface:RegistrationHelperReturns a helper for attachment type registration.- Specified by:
attachmentsin interfaceRegistrationHelper- Returns:
- a helper for attachment type registration
-
registerDataMap
Description copied from interface:RegistrationHelperRegisters a data map.- Specified by:
registerDataMapin interfaceRegistrationHelper
-
modId
Description copied from interface:RegistrationHelperReturns the mod id of this helper.- Specified by:
modIdin interfaceRegistrationHelper- Returns:
- the mod id of this helper
-
registerSubpack
- Specified by:
registerSubpackin interfaceRegistrationHelper
-
provider
- Specified by:
providerin interfaceRegistrationHelper
-
addProvider
- Specified by:
addProviderin interfaceRegistrationHelper
-
register
public void register(net.neoforged.bus.api.IEventBus bus) - Specified by:
registerin interfaceRegistrationHelper
-
eventListeners
- Specified by:
eventListenersin interfaceRegistrationHelper
-
gather
-