Java Code Examples for net.minecraft.client.gui.inventory.GuiInventory#drawEntityOnScreen()

The following examples show how to use net.minecraft.client.gui.inventory.GuiInventory#drawEntityOnScreen() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PlayerDisplay.java    From Hyperium with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void draw(int x, double y, boolean config) {
    GlStateManager.pushMatrix();
    GlStateManager.color(1, 1, 1);

    GlStateManager.translate(x, y, 0);
    RenderHelper.enableStandardItemLighting();
    GlStateManager.enableAlpha();

    GlStateManager.shadeModel(GL11.GL_FLAT);
    GlStateManager.enableAlpha();
    GlStateManager.enableDepth();

    GlStateManager.rotate(30, 0, 1.0F, 0);
    GuiInventory.drawEntityOnScreen(0, 100, 50, 0, 0, Minecraft.getMinecraft().thePlayer);
    GlStateManager.depthFunc(GL11.GL_LEQUAL);
    GlStateManager.resetColor();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.disableDepth();
    GlStateManager.popMatrix();
}
 
Example 2
Source File: GuiInventoryTFC.java    From TFC2 with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	if(player.getEntityData().hasKey("craftingTable"))
		Core.bindTexture(UPPER_TEXTURE);
	else
		Core.bindTexture(UPPER_TEXTURE_2X2);
	int k = this.guiLeft;
	int l = this.guiTop;
	this.drawTexturedModalRect(k, l, 0, 0, this.xSize, 102);

	//Draw the player avatar
	GuiInventory.drawEntityOnScreen(k + 51, l + 75, 30, k + 51 - this.xSizeLow, l + 75 - 50 - this.ySizeLow, this.mc.player);

	PlayerInventory.drawInventory(this, width, height, ySize - PlayerInventory.invYSize);
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}