Jump to content

[1.8] Render Player in GuiIngame, but Blackscreen


Flawn_

Recommended Posts

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.

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.