mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-30 21:05:56 -05:00
Allow being more flexible in registering
Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
@@ -34,7 +34,7 @@ public interface ClientLifecycleEvent {
|
||||
*/
|
||||
@Deprecated Event<ClientState> CLIENT_STARTED = EventFactory.createLoop();
|
||||
/**
|
||||
* Invoked when client is initialising, not available in forge.
|
||||
* Invoked when client is stopping, not available in forge.
|
||||
*/
|
||||
@Deprecated Event<ClientState> CLIENT_STOPPING = EventFactory.createLoop();
|
||||
/**
|
||||
|
||||
@@ -35,11 +35,11 @@ public interface Registry<T> extends Iterable<T> {
|
||||
|
||||
RegistrySupplier<T> delegateSupplied(ResourceLocation id);
|
||||
|
||||
default Supplier<T> register(ResourceLocation id, Supplier<T> supplier) {
|
||||
default <E extends T> Supplier<E> register(ResourceLocation id, Supplier<E> supplier) {
|
||||
return registerSupplied(id, supplier);
|
||||
}
|
||||
|
||||
RegistrySupplier<T> registerSupplied(ResourceLocation id, Supplier<T> supplier);
|
||||
<E extends T> RegistrySupplier<E> registerSupplied(ResourceLocation id, Supplier<E> supplier);
|
||||
|
||||
@Nullable
|
||||
ResourceLocation getId(T obj);
|
||||
|
||||
Reference in New Issue
Block a user