// Path: src/main/java/de/johni0702/minecraft/gui/versions/callbacks/PostRenderScreenCallback.java
// public interface PostRenderScreenCallback {
//     Event<PostRenderScreenCallback> EVENT = Event.create((listeners) ->
//             (stack, partialTicks) -> {
//                 for (PostRenderScreenCallback listener : listeners) {
//                     listener.postRenderScreen(stack, partialTicks);
//                 }
//             }
//     );
// 
//     void postRenderScreen(MatrixStack stack, float partialTicks);
// }


import de.johni0702.minecraft.gui.versions.callbacks.PostRenderScreenCallback;
import net.minecraft.client.render.GameRenderer;
import net.minecraft.client.util.math.MatrixStack;
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;
//#if FABRIC>=1
package de.johni0702.minecraft.gui.versions.mixin;


@Mixin(GameRenderer.class)
public class MixinGameRenderer {
    @Inject(
            method = "render",
            at = @At(
                    value = "INVOKE",
                    //#if MC>=11600
                    target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V",
                    //#else
                    //$$ target = "Lnet/minecraft/client/gui/screen/Screen;render(IIF)V",
                    //#endif
                    shift = At.Shift.AFTER
            )
    )
    private void postRenderScreen(float partialTicks, long nanoTime, boolean renderWorld, CallbackInfo ci) {
        MatrixStack stack = new MatrixStack();
// Path: src/main/java/de/johni0702/minecraft/gui/versions/callbacks/PostRenderScreenCallback.java
// public interface PostRenderScreenCallback {
//     Event<PostRenderScreenCallback> EVENT = Event.create((listeners) ->
//             (stack, partialTicks) -> {
//                 for (PostRenderScreenCallback listener : listeners) {
//                     listener.postRenderScreen(stack, partialTicks);
//                 }
//             }
//     );
// 
//     void postRenderScreen(MatrixStack stack, float partialTicks);
// }


// Path: src/main/java/de/johni0702/minecraft/gui/versions/mixin/MixinGameRenderer.java
import de.johni0702.minecraft.gui.versions.callbacks.PostRenderScreenCallback;
import net.minecraft.client.render.GameRenderer;
import net.minecraft.client.util.math.MatrixStack;
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;

//#if FABRIC>=1
package de.johni0702.minecraft.gui.versions.mixin;


@Mixin(GameRenderer.class)
public class MixinGameRenderer {
    @Inject(
            method = "render",
            at = @At(
                    value = "INVOKE",
                    //#if MC>=11600
                    target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V",
                    //#else
                    //$$ target = "Lnet/minecraft/client/gui/screen/Screen;render(IIF)V",
                    //#endif
                    shift = At.Shift.AFTER
            )
    )
    private void postRenderScreen(float partialTicks, long nanoTime, boolean renderWorld, CallbackInfo ci) {
        MatrixStack stack = new MatrixStack();
        PostRenderScreenCallback.EVENT.invoker().postRenderScreen(stack, partialTicks);