本文整理匯總了Java中net.minecraft.util.Icon.getMinU方法的典型用法代碼示例。如果您正苦於以下問題:Java Icon.getMinU方法的具體用法?Java Icon.getMinU怎麽用?Java Icon.getMinU使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.util.Icon
的用法示例。
在下文中一共展示了Icon.getMinU方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: func_77026_a
import net.minecraft.util.Icon; //導入方法依賴的package包/類
private void func_77026_a(Tessellator par1Tessellator, Icon par2Icon)
{
float f = par2Icon.getMinU();
float f1 = par2Icon.getMaxU();
float f2 = par2Icon.getMinV();
float f3 = par2Icon.getMaxV();
float f4 = 1.0F;
float f5 = 0.5F;
float f6 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
par1Tessellator.startDrawingQuads();
par1Tessellator.setNormal(0.0F, 1.0F, 0.0F);
par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3);
par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3);
par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2);
par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2);
par1Tessellator.draw();
}
示例2: renderPistonRodEW
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Render piston rod east/west
*/
public void renderPistonRodEW(double par1, double par3, double par5, double par7, double par9, double par11, float par13, double par14)
{
Icon icon = BlockPistonBase.getPistonBaseIcon("piston_side");
if (this.hasOverrideBlockTexture())
{
icon = this.overrideBlockTexture;
}
Tessellator tessellator = Tessellator.instance;
double d7 = (double)icon.getMinU();
double d8 = (double)icon.getMinV();
double d9 = (double)icon.getInterpolatedU(par14);
double d10 = (double)icon.getInterpolatedV(4.0D);
tessellator.setColorOpaque_F(par13, par13, par13);
tessellator.addVertexWithUV(par3, par5, par9, d9, d8);
tessellator.addVertexWithUV(par1, par5, par9, d7, d8);
tessellator.addVertexWithUV(par1, par7, par11, d7, d10);
tessellator.addVertexWithUV(par3, par7, par11, d9, d10);
}
示例3: func_77026_a
import net.minecraft.util.Icon; //導入方法依賴的package包/類
private void func_77026_a(Tessellator model, Icon image)
{
float f = image.getMinU();
float f1 = image.getMaxU();
float f2 = image.getMinV();
float f3 = image.getMaxV();
float f4 = 1.0F;
float f5 = 0.5F;
float f6 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
model.startDrawingQuads();
model.setNormal(0.0F, 1.0F, 0.0F);
model.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3);
model.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3);
model.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2);
model.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2);
model.draw();
}
示例4: renderPistonRodUD
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Render piston rod up/down
*/
public void renderPistonRodUD(double par1, double par3, double par5, double par7, double par9, double par11, float par13, double par14)
{
Icon icon = BlockPistonBase.getPistonBaseIcon("piston_side");
if (this.hasOverrideBlockTexture())
{
icon = this.overrideBlockTexture;
}
Tessellator tessellator = Tessellator.instance;
double d7 = (double)icon.getMinU();
double d8 = (double)icon.getMinV();
double d9 = (double)icon.getInterpolatedU(par14);
double d10 = (double)icon.getInterpolatedV(4.0D);
tessellator.setColorOpaque_F(par13, par13, par13);
tessellator.addVertexWithUV(par1, par7, par9, d9, d8);
tessellator.addVertexWithUV(par1, par5, par9, d7, d8);
tessellator.addVertexWithUV(par3, par5, par11, d7, d10);
tessellator.addVertexWithUV(par3, par7, par11, d9, d10);
}
示例5: renderPistonRodSN
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Render piston rod south/north
*/
public void renderPistonRodSN(double par1, double par3, double par5, double par7, double par9, double par11, float par13, double par14)
{
Icon icon = BlockPistonBase.getPistonBaseIcon("piston_side");
if (this.hasOverrideBlockTexture())
{
icon = this.overrideBlockTexture;
}
Tessellator tessellator = Tessellator.instance;
double d7 = (double)icon.getMinU();
double d8 = (double)icon.getMinV();
double d9 = (double)icon.getInterpolatedU(par14);
double d10 = (double)icon.getInterpolatedV(4.0D);
tessellator.setColorOpaque_F(par13, par13, par13);
tessellator.addVertexWithUV(par1, par5, par11, d9, d8);
tessellator.addVertexWithUV(par1, par5, par9, d7, d8);
tessellator.addVertexWithUV(par3, par7, par9, d7, d10);
tessellator.addVertexWithUV(par3, par7, par11, d9, d10);
}
示例6: doRenderFireball
import net.minecraft.util.Icon; //導入方法依賴的package包/類
public void doRenderFireball(EntityFlamingPoisonball par1EntityFireball, double par2, double par4, double par6, float par8, float par9)
{
GL11.glPushMatrix();
this.bindEntityTexture(par1EntityFireball);
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
float f2 = this.field_77002_a;
GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
Icon icon = ModItems.FPoisonball.getIconFromDamage(0);
Tessellator tessellator = Tessellator.instance;
float f3 = icon.getMinU();
float f4 = icon.getMaxU();
float f5 = icon.getMinV();
float f6 = icon.getMaxV();
float f7 = 1.0F;
float f8 = 0.5F;
float f9 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 1.0F, 0.0F);
tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6);
tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6);
tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5);
tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5);
tessellator.draw();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
示例7: renderPositiveXFace
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Renders the face on the positive x side with optional texture offsets.
* @param xOffset
* The offset on the x-axis.
* @param yOffset
* The offset on the y-axis.
* @param zOffset
* The offset on the z-axis.
* @param height
* The faces height.
* @param depth
* The faces depth.
* @param uOffset
* The texture offset on the u-axis.
* @param vOffset
* The texture offset on the v-axis.
* @param uMaxOffset
* The max texture offset on the u-axis.
* @param vMaxOffset
* The max texture offset on the v-axis.
* @param icon
* The faces texture.
* @param scale
* The value to scale the offsets with.
*/
public static void renderPositiveXFace(double xOffset, double yOffset, double zOffset, double height, double depth, double uOffset, double vOffset, double uMaxOffset, double vMaxOffset, Icon icon, double scale)
{
tr.setNormal(1f, 0f, 0f);
double x = xBaseCoord + xOffset * scale;
// bottom right
double zBr = zBaseCoord + zOffset * scale;
double yBr = yBaseCoord + yOffset * scale;
// top right
double zTr = zBaseCoord + zOffset * scale;
double yTr = yBaseCoord + (yOffset + height) * scale;
// top left
double zTl = zBaseCoord + (zOffset + depth) * scale;
double yTl = yBaseCoord + (yOffset + height) * scale;
// bottom left
double zBl = zBaseCoord + (zOffset + depth) * scale;
double yBl = yBaseCoord + yOffset * scale;
double minU = (uOffset > 0 && uOffset < 16) ? icon.getMinU() + (icon.getInterpolatedU(uOffset) - icon.getMinU()) : icon.getMinU();
double maxU = (uMaxOffset > 0 && uMaxOffset < 16) ? icon.getMaxU() - (icon.getMaxU() - icon.getInterpolatedU(uMaxOffset)) : icon.getMaxU();
double minV = (vOffset > 0 && vOffset < 16) ? icon.getMinV() + (icon.getInterpolatedV(vOffset) - icon.getMinV()) : icon.getMinV();
double maxV = (vMaxOffset > 0 && vMaxOffset < 16) ? icon.getMaxV() - (icon.getMaxV() - icon.getInterpolatedV(vMaxOffset)) : icon.getMaxV();
// bottom right
tr.addVertexWithUV(x, yBr, zBr, maxU, maxV);
// top right
tr.addVertexWithUV(x, yTr, zTr, maxU, minV);
// top left
tr.addVertexWithUV(x, yTl, zTl, minU, minV);
// bottom left
tr.addVertexWithUV(x, yBl, zBl, minU, maxV);
}
示例8: renderNegativeXFace
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Renders the face on the negative x side with optional texture offsets.
* @param xOffset
* The offset on the x-axis.
* @param yOffset
* The offset on the y-axis.
* @param zOffset
* The offset on the z-axis.
* @param height
* The faces height.
* @param depth
* The faces depth.
* @param uOffset
* The texture offset on the u-axis.
* @param vOffset
* The texture offset on the v-axis.
* @param uMaxOffset
* The max texture offset on the u-axis.
* @param vMaxOffset
* The max texture offset on the v-axis.
* @param icon
* The faces texture.
* @param scale
* The value to scale the offsets with.
*/
public static void renderNegativeXFace(double xOffset, double yOffset, double zOffset, double height, double depth, double uOffset, double vOffset, double uMaxOffset, double vMaxOffset, Icon icon, double scale)
{
tr.setNormal(-1f, 0f, 0f);
double x = xBaseCoord + xOffset * scale;
// bottom left
double zBl = zBaseCoord + zOffset * scale;
double yBl = yBaseCoord + yOffset * scale;
// bottom right
double zBr = zBaseCoord + (zOffset + depth) * scale;
double yBr = yBaseCoord + yOffset * scale;
// top right
double zTr = zBaseCoord + (zOffset + depth) * scale;
double yTr = yBaseCoord + (yOffset + height) * scale;
// top left
double zTl = zBaseCoord + zOffset * scale;
double yTl = yBaseCoord + (yOffset + height) * scale;
double minU = (uOffset > 0 && uOffset < 16) ? icon.getMinU() + (icon.getInterpolatedU(uOffset) - icon.getMinU()) : icon.getMinU();
double maxU = (uMaxOffset > 0 && uMaxOffset < 16) ? icon.getMaxU() - (icon.getMaxU() - icon.getInterpolatedU(uMaxOffset)) : icon.getMaxU();
double minV = (vOffset > 0 && vOffset < 16) ? icon.getMinV() + (icon.getInterpolatedV(vOffset) - icon.getMinV()) : icon.getMinV();
double maxV = (vMaxOffset > 0 && vMaxOffset < 16) ? icon.getMaxV() - (icon.getMaxV() - icon.getInterpolatedV(vMaxOffset)) : icon.getMaxV();
// bottom left
tr.addVertexWithUV(x, yBl, zBl, minU, maxV);
// bottom right
tr.addVertexWithUV(x, yBr, zBr, maxU, maxV);
// top right
tr.addVertexWithUV(x, yTr, zTr, maxU, minV);
// top left
tr.addVertexWithUV(x, yTl, zTl, minU, minV);
}
示例9: renderPositiveYFace
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Renders the face on the positive y side with optional texture offsets.
* @param xOffset
* The offset on the x-axis.
* @param yOffset
* The offset on the y-axis.
* @param zOffset
* The offset on the z-axis.
* @param width
* The faces width.
* @param depth
* The faces depth.
* @param uOffset
* The texture offset on the u-axis.
* @param vOffset
* The texture offset on the v-axis.
* @param uMaxOffset
* The max texture offset on the u-axis.
* @param vMaxOffset
* The max texture offset on the v-axis.
* @param icon
* The faces texture.
* @param scale
* The value to scale the offsets with.
*/
public static void renderPositiveYFace(double xOffset, double yOffset, double zOffset, double width, double depth, double uOffset, double vOffset, double uMaxOffset, double vMaxOffset, Icon icon, double scale)
{
tr.setNormal(0f, 1f, 0f);
double y = yBaseCoord + yOffset * scale;
// bottom right
double xBr = xBaseCoord + xOffset * scale;
double zBr = zBaseCoord + zOffset * scale;
// top right
double xTr = xBaseCoord + xOffset * scale;
double zTr = zBaseCoord + (zOffset + depth) * scale;
// top left
double xTl = xBaseCoord + (xOffset + width) * scale;
double zTl = zBaseCoord + (zOffset + depth) * scale;
// bottom left
double xBl = xBaseCoord + (xOffset + width) * scale;
double zBl = zBaseCoord + zOffset * scale;
double minU = (uOffset > 0 && uOffset < 16) ? icon.getMinU() + (icon.getInterpolatedU(uOffset) - icon.getMinU()) : icon.getMinU();
double maxU = (uMaxOffset > 0 && uMaxOffset < 16) ? icon.getMaxU() - (icon.getMaxU() - icon.getInterpolatedU(uMaxOffset)) : icon.getMaxU();
double minV = (vOffset > 0 && vOffset < 16) ? icon.getMinV() + (icon.getInterpolatedV(vOffset) - icon.getMinV()) : icon.getMinV();
double maxV = (vMaxOffset > 0 && vMaxOffset < 16) ? icon.getMaxV() - (icon.getMaxV() - icon.getInterpolatedV(vMaxOffset)) : icon.getMaxV();
// bottom right
tr.addVertexWithUV(xBr, y, zBr, maxU, maxV);
// top right
tr.addVertexWithUV(xTr, y, zTr, maxU, minV);
// top left
tr.addVertexWithUV(xTl, y, zTl, minU, minV);
// bottom left
tr.addVertexWithUV(xBl, y, zBl, minU, maxV);
}
示例10: renderBlockStemSmall
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Render block stem small
*/
public void renderBlockStemSmall(Block par1Block, int par2, double par3, double par5, double par7, double par9)
{
Tessellator tessellator = Tessellator.instance;
Icon icon = this.getBlockIconFromSideAndMetadata(par1Block, 0, par2);
if (this.hasOverrideBlockTexture())
{
icon = this.overrideBlockTexture;
}
double d4 = (double)icon.getMinU();
double d5 = (double)icon.getMinV();
double d6 = (double)icon.getMaxU();
double d7 = (double)icon.getInterpolatedV(par3 * 16.0D);
double d8 = par5 + 0.5D - 0.44999998807907104D;
double d9 = par5 + 0.5D + 0.44999998807907104D;
double d10 = par9 + 0.5D - 0.44999998807907104D;
double d11 = par9 + 0.5D + 0.44999998807907104D;
tessellator.addVertexWithUV(d8, par7 + par3, d10, d4, d5);
tessellator.addVertexWithUV(d8, par7 + 0.0D, d10, d4, d7);
tessellator.addVertexWithUV(d9, par7 + 0.0D, d11, d6, d7);
tessellator.addVertexWithUV(d9, par7 + par3, d11, d6, d5);
tessellator.addVertexWithUV(d9, par7 + par3, d11, d4, d5);
tessellator.addVertexWithUV(d9, par7 + 0.0D, d11, d4, d7);
tessellator.addVertexWithUV(d8, par7 + 0.0D, d10, d6, d7);
tessellator.addVertexWithUV(d8, par7 + par3, d10, d6, d5);
tessellator.addVertexWithUV(d8, par7 + par3, d11, d4, d5);
tessellator.addVertexWithUV(d8, par7 + 0.0D, d11, d4, d7);
tessellator.addVertexWithUV(d9, par7 + 0.0D, d10, d6, d7);
tessellator.addVertexWithUV(d9, par7 + par3, d10, d6, d5);
tessellator.addVertexWithUV(d9, par7 + par3, d10, d4, d5);
tessellator.addVertexWithUV(d9, par7 + 0.0D, d10, d4, d7);
tessellator.addVertexWithUV(d8, par7 + 0.0D, d11, d6, d7);
tessellator.addVertexWithUV(d8, par7 + par3, d11, d6, d5);
}
示例11: renderFireInFirstPerson
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Renders the fire on the screen for first person mode. Arg: partialTickTime
*/
private void renderFireInFirstPerson(float par1)
{
Tessellator tessellator = Tessellator.instance;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.9F);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
float f1 = 1.0F;
for (int i = 0; i < 2; ++i)
{
GL11.glPushMatrix();
Icon icon = Block.fire.getFireIcon(1);
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
float f2 = icon.getMinU();
float f3 = icon.getMaxU();
float f4 = icon.getMinV();
float f5 = icon.getMaxV();
float f6 = (0.0F - f1) / 2.0F;
float f7 = f6 + f1;
float f8 = 0.0F - f1 / 2.0F;
float f9 = f8 + f1;
float f10 = -0.5F;
GL11.glTranslatef((float)(-(i * 2 - 1)) * 0.24F, -0.3F, 0.0F);
GL11.glRotatef((float)(i * 2 - 1) * 10.0F, 0.0F, 1.0F, 0.0F);
tessellator.startDrawingQuads();
tessellator.addVertexWithUV((double)f6, (double)f8, (double)f10, (double)f3, (double)f5);
tessellator.addVertexWithUV((double)f7, (double)f8, (double)f10, (double)f2, (double)f5);
tessellator.addVertexWithUV((double)f7, (double)f9, (double)f10, (double)f2, (double)f4);
tessellator.addVertexWithUV((double)f6, (double)f9, (double)f10, (double)f3, (double)f4);
tessellator.draw();
GL11.glPopMatrix();
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_BLEND);
}
示例12: doRenderFireball
import net.minecraft.util.Icon; //導入方法依賴的package包/類
public void doRenderFireball(EntityFireball par1EntityFireball, double par2, double par4, double par6, float par8, float par9)
{
GL11.glPushMatrix();
this.bindEntityTexture(par1EntityFireball);
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
float f2 = this.field_77002_a;
GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
Icon icon = Item.fireballCharge.getIconFromDamage(0);
Tessellator tessellator = Tessellator.instance;
float f3 = icon.getMinU();
float f4 = icon.getMaxU();
float f5 = icon.getMinV();
float f6 = icon.getMaxV();
float f7 = 1.0F;
float f8 = 0.5F;
float f9 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 1.0F, 0.0F);
tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6);
tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6);
tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5);
tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5);
tessellator.draw();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
示例13: renderItemIn3D
import net.minecraft.util.Icon; //導入方法依賴的package包/類
private void renderItemIn3D(ItemStack stack, Icon icon, int colour, boolean held) {
GL11.glPushMatrix();
float red = (float)(colour >> 16 & 255) / 255.0F;
float green = (float)(colour >> 8 & 255) / 255.0F;
float blue = (float)(colour & 255) / 255.0F;
GL11.glColor4f(red, green, blue, 1.0F);
ItemStack item = stack;
if(ItemHotItem.getItem(stack) != null)
{
item = ItemHotItem.getItem(stack);
}
float scale = 1.0F;
Minecraft mc = FMLClientHandler.instance().getClient();
mc.renderEngine.bindTexture(TextureMap.locationItemsTexture);
Tessellator tessellator = Tessellator.instance;
float x1 = icon.getMinU();
float x2 = icon.getMaxU();
float y1 = icon.getMinV();
float y2 = icon.getMaxV();
float xOffset = 0.15F+(0.5F * (scale - 1));
float yOffset = 0.15F-(0.5F * (scale - 1));
if(held)
{
xOffset += 0.5F;
}
float xPos = 0.0F+xOffset-yOffset;
float yPos = 0.3F-xOffset-yOffset;
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glTranslatef(-xPos, -yPos, 0.0F);
GL11.glScalef(scale, scale, 1);
ItemRenderer.renderItemIn2D(tessellator, x2, y1, x1, y2, icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
if (item != null && item.isItemEnchanted()) {
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDisable(GL11.GL_LIGHTING);
mc.renderEngine.bindTexture(TextureHelperMF.ITEM_GLINT);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
float var13 = 0.76F;
GL11.glColor4f(0.5F * var13, 0.25F * var13, 0.8F * var13, 1.0F);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glPushMatrix();
float var14 = 0.125F;
GL11.glScalef(var14, var14, var14);
float var15 = (float) (System.currentTimeMillis() % 3000L) / 3000.0F * 8.0F;
GL11.glTranslatef(var15, 0.0F, 0.0F);
GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, x2, y1, x1, y2, icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glScalef(var14, var14, var14);
var15 = (float) (System.currentTimeMillis() % 4873L) / 4873.0F * 8.0F;
GL11.glTranslatef(-var15, 0.0F, 0.0F);
GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, x2, y1, x1, y2, icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
GL11.glPopMatrix();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
}
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
示例14: renderBlockStemBig
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Render block stem big
*/
public void renderBlockStemBig(BlockStem par1BlockStem, int par2, int par3, double par4, double par6, double par8, double par10)
{
Tessellator tessellator = Tessellator.instance;
Icon icon = par1BlockStem.getStemIcon();
if (this.hasOverrideBlockTexture())
{
icon = this.overrideBlockTexture;
}
double d4 = (double)icon.getMinU();
double d5 = (double)icon.getMinV();
double d6 = (double)icon.getMaxU();
double d7 = (double)icon.getMaxV();
double d8 = par6 + 0.5D - 0.5D;
double d9 = par6 + 0.5D + 0.5D;
double d10 = par10 + 0.5D - 0.5D;
double d11 = par10 + 0.5D + 0.5D;
double d12 = par6 + 0.5D;
double d13 = par10 + 0.5D;
if ((par3 + 1) / 2 % 2 == 1)
{
double d14 = d6;
d6 = d4;
d4 = d14;
}
if (par3 < 2)
{
tessellator.addVertexWithUV(d8, par8 + par4, d13, d4, d5);
tessellator.addVertexWithUV(d8, par8 + 0.0D, d13, d4, d7);
tessellator.addVertexWithUV(d9, par8 + 0.0D, d13, d6, d7);
tessellator.addVertexWithUV(d9, par8 + par4, d13, d6, d5);
tessellator.addVertexWithUV(d9, par8 + par4, d13, d6, d5);
tessellator.addVertexWithUV(d9, par8 + 0.0D, d13, d6, d7);
tessellator.addVertexWithUV(d8, par8 + 0.0D, d13, d4, d7);
tessellator.addVertexWithUV(d8, par8 + par4, d13, d4, d5);
}
else
{
tessellator.addVertexWithUV(d12, par8 + par4, d11, d4, d5);
tessellator.addVertexWithUV(d12, par8 + 0.0D, d11, d4, d7);
tessellator.addVertexWithUV(d12, par8 + 0.0D, d10, d6, d7);
tessellator.addVertexWithUV(d12, par8 + par4, d10, d6, d5);
tessellator.addVertexWithUV(d12, par8 + par4, d10, d6, d5);
tessellator.addVertexWithUV(d12, par8 + 0.0D, d10, d6, d7);
tessellator.addVertexWithUV(d12, par8 + 0.0D, d11, d4, d7);
tessellator.addVertexWithUV(d12, par8 + par4, d11, d4, d5);
}
}
示例15: renderBlockCropsImpl
import net.minecraft.util.Icon; //導入方法依賴的package包/類
/**
* Render block crops implementation
*/
public void renderBlockCropsImpl(Block par1Block, int par2, double par3, double par5, double par7)
{
Tessellator tessellator = Tessellator.instance;
Icon icon = this.getBlockIconFromSideAndMetadata(par1Block, 0, par2);
if (this.hasOverrideBlockTexture())
{
icon = this.overrideBlockTexture;
}
double d3 = (double)icon.getMinU();
double d4 = (double)icon.getMinV();
double d5 = (double)icon.getMaxU();
double d6 = (double)icon.getMaxV();
double d7 = par3 + 0.5D - 0.25D;
double d8 = par3 + 0.5D + 0.25D;
double d9 = par7 + 0.5D - 0.5D;
double d10 = par7 + 0.5D + 0.5D;
tessellator.addVertexWithUV(d7, par5 + 1.0D, d9, d3, d4);
tessellator.addVertexWithUV(d7, par5 + 0.0D, d9, d3, d6);
tessellator.addVertexWithUV(d7, par5 + 0.0D, d10, d5, d6);
tessellator.addVertexWithUV(d7, par5 + 1.0D, d10, d5, d4);
tessellator.addVertexWithUV(d7, par5 + 1.0D, d10, d3, d4);
tessellator.addVertexWithUV(d7, par5 + 0.0D, d10, d3, d6);
tessellator.addVertexWithUV(d7, par5 + 0.0D, d9, d5, d6);
tessellator.addVertexWithUV(d7, par5 + 1.0D, d9, d5, d4);
tessellator.addVertexWithUV(d8, par5 + 1.0D, d10, d3, d4);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d10, d3, d6);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d9, d5, d6);
tessellator.addVertexWithUV(d8, par5 + 1.0D, d9, d5, d4);
tessellator.addVertexWithUV(d8, par5 + 1.0D, d9, d3, d4);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d9, d3, d6);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d10, d5, d6);
tessellator.addVertexWithUV(d8, par5 + 1.0D, d10, d5, d4);
d7 = par3 + 0.5D - 0.5D;
d8 = par3 + 0.5D + 0.5D;
d9 = par7 + 0.5D - 0.25D;
d10 = par7 + 0.5D + 0.25D;
tessellator.addVertexWithUV(d7, par5 + 1.0D, d9, d3, d4);
tessellator.addVertexWithUV(d7, par5 + 0.0D, d9, d3, d6);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d9, d5, d6);
tessellator.addVertexWithUV(d8, par5 + 1.0D, d9, d5, d4);
tessellator.addVertexWithUV(d8, par5 + 1.0D, d9, d3, d4);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d9, d3, d6);
tessellator.addVertexWithUV(d7, par5 + 0.0D, d9, d5, d6);
tessellator.addVertexWithUV(d7, par5 + 1.0D, d9, d5, d4);
tessellator.addVertexWithUV(d8, par5 + 1.0D, d10, d3, d4);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d10, d3, d6);
tessellator.addVertexWithUV(d7, par5 + 0.0D, d10, d5, d6);
tessellator.addVertexWithUV(d7, par5 + 1.0D, d10, d5, d4);
tessellator.addVertexWithUV(d7, par5 + 1.0D, d10, d3, d4);
tessellator.addVertexWithUV(d7, par5 + 0.0D, d10, d3, d6);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d10, d5, d6);
tessellator.addVertexWithUV(d8, par5 + 1.0D, d10, d5, d4);
}