本文整理匯總了Java中ethanjones.cubes.block.BlockRenderType類的典型用法代碼示例。如果您正苦於以下問題:Java BlockRenderType類的具體用法?Java BlockRenderType怎麽用?Java BlockRenderType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
BlockRenderType類屬於ethanjones.cubes.block包,在下文中一共展示了BlockRenderType類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: render
import ethanjones.cubes.block.BlockRenderType; //導入依賴的package包/類
private int render(int vertexOffset, int blockInt, int x, int y, int z, int i, boolean ao, Area maxX, Area minX,
Area maxZ, Area minZ) {
Block block = IDManager.toBlock(blockInt & 0xFFFFF);
if (block != null) {
int meta = (blockInt >> 20) & 0xFF;
BlockRenderType renderType = block.renderType(meta);
BlockTextureHandler textureHandler = block.getTextureHandler(meta);
vertexOffset = renderType.render(AreaMesh.vertices, vertexOffset, offset, block, meta, textureHandler, area,
x, y, z, i, ao, minX, maxZ, minZ, maxX);
if (vertexOffset >= SAFE_VERTICES) {
save(vertexOffset);
return 0;
}
}
return vertexOffset;
}
示例2: getTextureRegion
import ethanjones.cubes.block.BlockRenderType; //導入依賴的package包/類
@Override
public TextureRegion getTextureRegion(int meta) {
if (block.renderType(meta) == BlockRenderType.DEFAULT) {
TextureRegion icon = BlockIcons.getIcon(block.id, meta);
if (icon != null) return icon;
}
return block.getTextureHandler(meta).getSide(BlockFace.posX);
}
示例3: render
import ethanjones.cubes.block.BlockRenderType; //導入依賴的package包/類
private int render(int vertexOffset, int blockInt, int x, int y, int z, int i, boolean ao, Area maxX, Area minX, Area maxZ, Area minZ) {
Block block = IDManager.toBlock(blockInt & 0xFFFFF);
if (block != null) {
int meta = (blockInt >> 20) & 0xFF;
BlockRenderType renderType = block.renderType(meta);
BlockTextureHandler textureHandler = block.getTextureHandler(meta);
vertexOffset = renderType.render(AreaMesh.vertices, vertexOffset, offset, block, meta, textureHandler, area, x, y, z, i, ao, minX, maxZ, minZ, maxX);
if (vertexOffset >= SAFE_VERTICES) {
save(vertexOffset);
return 0;
}
}
return vertexOffset;
}