本文整理汇总了Java中net.minecraft.block.BlockFluid.getFluidIcon方法的典型用法代码示例。如果您正苦于以下问题:Java BlockFluid.getFluidIcon方法的具体用法?Java BlockFluid.getFluidIcon怎么用?Java BlockFluid.getFluidIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.BlockFluid
的用法示例。
在下文中一共展示了BlockFluid.getFluidIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRenderingIcon
import net.minecraft.block.BlockFluid; //导入方法依赖的package包/类
/**
* Get the rendering icon for this liquid stack, for presentation in the world or in GUIs.
* Defaults to handling water and lava, and returns the set rendering icon otherwise.
*
* See {@link #getTextureSheet()} to get the texture sheet this icon is associated with
*
* @return The icon for rendering this liquid
*/
@SideOnly(CLIENT)
public Icon getRenderingIcon()
{
if (itemID == Block.waterStill.blockID)
{
return BlockFluid.getFluidIcon("water");
}
else if (itemID == Block.lavaStill.blockID)
{
return BlockFluid.getFluidIcon("lava");
}
return renderingIcon;
}
示例2: renderBlockCauldron
import net.minecraft.block.BlockFluid; //导入方法依赖的package包/类
/**
* Render block cauldron
*/
public boolean renderBlockCauldron(BlockCauldron par1BlockCauldron, int par2, int par3, int par4)
{
this.renderStandardBlock(par1BlockCauldron, par2, par3, par4);
Tessellator tessellator = Tessellator.instance;
tessellator.setBrightness(par1BlockCauldron.getMixedBrightnessForBlock(this.blockAccess, par2, par3, par4));
float f = 1.0F;
int l = par1BlockCauldron.colorMultiplier(this.blockAccess, par2, par3, par4);
float f1 = (float)(l >> 16 & 255) / 255.0F;
float f2 = (float)(l >> 8 & 255) / 255.0F;
float f3 = (float)(l & 255) / 255.0F;
float f4;
if (EntityRenderer.anaglyphEnable)
{
float f5 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
f4 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
float f6 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
f1 = f5;
f2 = f4;
f3 = f6;
}
tessellator.setColorOpaque_F(f * f1, f * f2, f * f3);
Icon icon = par1BlockCauldron.getBlockTextureFromSide(2);
f4 = 0.125F;
this.renderFaceXPos(par1BlockCauldron, (double)((float)par2 - 1.0F + f4), (double)par3, (double)par4, icon);
this.renderFaceXNeg(par1BlockCauldron, (double)((float)par2 + 1.0F - f4), (double)par3, (double)par4, icon);
this.renderFaceZPos(par1BlockCauldron, (double)par2, (double)par3, (double)((float)par4 - 1.0F + f4), icon);
this.renderFaceZNeg(par1BlockCauldron, (double)par2, (double)par3, (double)((float)par4 + 1.0F - f4), icon);
Icon icon1 = BlockCauldron.getCauldronIcon("inner");
this.renderFaceYPos(par1BlockCauldron, (double)par2, (double)((float)par3 - 1.0F + 0.25F), (double)par4, icon1);
this.renderFaceYNeg(par1BlockCauldron, (double)par2, (double)((float)par3 + 1.0F - 0.75F), (double)par4, icon1);
int i1 = this.blockAccess.getBlockMetadata(par2, par3, par4);
if (i1 > 0)
{
Icon icon2 = BlockFluid.getFluidIcon("water_still");
if (i1 > 3)
{
i1 = 3;
}
this.renderFaceYPos(par1BlockCauldron, (double)par2, (double)((float)par3 - 1.0F + (6.0F + (float)i1 * 3.0F) / 16.0F), (double)par4, icon2);
}
return true;
}