本文整理汇总了Java中net.minecraft.block.Block.setBlockBounds方法的典型用法代码示例。如果您正苦于以下问题:Java Block.setBlockBounds方法的具体用法?Java Block.setBlockBounds怎么用?Java Block.setBlockBounds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.Block
的用法示例。
在下文中一共展示了Block.setBlockBounds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderInventoryBlock
import net.minecraft.block.Block; //导入方法依赖的package包/类
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
block.setBlockBounds(0.005F, 0.005F, 0.005F, 0.995F, 0.995F, 0.995F);
renderer.setRenderBoundsFromBlock(block);
if (metadata < 6) {
drawFaces(renderer, block, ((BlockInfusedBlockOre) block).icon[0], ((BlockInfusedBlockOre) block).icon[1],
((BlockInfusedBlockOre) block).icon[2], ((BlockInfusedBlockOre) block).icon[3],
((BlockInfusedBlockOre) block).icon[4], ((BlockInfusedBlockOre) block).icon[5], false);
Color c = new Color(BlockCustomOreItem.colors[metadata + 1]);
float r = c.getRed() / 255.0F;
float g = c.getGreen() / 255.0F;
float b = c.getBlue() / 255.0F;
GL11.glColor3f(r, g, b);
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
renderer.setRenderBoundsFromBlock(block);
drawFaces(renderer, block, ((BlockInfusedBlockOre) block).icon[6], false);
GL11.glColor3f(1.0F, 1.0F, 1.0F);
}
}