Posted February 7, 20178 yr Hello everyone, when i render the Player in the left Corner ingame and i have a item inhand my screen just becomes black. Why?
February 7, 20178 yr Author No no, I just render the Inventoryplayer again to the left down in Ingame. but when i have a item in the hand i become a blackscreen. Yes like xBox
February 8, 20178 yr I had something similar with some of my HUD code when a player hit F1 or F5. Turns out I forgot to disable alpha and blend before returning from my render routine. GlStateManager.disableAlpha(); GlStateManager.disableBlend(); Not sure if this is your case, but make sure you clean up appropriately at the end of your render or things could get munged.
February 8, 20178 yr Author Quote package me.cose.gui.player; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.InventoryEffectRenderer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; public abstract class RenderPlayer extends InventoryEffectRenderer { public RenderPlayer(EntityPlayer p_i1094_1_) { super(p_i1094_1_.inventoryContainer); this.allowUserInput = true; } public static void PlayerInTC() { Minecraft mc = Minecraft.getMinecraft(); ScaledResolution var2 = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); int var3 = var2.getScaledWidth(); int var4 = var2.getScaledHeight(); int ex = var3 / 2 + 195; int ey = var4 / 2 + 117; GuiInventory.drawEntityOnScreen(ex, ey, 30, var3 - 380 - GuiInventory.oldMouseX, var4 - 225 - GuiInventory.oldMouseY, mc.thePlayer); GlStateManager.enableBlend(); } } PlayerInTC means PlayerinTheCorner Goodluck
February 8, 20178 yr Author func_175180_a in GuiIngame. Just at the top of the bottom you have to call the method. Done
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.