Jump to content

Recommended Posts

Posted

[solved] Was the new (int par1, int par2) added to the draw Method.

 

Having an odd issue with my fontRenderers in my drawGuiContainerForegroundLayer not showing up @_@

 

This is my normal code which worked correctly in 1.3.2

 

 

protected void drawGuiContainerForegroundLayer()
{
// Draws The title of the Gui like "Furnace" for the furnace,
// It has 4 params
// @param "Tutorial Gui" this is the Name in String format
// @param int 6, this is the xCoord on the screen
// @param int 6, this is the yCoord on the screen
// @param 0xffffff, this is the color in hex, 0xffffff, is white, 0x000000 is black BTW
fontRenderer.drawString("Soul Altar", 6, 6, 4210752);
fontRenderer.drawString("Captured Souls", 94, 6, 4210752);

//AutoCenters Numbers
int ws = 0;
if (BlockSoulAltar.soulCountTotal > 999)
{
	ws = -4;
}

//SoulCountTotal Display
fontRenderer.drawString(""+ BlockSoulAltar.soulCountTotal, 150 + ws, 24, 0xffffff);

//SoulCostTotal Display
if (this.inventorySlots.getSlot(0).getStack() != null)
{
	fontRenderer.drawString(""+ this.SARL[1] * this.inventorySlots.getSlot(0).getStack().stackSize, 150, 51, 0xffffff);
}

// This draws the caption for the players inventory this is not needed as the above but is sometimes nice
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 6, ySize - 96 + 2, 4210752);
}

 

 

 

Not sure what could have caused this...

 

Edit: Just tried placing said fontRenders in my drawGuiContainerBackgroudLayer() and they work. Just seems the Foreground is getting covered up? or not functioning correctly.

 

Also tested a direct copy and paste of Minecrafts gui foreground codes, they don't work either under my custom Gui.

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.