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;
}
}
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);
}
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);
}
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);
}
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);
}
Aggregations