renamed event method

This commit is contained in:
CheaterCodes 2020-10-01 23:37:40 +02:00
parent 811b763fc3
commit 888073d094
2 changed files with 3 additions and 3 deletions
fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric

View file

@ -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);
}
}
);

View file

@ -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);
}
}