Search in sources :

Example 1 with PackScreen

use of net.minecraft.client.gui.screen.pack.PackScreen in project KiwiClient by TangyKiwi.

the class ScreenMixin method renderBackgroundTexture.

@Inject(method = "renderBackgroundTexture", at = @At("HEAD"), cancellable = true)
public void renderBackgroundTexture(int vOffset, CallbackInfo ci) {
    if (!(this.client.currentScreen instanceof PackScreen) && KiwiClient.moduleManager.getModule(Background.class).isEnabled()) {
        ci.cancel();
        RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
        if (this.client.currentScreen instanceof SocialInteractionsScreen)
            return;
        else if (this.client.currentScreen instanceof OptionsScreen) {
            RenderSystem.setShaderTexture(0, KiwiClient.MENU3);
        } else {
            RenderSystem.setShaderTexture(0, KiwiClient.MENU2);
        }
        Screen.drawTexture(new MatrixStack(), 0, 0, 0, 0, this.width, this.height, this.width, this.height);
        if (!(this.client.currentScreen instanceof MainMenu))
            DrawableHelper.fill(new MatrixStack(), 0, 0, this.width, this.height, new Color(0, 0, 0, 140).getRGB());
    }
}
Also used : SocialInteractionsScreen(net.minecraft.client.gui.screen.multiplayer.SocialInteractionsScreen) OptionsScreen(net.minecraft.client.gui.screen.option.OptionsScreen) MatrixStack(net.minecraft.client.util.math.MatrixStack) PackScreen(net.minecraft.client.gui.screen.pack.PackScreen) MainMenu(com.tangykiwi.kiwiclient.gui.mainmenu.MainMenu) Inject(org.spongepowered.asm.mixin.injection.Inject)

Aggregations

MainMenu (com.tangykiwi.kiwiclient.gui.mainmenu.MainMenu)1 SocialInteractionsScreen (net.minecraft.client.gui.screen.multiplayer.SocialInteractionsScreen)1 OptionsScreen (net.minecraft.client.gui.screen.option.OptionsScreen)1 PackScreen (net.minecraft.client.gui.screen.pack.PackScreen)1 MatrixStack (net.minecraft.client.util.math.MatrixStack)1 Inject (org.spongepowered.asm.mixin.injection.Inject)1