当前位置: 首页>>代码示例>>Java>>正文


Java RenderBlocks.hasOverrideBlockTexture方法代码示例

本文整理汇总了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;
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:20,代码来源:RenderBlockConnectedTexturesEthereal.java

示例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);
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:12,代码来源:RenderBlockConnectedTextures.java

示例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;
}
 
开发者ID:Avaja,项目名称:OpenTechnology,代码行数:16,代码来源:BlockPIMRender.java

示例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);
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:5,代码来源:BlockChestRenderer.java


注:本文中的net.minecraft.client.renderer.RenderBlocks.hasOverrideBlockTexture方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。