当前位置: 首页>>代码示例>>Java>>正文


Java IIcon.getMinV方法代码示例

本文整理汇总了Java中net.minecraft.util.IIcon.getMinV方法的典型用法代码示例。如果您正苦于以下问题:Java IIcon.getMinV方法的具体用法?Java IIcon.getMinV怎么用?Java IIcon.getMinV使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.util.IIcon的用法示例。


在下文中一共展示了IIcon.getMinV方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: renderIcon

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
private void renderIcon(IIcon icon) {
	Tessellator tessellator = Tessellator.instance;

	float minU = icon.getMinU();
	float maxU = icon.getMaxU();
	float minV = icon.getMinV();
	float maxV = icon.getMaxV();

	OpenGLHelper.rotate(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
	OpenGLHelper.rotate(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, 1.0F, 0.0F);
	tessellator.addVertexWithUV(-0.5F, -0.25F, 0.0D, minU, maxV);
	tessellator.addVertexWithUV(0.5F, -0.25F, 0.0D, maxU, maxV);
	tessellator.addVertexWithUV(0.5F, 0.75F, 0.0D, maxU, minV);
	tessellator.addVertexWithUV(-0.5F, 0.75F, 0.0D, minU, minV);
	tessellator.draw();
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:19,代码来源:LingeringPotionRenderer.java

示例2: func_77026_a

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_)
{
    float f = p_77026_2_.getMinU();
    float f1 = p_77026_2_.getMaxU();
    float f2 = p_77026_2_.getMinV();
    float f3 = p_77026_2_.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);
    p_77026_1_.startDrawingQuads();
    p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
    p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3);
    p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3);
    p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2);
    p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2);
    p_77026_1_.draw();
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:20,代码来源:RenderNinjaStar.java

示例3: func_130015_b

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
protected void func_130015_b(float p_130015_1_, int p_130015_2_, int p_130015_3_)
{
	if (p_130015_1_ < 1.0F)
	{
		p_130015_1_ *= p_130015_1_;
		p_130015_1_ *= p_130015_1_;
		p_130015_1_ = p_130015_1_ * 0.8F + 0.2F;
	}
	GL11.glDisable(3008);
	GL11.glDisable(2929);
	GL11.glDepthMask(false);
	OpenGlHelper.glBlendFunc(770, 771, 1, 0);
	GL11.glColor4f(1.0F, 1.0F, 1.0F, p_130015_1_);
	IIcon iicon = Blocks.portal.getBlockTextureFromSide(1);
	this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
	float f1 = iicon.getMinU();
	float f2 = iicon.getMinV();
	float f3 = iicon.getMaxU();
	float f4 = iicon.getMaxV();
	Tessellator tessellator = Tessellator.instance;
	tessellator.startDrawingQuads();
	tessellator.addVertexWithUV(0.0D, p_130015_3_, -90.0D, f1, f4);
	tessellator.addVertexWithUV(p_130015_2_, p_130015_3_, -90.0D, f3, f4);
	tessellator.addVertexWithUV(p_130015_2_, 0.0D, -90.0D, f3, f2);
	tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, f1, f2);
	tessellator.draw();
	GL11.glDepthMask(true);
	GL11.glEnable(2929);
	GL11.glEnable(3008);
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:32,代码来源:GuiIngame.java

示例4: renderSign

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
private void renderSign() {
	final IIcon iicon = Items.sign.getIconFromDamage(0);
	TextureUtil.func_152777_a(false, false, 1f);
	final float f = iicon.getMinU();
	final float f1 = iicon.getMaxU();
	final float f2 = iicon.getMinV();
	final float f3 = iicon.getMaxV();
	ItemRenderer.renderItemIn2D(WRenderer.t, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625f);
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:10,代码来源:CustomItemSignRenderer.java

示例5: doRender_TossedItem

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
public void doRender_TossedItem(Entity shot, double x, double y, double z, int type)
 {
     GL11.glPushMatrix();
      this.bindEntityTexture(shot);
      GL11.glTranslatef((float)x, (float)y, (float)z);
      
      GL11.glEnable(GL12.GL_RESCALE_NORMAL);
      
      float f2 = 0.5f;

GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
      
      IIcon icon = Items.baked_potato.getIconFromDamage(0);	// Default, to be overridden with the actual thing
      
      if (type == 1) { icon = Items.gold_nugget.getIconFromDamage(0); }
      else if (type == 2) { icon = Items.glass_bottle.getIconFromDamage(0); }
      else if (type == 3) { icon = Items.baked_potato.getIconFromDamage(0); }
      else if (type == 4) { icon = Items.melon_seeds.getIconFromDamage(0); }
      else if (type == 5) { icon = Items.glowstone_dust.getIconFromDamage(0); }
      else if (type == 6) { icon = Items.water_bucket.getIconFromDamage(0); }
      else if (type == 7) { icon = Items.snowball.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();
 }
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:47,代码来源:Render_Projectile.java

示例6: renderThermalArmor

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
private void renderThermalArmor(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    GL11.glPushMatrix();
    OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
    GL11.glEnable(GL11.GL_BLEND);

    for (int i = 0; i < 2; i++)
    {
        GL11.glPushMatrix();

        if (i == 1)
        {
            float time = FMLClientHandler.instance().getClientPlayerEntity().ticksExisted / 15.0F;
            float r = (float) Math.max(Math.cos(time), 0.0F);
            float b = (float) Math.max(Math.cos(time) * -1, 0.0F);

            if (r <= 0.6 && b <= 0.6)
            {
                r = 0.0F;
                b = 0.0F;
            }

            GL11.glColor4f(r, b / 2.0F, b, r + b / 1.5F);
        }

        IIcon iicon = FMLClientHandler.instance().getClientPlayerEntity().getItemIcon(item, i);

        if (iicon == null)
        {
            GL11.glPopMatrix();
            return;
        }

        FMLClientHandler.instance().getClient().getTextureManager().bindTexture(FMLClientHandler.instance().getClient().getTextureManager().getResourceLocation(item.getItemSpriteNumber()));
        VersionUtil.setMipMap(false, false);
        Tessellator tessellator = Tessellator.instance;
        float f = iicon.getMinU();
        float f1 = iicon.getMaxU();
        float f2 = iicon.getMinV();
        float f3 = iicon.getMaxV();
        float f4 = 0.0F;
        float f5 = 1.0F;
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glScalef(1.0F, -1.0F, 1.0F);
        float f6 = 16.0F;
        GL11.glScalef(f6, f6, f6);
        GL11.glTranslatef(-f4, -f5, 0.0F);
        ItemRenderer.renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);
        GL11.glPopMatrix();
    }

    GL11.glDisable(GL11.GL_BLEND);
    GL11.glPopMatrix();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:55,代码来源:ItemRendererThermalArmor.java

示例7: renderTorchAtAngle

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
public static void renderTorchAtAngle(RenderBlocks renderBlocks, Block par1Block, double par2, double par4, double par6, double par8, double par10)
{
    // if (par1Block instanceof GCCoreBlockUnlitTorch)
    {
        final Tessellator tessellator = Tessellator.instance;
        IIcon icon = renderBlocks.getBlockIconFromSideAndMetadata(par1Block, 0, 0);

        final double d5 = icon.getMinU();
        final double d6 = icon.getMinV();
        final double d7 = icon.getMaxU();
        final double d8 = icon.getMaxV();
        final double d9 = icon.getInterpolatedU(7.0D);
        final double d10 = icon.getInterpolatedV(6.0D);
        final double d11 = icon.getInterpolatedU(9.0D);
        final double d12 = icon.getInterpolatedV(8.0D);
        final double d13 = icon.getInterpolatedU(7.0D);
        final double d14 = icon.getInterpolatedV(13.0D);
        final double d15 = icon.getInterpolatedU(9.0D);
        final double d16 = icon.getInterpolatedV(15.0D);
        par2 += 0.5D;
        par6 += 0.5D;
        final double d17 = par2 - 0.5D;
        final double d18 = par2 + 0.5D;
        final double d19 = par6 - 0.5D;
        final double d20 = par6 + 0.5D;
        final double d21 = 0.0625D;
        final double d22 = 0.625D;
        tessellator.addVertexWithUV(par2 + par8 * (1.0D - d22) - d21, par4 + d22, par6 + par10 * (1.0D - d22) - d21, d9, d10);
        tessellator.addVertexWithUV(par2 + par8 * (1.0D - d22) - d21, par4 + d22, par6 + par10 * (1.0D - d22) + d21, d9, d12);
        tessellator.addVertexWithUV(par2 + par8 * (1.0D - d22) + d21, par4 + d22, par6 + par10 * (1.0D - d22) + d21, d11, d12);
        tessellator.addVertexWithUV(par2 + par8 * (1.0D - d22) + d21, par4 + d22, par6 + par10 * (1.0D - d22) - d21, d11, d10);
        tessellator.addVertexWithUV(par2 + d21 + par8, par4, par6 - d21 + par10, d15, d14);
        tessellator.addVertexWithUV(par2 + d21 + par8, par4, par6 + d21 + par10, d15, d16);
        tessellator.addVertexWithUV(par2 - d21 + par8, par4, par6 + d21 + par10, d13, d16);
        tessellator.addVertexWithUV(par2 - d21 + par8, par4, par6 - d21 + par10, d13, d14);
        tessellator.addVertexWithUV(par2 - d21, par4 + 1.0D, d19, d5, d6);
        tessellator.addVertexWithUV(par2 - d21 + par8, par4 + 0.0D, d19 + par10, d5, d8);
        tessellator.addVertexWithUV(par2 - d21 + par8, par4 + 0.0D, d20 + par10, d7, d8);
        tessellator.addVertexWithUV(par2 - d21, par4 + 1.0D, d20, d7, d6);
        tessellator.addVertexWithUV(par2 + d21, par4 + 1.0D, d20, d5, d6);
        tessellator.addVertexWithUV(par2 + par8 + d21, par4 + 0.0D, d20 + par10, d5, d8);
        tessellator.addVertexWithUV(par2 + par8 + d21, par4 + 0.0D, d19 + par10, d7, d8);
        tessellator.addVertexWithUV(par2 + d21, par4 + 1.0D, d19, d7, d6);
        tessellator.addVertexWithUV(d17, par4 + 1.0D, par6 + d21, d5, d6);
        tessellator.addVertexWithUV(d17 + par8, par4 + 0.0D, par6 + d21 + par10, d5, d8);
        tessellator.addVertexWithUV(d18 + par8, par4 + 0.0D, par6 + d21 + par10, d7, d8);
        tessellator.addVertexWithUV(d18, par4 + 1.0D, par6 + d21, d7, d6);
        tessellator.addVertexWithUV(d18, par4 + 1.0D, par6 - d21, d5, d6);
        tessellator.addVertexWithUV(d18 + par8, par4 + 0.0D, par6 - d21 + par10, d5, d8);
        tessellator.addVertexWithUV(d17 + par8, par4 + 0.0D, par6 - d21 + par10, d7, d8);
        tessellator.addVertexWithUV(d17, par4 + 1.0D, par6 - d21, d7, d6);
    }

}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:55,代码来源:BlockRendererUnlitTorch.java

示例8: renderFluidQuad

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
/**
 * Draws a tessellated quadrilateral bottom to top, left to right
 * @param base The bottom left corner of the quad
 * @param wide The bottom of the quad
 * @param high The left side of the quad
 * @param res Units per icon
 */
public static void renderFluidQuad(Vector3 base, Vector3 wide, Vector3 high, IIcon icon, double res)
{
    Tessellator t = Tessellator.instance;

    double u1 = icon.getMinU();
    double du = icon.getMaxU()-icon.getMinU();
    double v2 = icon.getMaxV();
    double dv = icon.getMaxV()-icon.getMinV();

    double wlen = wide.mag();
    double hlen = high.mag();
    
    double x = 0;
    while(x < wlen)
    {
        double rx = wlen - x;
        if(rx > res)
            rx = res;

        double y = 0;
        while(y < hlen)
        {
            double ry = hlen-y;
            if(ry > res)
                ry = res;

            Vector3 dx1 = vectors[2].set(wide).multiply(x/wlen);
            Vector3 dx2 = vectors[3].set(wide).multiply((x+rx)/wlen);    
            Vector3 dy1 = vectors[4].set(high).multiply(y/hlen);    
            Vector3 dy2 = vectors[5].set(high).multiply((y+ry)/hlen);

            t.addVertexWithUV(base.x+dx1.x+dy2.x, base.y+dx1.y+dy2.y, base.z+dx1.z+dy2.z, u1, v2-ry/res*dv);
            t.addVertexWithUV(base.x+dx1.x+dy1.x, base.y+dx1.y+dy1.y, base.z+dx1.z+dy1.z, u1, v2);
            t.addVertexWithUV(base.x+dx2.x+dy1.x, base.y+dx2.y+dy1.y, base.z+dx2.z+dy1.z, u1+rx/res*du, v2);
            t.addVertexWithUV(base.x+dx2.x+dy2.x, base.y+dx2.y+dy2.y, base.z+dx2.z+dy2.z, u1+rx/res*du, v2-ry/res*dv);
            
            y+=ry;
        }
        
        x+=rx;
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:50,代码来源:RenderUtils.java

示例9: render

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
public static void render(float minX, float minY, float minZ, float maxX, float maxY, float maxZ, IIcon iicon) {
	
	Tessellator tes = Tessellator.instance;
		
	float minU = iicon.getMinU();
	float maxU = iicon.getMaxU();
	float minV = iicon.getMinV();
	float maxV = iicon.getMaxV();
	
	float spaceU = maxU - minU;
	float spaceV = maxV - minV;
	
	float scale = (spaceV / (maxY - minY)) * maxY;
	
	tes.startDrawingQuads();
	
	//Top
	tes.addVertexWithUV(minX, maxY, maxZ, minU, minV);		
	tes.addVertexWithUV(maxX, maxY, maxZ, maxU, minV);
	tes.addVertexWithUV(maxX, maxY, minZ, maxU, maxV);
	tes.addVertexWithUV(minX, maxY, minZ, minU, maxV);
	//Bottom
	tes.addVertexWithUV(minX, minY, minZ, minU, minV);
	tes.addVertexWithUV(maxX, minY, minZ, maxU, minV);
	tes.addVertexWithUV(maxX, minY, maxZ, maxU, maxV);
	tes.addVertexWithUV(minX, minY, maxZ, minU, maxV);
	//North
	tes.addVertexWithUV(minX, maxY, minZ, minU, minV);
	tes.addVertexWithUV(maxX, maxY, minZ, maxU, minV);
	tes.addVertexWithUV(maxX, minY, minZ, maxU, maxV);
	tes.addVertexWithUV(minX, minY, minZ, minU, maxV);
	//SOUTH
	tes.addVertexWithUV(maxX, maxY, maxZ, minU, minV);
	tes.addVertexWithUV(minX, maxY, maxZ, maxU, minV);
	tes.addVertexWithUV(minX, minY, maxZ, maxU, maxV);
	tes.addVertexWithUV(maxX, minY, maxZ, minU, maxV);
	//EAST
	tes.addVertexWithUV(maxX, maxY, minZ, minU, minV);
	tes.addVertexWithUV(maxX, maxY, maxZ, maxU, minV);
	tes.addVertexWithUV(maxX, minY, maxZ, maxU, maxV);
	tes.addVertexWithUV(maxX, minY, minZ, minU, maxV);
	//WEST
	tes.addVertexWithUV(minX, maxY, maxZ, minU, minV);
	tes.addVertexWithUV(minX, maxY, minZ, maxU, minV);
	tes.addVertexWithUV(minX, minY, minZ, maxU, maxV);
	tes.addVertexWithUV(minX, minY, maxZ, minU, maxV);
	
	tes.draw();
}
 
开发者ID:TeamMonumental,项目名称:FissionWarfare,代码行数:50,代码来源:CubeRenderer.java

示例10: setRotation

import net.minecraft.util.IIcon; //导入方法依赖的package包/类
private void setRotation(TileEntityClayCrucible tile, double x, double y, double z, float ff){
	ClayCrucibleModel model = new ClayCrucibleModel();
	
	GL11.glPushMatrix();
	GL11.glTranslatef((float)x + 0.5f, (float)y + 1.5f, (float)z + 0.5f);
	GL11.glRotatef(180f,0f,0f,1f);
	
	this.bindTexture(texture);
	
	GL11.glPushMatrix();
	model.renderModel(0.0625f);
	GL11.glPopMatrix();
	
	GL11.glPopMatrix();
	
	if(tile.getStack() == null) return;
	//==============================================================================================================
	//鉱石の表示
	Tessellator tessellator = Tessellator.instance;
	
	GL11.glPushMatrix();
	GL11.glEnable(GL12.GL_RESCALE_NORMAL);
	GL11.glColor4f(2.0F, 2.0F, 2.0F, 0.75F);
	GL11.glTranslatef((float)x, (float)y + 0.5F, (float)z);
	GL11.glScalef(1.0F, -1.0F, -1.0F);
	GL11.glRotatef(0.0F, 0.0F, 1.0F, 0.0F);
	
	IIcon iicon;
	switch (tile.getState()){
		case NONE:
		case HEATING:
		default:
			iicon = Blocks.iron_block.getIcon(0,0);
			break;
		case MELTED:
			iicon = ((ClayCrucible)AntiMatterModRegistry.clayCrucible).meltedIron;
			break;
		case SOLIDIFIED:
			iicon = Blocks.coal_block.getIcon(0,0);
			break;
	}
	float f14 = iicon.getMinU();
	float f15 = iicon.getMaxU();
	float f4 = iicon.getMinV();
	float f5 = iicon.getMaxV();
	
	this.bindTexture(TextureMap.locationBlocksTexture);
	
	double high = 0.5-(((double) tile.getStack().stackSize/(double) tile.getMaxOres())*12D/16D);//6で最大->2~12
	double d = 3D/16D;
	tessellator.startDrawingQuads();
	tessellator.setNormal(1.0F, 0.0F, 0.0F);
	tessellator.addVertexWithUV(0.0D+d, high, -1.0D+d, (double)f15, (double)f4);
	tessellator.addVertexWithUV(1.0D-d, high, -1.0D+d, (double)f14, (double)f4);
	tessellator.addVertexWithUV(1.0D-d, high, 0.0-d, (double)f14, (double)f5);
	tessellator.addVertexWithUV(0.0D+d, high, 0.0-d, (double)f15, (double)f5);
	tessellator.draw();
	
	GL11.glDisable(GL12.GL_RESCALE_NORMAL);
	GL11.glPopMatrix();
	
}
 
开发者ID:Team-Antimatter-Mod,项目名称:AntiMatterMod,代码行数:63,代码来源:ClayCrucibleSpecialRender.java


注:本文中的net.minecraft.util.IIcon.getMinV方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。