mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Fix INIT_POST not being invoked (#418)
* Fix INIT_POST not being invoked * Fix formatting * Register callback for INIT_POST event in test mod
This commit is contained in:
@@ -71,8 +71,8 @@ public abstract class MixinScreen implements ScreenInputDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "init(Lnet/minecraft/client/Minecraft;II)V", at = @At(value = "RETURN"))
|
||||
private void postInit(Minecraft minecraft, int i, int j, CallbackInfo ci) {
|
||||
@Inject(method = "rebuildWidgets", at = @At(value = "RETURN"))
|
||||
private void postInit(CallbackInfo ci) {
|
||||
ClientGuiEvent.INIT_POST.invoker().init((Screen) (Object) this, getAccess());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,6 +290,9 @@ public class DebugEvents {
|
||||
TestMod.SINK.accept(toSimpleName(screen) + " initializes");
|
||||
return EventResult.pass();
|
||||
});
|
||||
ClientGuiEvent.INIT_POST.register(((screen, access) -> {
|
||||
TestMod.SINK.accept(toSimpleName(screen) + " initialized");
|
||||
}));
|
||||
InteractionEvent.CLIENT_LEFT_CLICK_AIR.register((player, hand) -> {
|
||||
TestMod.SINK.accept(player.getScoreboardName() + " left clicks air" + logSide(player.level()));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user