Package net.minecraftforge.event
Class RegistryEvent.Register<T extends IForgeRegistryEntry<T>>
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.eventbus.api.GenericEvent<T>
-
- net.minecraftforge.event.RegistryEvent<T>
-
- net.minecraftforge.event.RegistryEvent.Register<T>
-
- Type Parameters:
T
- The registry top level type
- All Implemented Interfaces:
net.minecraftforge.eventbus.api.IGenericEvent<T>
,IModBusEvent
- Enclosing class:
- RegistryEvent<T extends IForgeRegistryEntry<T>>
public static class RegistryEvent.Register<T extends IForgeRegistryEntry<T>> extends RegistryEvent<T>
Register your objects for the appropriate registry type when you receive this event.event.getRegistry().register(...)
The registries will be visited in alphabetic order of their name, except blocks and items, which will be visited FIRST and SECOND respectively. ObjectHolders will reload between Blocks and Items, and after all registries have been visited.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.RegistryEvent
RegistryEvent.MissingMappings<T extends IForgeRegistryEntry<T>>, RegistryEvent.NewRegistry, RegistryEvent.Register<T extends IForgeRegistryEntry<T>>
-
-
Field Summary
Fields Modifier and Type Field Description private ResourceLocation
name
private IForgeRegistry<T>
registry
-
Constructor Summary
Constructors Constructor Description Register(ResourceLocation name, IForgeRegistry<T> registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceLocation
getName()
IForgeRegistry<T>
getRegistry()
java.lang.String
toString()
-
-
-
Field Detail
-
registry
private final IForgeRegistry<T extends IForgeRegistryEntry<T>> registry
-
name
private final ResourceLocation name
-
-
Constructor Detail
-
Register
public Register(ResourceLocation name, IForgeRegistry<T> registry)
-
-
Method Detail
-
getRegistry
public IForgeRegistry<T> getRegistry()
-
getName
public ResourceLocation getName()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-