Search in sources :

Example 71 with FontRenderer

use of net.minecraft.client.gui.FontRenderer in project BetterRain by OreCruncher.

the class EntityTextPopOffFX method renderParticle.

@Override
public void renderParticle(final WorldRenderer renderer, final Entity entity, final float x, final float y, final float z, final float dX, final float dY, final float dZ) {
    this.rotationYaw = (-Minecraft.getMinecraft().thePlayer.rotationYaw);
    this.rotationPitch = Minecraft.getMinecraft().thePlayer.rotationPitch;
    final float locX = ((float) (this.prevPosX + (this.posX - this.prevPosX) * x - interpPosX));
    final float locY = ((float) (this.prevPosY + (this.posY - this.prevPosY) * y - interpPosY));
    final float locZ = ((float) (this.prevPosZ + (this.posZ - this.prevPosZ) * z - interpPosZ));
    GL11.glPushMatrix();
    if (this.shouldOnTop) {
        GL11.glDepthFunc(519);
    } else {
        GL11.glDepthFunc(515);
    }
    GL11.glTranslatef(locX, locY, locZ);
    GL11.glRotatef(this.rotationYaw, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(this.rotationPitch, 1.0F, 0.0F, 0.0F);
    GL11.glScalef(-1.0F, -1.0F, 1.0F);
    GL11.glScaled(this.particleScale * 0.008D, this.particleScale * 0.008D, this.particleScale * 0.008D);
    GL11.glScaled(this.scale, this.scale, this.scale);
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 0.003662109F);
    GL11.glEnable(3553);
    GL11.glDisable(3042);
    GL11.glDepthMask(true);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glEnable(3553);
    GL11.glEnable(2929);
    GL11.glDisable(2896);
    GL11.glBlendFunc(770, 771);
    GL11.glEnable(3042);
    GL11.glEnable(3008);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    final FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj;
    fontRenderer.drawStringWithShadow(this.text, -MathHelper.floor_float(fontRenderer.getStringWidth(this.text) / 2.0F) + 1, -MathHelper.floor_float(fontRenderer.FONT_HEIGHT / 2.0F) + 1, this.renderColor.rgb());
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glDepthFunc(515);
    GL11.glPopMatrix();
    if (this.grow) {
        this.particleScale *= 1.08F;
        if (this.particleScale > SIZE * 3.0D) {
            this.grow = false;
        }
    } else {
        this.particleScale *= 0.96F;
    }
}
Also used : FontRenderer(net.minecraft.client.gui.FontRenderer)

Example 72 with FontRenderer

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

the class PageDriveFormsForms 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 73 with FontRenderer

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

the class PageKeybladeAbout 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 74 with FontRenderer

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

the class PageKeybladeSummoning 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 75 with FontRenderer

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

the class PageKeybladesList 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