Search in sources :

Example 81 with FontRenderer

use of net.minecraft.client.gui.FontRenderer in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class PageSynthesisAbout method drawPageForeground.

@Override
public void drawPageForeground(int width, int height) {
    super.drawPageForeground(width, height);
    FontRenderer fontRendererObj = Minecraft.getMinecraft().fontRenderer;
    String[] count = text.split("\n");
    fontRendererObj.drawSplitString(text, getxPos(), getyPos() + (fontRendererObj.FONT_HEIGHT * 2), (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2), 0xFFFFFF);
// int length = fontRendererObj.splitStringWidth(text, (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2));
// fontRendererObj.drawString("TESTING SO THAT THIS IS ALWAYS AT THE
// BOTTOM.", this.getxPos(), (this.getyPos() +
// (fontRendererObj.FONT_HEIGHT * 2)) + length, 0xFFFFFF);
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) FontRenderer(net.minecraft.client.gui.FontRenderer)

Example 82 with FontRenderer

use of net.minecraft.client.gui.FontRenderer in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class PageSynthesisMaterials method drawPageForeground.

@Override
public void drawPageForeground(int width, int height) {
    super.drawPageForeground(width, height);
    FontRenderer fontRendererObj = Minecraft.getMinecraft().fontRenderer;
    String[] count = text.split("\n");
    fontRendererObj.drawSplitString(text, getxPos(), getyPos() + (fontRendererObj.FONT_HEIGHT * 2), (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2), 0xFFFFFF);
// int length = fontRendererObj.splitStringWidth(text, (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2));
// fontRendererObj.drawString("TESTING SO THAT THIS IS ALWAYS AT THE
// BOTTOM.", this.getxPos(), (this.getyPos() +
// (fontRendererObj.FONT_HEIGHT * 2)) + length, 0xFFFFFF);
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) FontRenderer(net.minecraft.client.gui.FontRenderer)

Example 83 with FontRenderer

use of net.minecraft.client.gui.FontRenderer in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class PageSynthesisRecipes method drawPageForeground.

@Override
public void drawPageForeground(int width, int height) {
    super.drawPageForeground(width, height);
    FontRenderer fontRendererObj = Minecraft.getMinecraft().fontRenderer;
    String[] count = text.split("\n");
    fontRendererObj.drawSplitString(text, getxPos(), getyPos() + (fontRendererObj.FONT_HEIGHT * 2), (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2), 0xFFFFFF);
// int length = fontRendererObj.splitStringWidth(text, (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2));
// fontRendererObj.drawString("TESTING SO THAT THIS IS ALWAYS AT THE
// BOTTOM.", this.getxPos(), (this.getyPos() +
// (fontRendererObj.FONT_HEIGHT * 2)) + length, 0xFFFFFF);
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) FontRenderer(net.minecraft.client.gui.FontRenderer)

Example 84 with FontRenderer

use of net.minecraft.client.gui.FontRenderer in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class PageBugBloxSpecial method drawPageForeground.

@Override
public void drawPageForeground(int width, int height) {
    super.drawPageForeground(width, height);
    FontRenderer fontRendererObj = Minecraft.getMinecraft().fontRenderer;
    String[] count = text.split("\n");
    fontRendererObj.drawSplitString(text, getxPos(), getyPos() + (fontRendererObj.FONT_HEIGHT * 2), (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2), 0xFFFFFF);
// int length = fontRendererObj.splitStringWidth(text, (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2));
// fontRendererObj.drawString("TESTING SO THAT THIS IS ALWAYS AT THE
// BOTTOM.", this.getxPos(), (this.getyPos() +
// (fontRendererObj.FONT_HEIGHT * 2)) + length, 0xFFFFFF);
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) FontRenderer(net.minecraft.client.gui.FontRenderer)

Example 85 with FontRenderer

use of net.minecraft.client.gui.FontRenderer in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class PageCommandMenuDrive method drawPageForeground.

@Override
public void drawPageForeground(int width, int height) {
    super.drawPageForeground(width, height);
    FontRenderer fontRendererObj = Minecraft.getMinecraft().fontRenderer;
    String[] count = text.split("\n");
    fontRendererObj.drawSplitString(text, getxPos(), getyPos() + (fontRendererObj.FONT_HEIGHT * 2), (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2), 0xFFFFFF);
// int length = fontRendererObj.splitStringWidth(text, (new ScaledResolution(Minecraft.getMinecraft())).getScaledWidth() - getxPos() - (fontRendererObj.FONT_HEIGHT * 2));
// fontRendererObj.drawString("TESTING SO THAT THIS IS ALWAYS AT THE
// BOTTOM.", this.getxPos(), (this.getyPos() +
// (fontRendererObj.FONT_HEIGHT * 2)) + length, 0xFFFFFF);
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) FontRenderer(net.minecraft.client.gui.FontRenderer)

Aggregations

FontRenderer (net.minecraft.client.gui.FontRenderer)266 ScaledResolution (net.minecraft.client.gui.ScaledResolution)45 Minecraft (net.minecraft.client.Minecraft)39 ItemStack (net.minecraft.item.ItemStack)30 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)13 ArrayList (java.util.ArrayList)12 Tessellator (net.minecraft.client.renderer.Tessellator)11 RenderItem (net.minecraft.client.renderer.RenderItem)10 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)10 EntityPlayer (net.minecraft.entity.player.EntityPlayer)8 BufferBuilder (net.minecraft.client.renderer.BufferBuilder)7 IBlockState (net.minecraft.block.state.IBlockState)6 Block (net.minecraft.block.Block)5 GuiButton (net.minecraft.client.gui.GuiButton)5 List (java.util.List)4 RenderManager (net.minecraft.client.renderer.entity.RenderManager)4 ResourceLocation (net.minecraft.util.ResourceLocation)4 IGuiRect (betterquesting.api2.client.gui.misc.IGuiRect)3 Bounds (ivorius.reccomplex.gui.table.Bounds)3 Item (net.minecraft.item.Item)3