@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int pass)
{
NBTTagCompound tag = stack.getTagCompound();
int biomeId = -1;
if ( tag != null )
{
NBTTagByte biome = ( NBTTagByte ) tag.getTag( SAMPLED_BIOME_TAG );
if ( biome != null )
{
biomeId = biome.getByte() & 255;
}
}
if ( pass == 1 )
{
return biomeId >= 0 ? BiomeGenBase.getBiomeGenArray()[ biomeId ].color : 0;
}
return 0xFFFFFFFF;
}
SampleItem.java 文件源码
java
阅读 14
收藏 0
点赞 0
评论 0
项目:BiomeWand
作者:
评论列表
文章目录