blob: 36ec90b7429195161714088853bed7ae09106f17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package cc.polyfrost.oneconfig.mixin;
import cc.polyfrost.oneconfig.events.EventManager;
import cc.polyfrost.oneconfig.events.event.HudRenderEvent;
import net.minecraftforge.client.GuiIngameForge;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(value = GuiIngameForge.class, remap = false)
public class GuiIngameForgeMixin {
@Inject(method = "renderGameOverlay", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/client/GuiIngameForge;post(Lnet/minecraftforge/client/event/RenderGameOverlayEvent$ElementType;)V", shift = At.Shift.AFTER, remap = false), remap = true)
private void onRenderGameOverlay(float partialTicks, CallbackInfo ci) {
EventManager.INSTANCE.post(new HudRenderEvent(partialTicks));
}
}
|