本文整理汇总了Java中net.minecraft.block.BlockHopper.colorMultiplier方法的典型用法代码示例。如果您正苦于以下问题:Java BlockHopper.colorMultiplier方法的具体用法?Java BlockHopper.colorMultiplier怎么用?Java BlockHopper.colorMultiplier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.BlockHopper
的用法示例。
在下文中一共展示了BlockHopper.colorMultiplier方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderBlockHopper
import net.minecraft.block.BlockHopper; //导入方法依赖的package包/类
public boolean renderBlockHopper(BlockHopper p_147803_1_, int p_147803_2_, int p_147803_3_, int p_147803_4_)
{
Tessellator var5 = Tessellator.instance;
var5.setBrightness(p_147803_1_.getBlockBrightness(this.blockAccess, p_147803_2_, p_147803_3_, p_147803_4_));
int var6 = p_147803_1_.colorMultiplier(this.blockAccess, p_147803_2_, p_147803_3_, p_147803_4_);
float var7 = (float)(var6 >> 16 & 255) / 255.0F;
float var8 = (float)(var6 >> 8 & 255) / 255.0F;
float var9 = (float)(var6 & 255) / 255.0F;
if (EntityRenderer.anaglyphEnable)
{
float var10 = (var7 * 30.0F + var8 * 59.0F + var9 * 11.0F) / 100.0F;
float var11 = (var7 * 30.0F + var8 * 70.0F) / 100.0F;
float var12 = (var7 * 30.0F + var9 * 70.0F) / 100.0F;
var7 = var10;
var8 = var11;
var9 = var12;
}
var5.setColorOpaque_F(var7, var8, var9);
return this.renderBlockHopperMetadata(p_147803_1_, p_147803_2_, p_147803_3_, p_147803_4_, this.blockAccess.getBlockMetadata(p_147803_2_, p_147803_3_, p_147803_4_), false);
}
示例2: renderBlockHopper
import net.minecraft.block.BlockHopper; //导入方法依赖的package包/类
public boolean renderBlockHopper(BlockHopper p_147803_1_, int p_147803_2_, int p_147803_3_, int p_147803_4_)
{
Tessellator tessellator = Tessellator.instance;
tessellator.setBrightness(p_147803_1_.getMixedBrightnessForBlock(this.blockAccess, p_147803_2_, p_147803_3_, p_147803_4_));
int l = p_147803_1_.colorMultiplier(this.blockAccess, p_147803_2_, p_147803_3_, p_147803_4_);
float f = (float)(l >> 16 & 255) / 255.0F;
float f1 = (float)(l >> 8 & 255) / 255.0F;
float f2 = (float)(l & 255) / 255.0F;
if (EntityRenderer.anaglyphEnable)
{
float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F;
float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F;
float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F;
f = f3;
f1 = f4;
f2 = f5;
}
tessellator.setColorOpaque_F(f, f1, f2);
return this.renderBlockHopperMetadata(p_147803_1_, p_147803_2_, p_147803_3_, p_147803_4_, this.blockAccess.getBlockMetadata(p_147803_2_, p_147803_3_, p_147803_4_), false);
}
示例3: renderBlockHopper
import net.minecraft.block.BlockHopper; //导入方法依赖的package包/类
public boolean renderBlockHopper(BlockHopper par1BlockHopper, int par2, int par3, int par4)
{
Tessellator tessellator = Tessellator.instance;
tessellator.setBrightness(par1BlockHopper.getMixedBrightnessForBlock(this.blockAccess, par2, par3, par4));
float f = 1.0F;
int l = par1BlockHopper.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;
if (EntityRenderer.anaglyphEnable)
{
float f4 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
float f5 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
float f6 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
f1 = f4;
f2 = f5;
f3 = f6;
}
tessellator.setColorOpaque_F(f * f1, f * f2, f * f3);
return this.renderBlockHopperMetadata(par1BlockHopper, par2, par3, par4, this.blockAccess.getBlockMetadata(par2, par3, par4), false);
}