本文整理汇总了Java中net.minecraft.block.Block.getRenderColor方法的典型用法代码示例。如果您正苦于以下问题:Java Block.getRenderColor方法的具体用法?Java Block.getRenderColor怎么用?Java Block.getRenderColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.Block
的用法示例。
在下文中一共展示了Block.getRenderColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_174845_l
import net.minecraft.block.Block; //导入方法依赖的package包/类
public EntityDiggingFX func_174845_l()
{
this.field_181019_az = new BlockPos(this.posX, this.posY, this.posZ);
Block block = this.field_174847_a.getBlock();
if (block == Blocks.grass)
{
return this;
}
else
{
int i = block.getRenderColor(this.field_174847_a);
this.particleRed *= (float)(i >> 16 & 255) / 255.0F;
this.particleGreen *= (float)(i >> 8 & 255) / 255.0F;
this.particleBlue *= (float)(i & 255) / 255.0F;
return this;
}
}
示例2: renderModelBrightness
import net.minecraft.block.Block; //导入方法依赖的package包/类
public void renderModelBrightness(IBakedModel p_178266_1_, IBlockState p_178266_2_, float p_178266_3_, boolean p_178266_4_)
{
Block block = p_178266_2_.getBlock();
block.setBlockBoundsForItemRender();
GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F);
int i = block.getRenderColor(block.getStateForEntityRender(p_178266_2_));
if (EntityRenderer.anaglyphEnable)
{
i = TextureUtil.anaglyphColor(i);
}
float f = (float)(i >> 16 & 255) / 255.0F;
float f1 = (float)(i >> 8 & 255) / 255.0F;
float f2 = (float)(i & 255) / 255.0F;
if (!p_178266_4_)
{
GlStateManager.color(p_178266_3_, p_178266_3_, p_178266_3_, 1.0F);
}
this.renderModelBrightnessColor(p_178266_1_, p_178266_3_, f, f1, f2);
}