本文整理汇总了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;
}