Search in sources :

Example 1 with DrawOverlayEvent

use of com.tangykiwi.kiwiclient.event.DrawOverlayEvent in project KiwiClient by TangyKiwi.

the class InGameHudMixin method render.

@Inject(method = "render", at = @At(value = "TAIL"), cancellable = true)
private void render(CallbackInfo info) {
    if (!MinecraftClient.getInstance().options.debugEnabled) {
        MinecraftClient client = MinecraftClient.getInstance();
        TextRenderer textRenderer = client.textRenderer;
        TextureManager textureManager = client.getTextureManager();
        MatrixStack matrixStack = new MatrixStack();
        RenderSystem.setShaderTexture(0, KiwiClient.DUCK);
        client.inGameHud.drawTexture(matrixStack, 0, 0, 0, 0, 130, 130);
    }
    DrawOverlayEvent event = new DrawOverlayEvent(new MatrixStack());
    KiwiClient.eventBus.post(event);
    if (event.isCancelled())
        info.cancel();
}
Also used : DrawOverlayEvent(com.tangykiwi.kiwiclient.event.DrawOverlayEvent) TextureManager(net.minecraft.client.texture.TextureManager) MatrixStack(net.minecraft.client.util.math.MatrixStack) MinecraftClient(net.minecraft.client.MinecraftClient) TextRenderer(net.minecraft.client.font.TextRenderer)

Aggregations

DrawOverlayEvent (com.tangykiwi.kiwiclient.event.DrawOverlayEvent)1 MinecraftClient (net.minecraft.client.MinecraftClient)1 TextRenderer (net.minecraft.client.font.TextRenderer)1 TextureManager (net.minecraft.client.texture.TextureManager)1 MatrixStack (net.minecraft.client.util.math.MatrixStack)1