本文整理汇总了Java中net.minecraft.util.Icon.getMinV方法的典型用法代码示例。如果您正苦于以下问题:Java Icon.getMinV方法的具体用法?Java Icon.getMinV怎么用?Java Icon.getMinV使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.util.Icon
的用法示例。
在下文中一共展示了Icon.getMinV方法的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: 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);
}
示例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: 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);
}
示例6: func_130015_b
import net.minecraft.util.Icon; //导入方法依赖的package包/类
protected void func_130015_b(float par1, int par2, int par3)
{
if (par1 < 1.0F)
{
par1 *= par1;
par1 *= par1;
par1 = par1 * 0.8F + 0.2F;
}
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(false);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0F, 1.0F, 1.0F, par1);
Icon icon = Block.portal.getBlockTextureFromSide(1);
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
float f1 = icon.getMinU();
float f2 = icon.getMinV();
float f3 = icon.getMaxU();
float f4 = icon.getMaxV();
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, (double)par3, -90.0D, (double)f1, (double)f4);
tessellator.addVertexWithUV((double)par2, (double)par3, -90.0D, (double)f3, (double)f4);
tessellator.addVertexWithUV((double)par2, 0.0D, -90.0D, (double)f3, (double)f2);
tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, (double)f1, (double)f2);
tessellator.draw();
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
示例7: 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);
}
示例8: renderNegativeYFace
import net.minecraft.util.Icon; //导入方法依赖的package包/类
/**
* Renders the face on the negative 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 renderNegativeYFace(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;
// top right
double xTr = xBaseCoord + xOffset * scale;
double zTr = zBaseCoord + zOffset * scale;
// top left
double xTl = xBaseCoord + (xOffset + width) * scale;
double zTl = zBaseCoord + zOffset * scale;
// bottom left
double xBl = xBaseCoord + (xOffset + width) * scale;
double zBl = zBaseCoord + (zOffset + depth) * scale;
// bottom right
double xBr = xBaseCoord + xOffset * scale;
double zBr = zBaseCoord + (zOffset + depth) * 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();
// 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);
// bottom right
tr.addVertexWithUV(xBr, y, zBr, maxU, maxV);
}
示例9: 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);
}
示例10: renderNegativeZFace
import net.minecraft.util.Icon; //导入方法依赖的package包/类
/**
* Renders the face on the negative z 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 height
* The faces height.
* @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 renderNegativeZFace(double xOffset, double yOffset, double zOffset, double width, double height, double uOffset, double vOffset, double uMaxOffset, double vMaxOffset, Icon icon, double scale)
{
tr.setNormal(0f, 0f, -1f);
double z = zBaseCoord + zOffset * scale;
// bottom right
double xBr = xBaseCoord + xOffset * scale;
double yBr = yBaseCoord + yOffset * scale;
// top right
double xTr = xBaseCoord + xOffset * scale;
double yTr = yBaseCoord + (yOffset + height) * scale;
// top left
double xTl = xBaseCoord + (xOffset + width) * scale;
double yTl = yBaseCoord + (yOffset + height) * scale;
// bottom left
double xBl = xBaseCoord + (xOffset + width) * 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(xBr, yBr, z, maxU, maxV);
// top right
tr.addVertexWithUV(xTr, yTr, z, maxU, minV);
// top left
tr.addVertexWithUV(xTl, yTl, z, minU, minV);
// bottom left
tr.addVertexWithUV(xBl, yBl, z, minU, maxV);
}
示例11: drawCrossedSquares
import net.minecraft.util.Icon; //导入方法依赖的package包/类
/**
* Utility function to draw crossed swuares
*/
public void drawCrossedSquares(Block par1Block, int par2, double par3, double par5, double par7, float par9)
{
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 = 0.45D * (double)par9;
double d8 = par3 + 0.5D - d7;
double d9 = par3 + 0.5D + d7;
double d10 = par7 + 0.5D - d7;
double d11 = par7 + 0.5D + d7;
tessellator.addVertexWithUV(d8, par5 + (double)par9, d10, d3, d4);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d10, d3, d6);
tessellator.addVertexWithUV(d9, par5 + 0.0D, d11, d5, d6);
tessellator.addVertexWithUV(d9, par5 + (double)par9, d11, d5, d4);
tessellator.addVertexWithUV(d9, par5 + (double)par9, d11, d3, d4);
tessellator.addVertexWithUV(d9, par5 + 0.0D, d11, d3, d6);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d10, d5, d6);
tessellator.addVertexWithUV(d8, par5 + (double)par9, d10, d5, d4);
tessellator.addVertexWithUV(d8, par5 + (double)par9, d11, d3, d4);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d11, d3, d6);
tessellator.addVertexWithUV(d9, par5 + 0.0D, d10, d5, d6);
tessellator.addVertexWithUV(d9, par5 + (double)par9, d10, d5, d4);
tessellator.addVertexWithUV(d9, par5 + (double)par9, d10, d3, d4);
tessellator.addVertexWithUV(d9, par5 + 0.0D, d10, d3, d6);
tessellator.addVertexWithUV(d8, par5 + 0.0D, d11, d5, d6);
tessellator.addVertexWithUV(d8, par5 + (double)par9, d11, d5, d4);
}
示例12: 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();
}
示例13: renderBlockRedstoneLogicMetadata
import net.minecraft.util.Icon; //导入方法依赖的package包/类
public void renderBlockRedstoneLogicMetadata(BlockRedstoneLogic par1BlockRedstoneLogic, int par2, int par3, int par4, int par5)
{
this.renderStandardBlock(par1BlockRedstoneLogic, par2, par3, par4);
Tessellator tessellator = Tessellator.instance;
tessellator.setBrightness(par1BlockRedstoneLogic.getMixedBrightnessForBlock(this.blockAccess, par2, par3, par4));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
int i1 = this.blockAccess.getBlockMetadata(par2, par3, par4);
Icon icon = this.getBlockIconFromSideAndMetadata(par1BlockRedstoneLogic, 1, i1);
double d0 = (double)icon.getMinU();
double d1 = (double)icon.getMaxU();
double d2 = (double)icon.getMinV();
double d3 = (double)icon.getMaxV();
double d4 = 0.125D;
double d5 = (double)(par2 + 1);
double d6 = (double)(par2 + 1);
double d7 = (double)(par2 + 0);
double d8 = (double)(par2 + 0);
double d9 = (double)(par4 + 0);
double d10 = (double)(par4 + 1);
double d11 = (double)(par4 + 1);
double d12 = (double)(par4 + 0);
double d13 = (double)par3 + d4;
if (par5 == 2)
{
d5 = d6 = (double)(par2 + 0);
d7 = d8 = (double)(par2 + 1);
d9 = d12 = (double)(par4 + 1);
d10 = d11 = (double)(par4 + 0);
}
else if (par5 == 3)
{
d5 = d8 = (double)(par2 + 0);
d6 = d7 = (double)(par2 + 1);
d9 = d10 = (double)(par4 + 0);
d11 = d12 = (double)(par4 + 1);
}
else if (par5 == 1)
{
d5 = d8 = (double)(par2 + 1);
d6 = d7 = (double)(par2 + 0);
d9 = d10 = (double)(par4 + 1);
d11 = d12 = (double)(par4 + 0);
}
tessellator.addVertexWithUV(d8, d13, d12, d0, d2);
tessellator.addVertexWithUV(d7, d13, d11, d0, d3);
tessellator.addVertexWithUV(d6, d13, d10, d1, d3);
tessellator.addVertexWithUV(d5, d13, d9, d1, d2);
}
示例14: renderWeaponAsItem
import net.minecraft.util.Icon; //导入方法依赖的package包/类
private void renderWeaponAsItem(ItemStack item, EntityLivingBase player)
{
GL11.glPushMatrix();
Icon icon = item.getIconIndex();
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.05F+(0.5F * (scale - 1));
float yOffset = 0.35F-(0.5F * (scale - 1));
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);
if(player == null)
{
GL11.glTranslatef(0.6F, -0.20F, 0);
GL11.glRotatef(90, 0, 0, 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();
}
示例15: renderItem
import net.minecraft.util.Icon; //导入方法依赖的package包/类
private void renderItem(TileEntityRoast tile, ItemStack itemstack, Icon icon, int slot) {
Minecraft mc = Minecraft.getMinecraft();
mc.renderEngine.bindTexture(TextureMap.locationItemsTexture);
GL11.glColor3f(255, 255, 255);
Tessellator image = Tessellator.instance;
float x1 = icon.getMinU();
float x2 = icon.getMaxU();
float y1 = icon.getMinV();
float y2 = icon.getMaxV();
float xPos = 0.3F;
float yPos = 0.3F;
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glTranslatef(-xPos, -yPos, 0.0F);
float scale = 0.6F;
GL11.glScalef(scale, scale, scale);
ItemRenderer.renderItemIn2D(image, x2, y1, x1, y2, icon.getIconWidth(), icon.getIconHeight(), 0.0625F);
GL11.glPushMatrix();
if (itemstack != null && tile.isEnchanted(slot))
{
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 f13 = 0.76F;
GL11.glColor4f(0.5F * f13, 0.25F * f13, 0.8F * f13, 1.0F);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glPushMatrix();
float f14 = 0.125F;
GL11.glScalef(f14, f14, f14);
float f15 = (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;
GL11.glTranslatef(f15, 0.0F, 0.0F);
GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(image, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, 0.0625F);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glScalef(f14, f14, f14);
f15 = (float)(Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
GL11.glTranslatef(-f15, 0.0F, 0.0F);
GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(image, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, 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.glPopMatrix();
}