本文整理匯總了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);
}