mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-03 10:39:57 -04:00
renamed event method
This commit is contained in:
parent
811b763fc3
commit
888073d094
2 changed files with 3 additions and 3 deletions
fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric
api/event/registry
mixin/registry/sync
|
@ -39,13 +39,13 @@ import net.fabricmc.fabric.api.event.EventFactory;
|
|||
*/
|
||||
@FunctionalInterface
|
||||
public interface DynamicRegistrySetupCallback {
|
||||
void onSetupRegistry(DynamicRegistryManager registryManager);
|
||||
void onRegistrySetup(DynamicRegistryManager registryManager);
|
||||
|
||||
Event<DynamicRegistrySetupCallback> EVENT = EventFactory.createArrayBacked(
|
||||
DynamicRegistrySetupCallback.class,
|
||||
callbacks -> registryManager -> {
|
||||
for (DynamicRegistrySetupCallback callback : callbacks) {
|
||||
callback.onSetupRegistry(registryManager);
|
||||
callback.onRegistrySetup(registryManager);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -30,6 +30,6 @@ import net.fabricmc.fabric.api.event.registry.DynamicRegistrySetupCallback;
|
|||
public class DynamicRegistryManagerMixin {
|
||||
@Inject(method = "create", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/dynamic/RegistryOps$class_5506$class_5507;<init>()V"), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private static void onCreateImpl(CallbackInfoReturnable<DynamicRegistryManager.Impl> cir, DynamicRegistryManager.Impl registryManager) {
|
||||
DynamicRegistrySetupCallback.EVENT.invoker().onSetupRegistry(registryManager);
|
||||
DynamicRegistrySetupCallback.EVENT.invoker().onRegistrySetup(registryManager);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue