类 NewRegistryEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.registries.NewRegistryEvent
- 所有已实现的接口:
net.neoforged.fml.event.IModBusEvent
public class NewRegistryEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.fml.event.IModBusEvent
Fired when new registries can be constructed and registered.
This event is fired to register builtin registries, like the registries in
BuiltInRegistries
.
Builtin registries are registries which can only load entries registered in code.
For registering datapack registries that only load entries through JSON, see DataPackRegistryEvent.NewRegistry
.
This event is fired on the mod-specific event bus, on both logical sides.
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明<T> Registry
<T> create
(RegistryBuilder<T> builder) Creates a registry using thebuilder
and registers it.(专用程序包) void
fill()
<T> void
Registers an already-created registry.private void
registerToRootRegistry
(Registry<?> registry)
-
字段详细资料
-
registries
-
-
构造器详细资料
-
NewRegistryEvent
NewRegistryEvent()
-
-
方法详细资料
-
create
Creates a registry using thebuilder
and registers it. -
register
Registers an already-created registry. This allows storing registries in static final fields and registering them later.- 参数:
registry
- the registry to register
-
fill
void fill() -
registerToRootRegistry
-