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