Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello everyone,

when i render the Player in the left Corner ingame and i have a item inhand my screen just becomes black. Why?

  • 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

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.

  • 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

 

 

  • Author

func_175180_a in GuiIngame. Just at the top of the bottom you have to call the method. Done :P

 

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.