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());
}
}
Aggregations