44import com .mojang .blaze3d .TracyFrameCapture ;
55import com .mojang .blaze3d .shaders .ShaderType ;
66import com .mojang .blaze3d .systems .RenderSystem ;
7- //?} elif >1.21 {
8- /*import com.mojang.blaze3d.systems.RenderSystem;
9- */ //?} else {
7+ //?} else {
108/*import com.mojang.blaze3d.systems.RenderSystem;
9+ import net.minecraft.client.Minecraft;
1110*/ //?}
1211import net .irisshaders .imgui .ImGuiMC ;
13- import net .minecraft .client .Minecraft ;
1412import net .minecraft .resources .ResourceLocation ;
1513import org .spongepowered .asm .mixin .Mixin ;
1614import org .spongepowered .asm .mixin .injection .At ;
2119
2220@ Mixin (RenderSystem .class )
2321public class RendererInitMixin {
24- //? if =1.21.5 {
2522 @ Inject (at = @ At ("RETURN" ), method = "initRenderer" , remap = false )
23+ //? if = 1.21.5 {
2624 private static void imgui$initRenderer (long window , int i , boolean bl , BiFunction <ResourceLocation , ShaderType , String > biFunction , boolean bl2 , CallbackInfo ci ) {
2725 ImGuiMC .getInstance ().onRendererInit (window );
2826 }
27+ //?} else {
28+ /*private static void imgui$initRenderer(int i, boolean bl, CallbackInfo ci) {
29+ ImGuiMC.getInstance().onRendererInit(Minecraft.getInstance().getWindow().getWindow());
30+ }
31+ */ //?}
32+
2933 @ Inject (at = @ At ("RETURN" ), method = "flipFrame" , remap = false )
30- private static void imgui$newFrame (long l , TracyFrameCapture tracyFrameCapture , CallbackInfo ci ) {
34+ private static void imgui$newFrame (
35+ long l ,
36+ //? if >= 1.21.5
37+ TracyFrameCapture tracyFrameCapture ,
38+ CallbackInfo ci
39+ ) {
3140 ImGuiMC .getInstance ().afterPollEvents (l );
3241 }
33- //?} elif >1.21 {
34- /*@Inject(at = @At("RETURN"), method = "initRenderer", remap = false)
35- private static void imgui$initRenderer(int i, boolean bl, CallbackInfo ci) {
36- ImGuiMC.getInstance().onRendererInit(Minecraft.getInstance().getWindow().getWindow());
37- }
38- @Inject(at = @At("RETURN"), method = "flipFrame", remap = false)
39- private static void imgui$newFrame(long l, CallbackInfo ci) {
40- ImGuiMC.getInstance().afterPollEvents(l);
41- }
42- */ //?} else {
43- /*@Inject(at = @At("RETURN"), method = "initRenderer", remap = false)
44- private static void imgui$initRenderer(int i, boolean bl, CallbackInfo ci) {
45- ImGuiMC.getInstance().onRendererInit(Minecraft.getInstance().getWindow().getWindow());
46- }
47- @Inject(at = @At("RETURN"), method = "flipFrame", remap = false)
48- private static void imgui$newFrame(long l, CallbackInfo ci) {
49- ImGuiMC.getInstance().afterPollEvents(l);
50- }
51- */ //?}
5242
5343}
0 commit comments