本文整理汇总了Java中net.minecraft.client.renderer.RenderBlocks.hasOverrideBlockTexture方法的典型用法代码示例。如果您正苦于以下问题:Java RenderBlocks.hasOverrideBlockTexture方法的具体用法?Java RenderBlocks.hasOverrideBlockTexture怎么用?Java RenderBlocks.hasOverrideBlockTexture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.RenderBlocks
的用法示例。
在下文中一共展示了RenderBlocks.hasOverrideBlockTexture方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderWorldBlock
import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
@Override
public boolean renderWorldBlock(final IBlockAccess world, final int x, final int y, final int z, final Block block, final int modelId, final RenderBlocks renderer) {
if (renderer.hasOverrideBlockTexture()) {
return renderer.renderStandardBlock(block, x, y, z);
}
RenderBlockConnectedTexturesEthereal.fakeRender.setWorld(renderer.blockAccess);
RenderBlockConnectedTexturesEthereal.fakeRender.curBlock = world.getBlock(x, y, z);
RenderBlockConnectedTexturesEthereal.fakeRender.curMeta = world.getBlockMetadata(x, y, z);
block.setBlockBoundsBasedOnState(RenderBlockConnectedTexturesEthereal.fakeRender.blockAccess, x, y, z);
RenderBlockConnectedTexturesEthereal.fakeRender.setRenderBoundsFromBlock(block);
boolean render = RenderBlockConnectedTexturesEthereal.fakeRender.renderStandardBlock(block, x, y, z);
RenderBlockConnectedTexturesEthereal.fakeRenderEtherealBlocks.setWorld(renderer.blockAccess);
RenderBlockConnectedTexturesEthereal.fakeRenderEtherealBlocks.curBlock = RenderBlockConnectedTexturesEthereal.fakeRender.curBlock;
RenderBlockConnectedTexturesEthereal.fakeRenderEtherealBlocks.curMeta = RenderBlockConnectedTexturesEthereal.fakeRender.curMeta;
final double h = 0.05;
RenderBlockConnectedTexturesEthereal.fakeRenderEtherealBlocks.setRenderBounds(h, h, h, 1.0 - h, 1.0 - h, 1.0 - h);
render &= RenderBlockConnectedTexturesEthereal.fakeRenderEtherealBlocks.renderStandardBlock(block, x, y, z);
return render;
}
示例2: renderWorldBlock
import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
public boolean renderWorldBlock(final IBlockAccess world, final int x, final int y, final int z, final Block block, final int modelId, final RenderBlocks renderer) {
if (renderer.hasOverrideBlockTexture()) {
return renderer.renderStandardBlock(block, x, y, z);
}
this.getFakeRender().setWorld(renderer.blockAccess);
this.getFakeRender().curBlock = world.getBlock(x, y, z);
this.getFakeRender().curMeta = world.getBlockMetadata(x, y, z);
block.setBlockBoundsBasedOnState(RenderBlockConnectedTextures.fakeRender.blockAccess, x, y, z);
this.getFakeRender().setRenderBoundsFromBlock(block);
return this.getFakeRender().renderStandardBlock(block, x, y, z);
}
示例3: renderWorldBlock
import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
renderer.setRenderBoundsFromBlock(block);
renderer.renderStandardBlock(block, x, y, z);
final boolean isBreaking = renderer.hasOverrideBlockTexture();
if (!isBreaking) renderer.setOverrideBlockTexture(BlockPIM.iIcon1);
final boolean hasPlayer = hasPlayer(world, x, y, z);
setTopPartBounds(renderer, hasPlayer);
renderer.renderStandardBlock(block, x, y, z);
if (!isBreaking) renderer.clearOverrideBlockTexture();
return true;
}
示例4: renderWorldBlock
import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
return renderer.hasOverrideBlockTexture() && renderer.renderStandardBlock(block, x, y, z);
}