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


Java RenderBlocks.renderStandardBlock方法代码示例

本文整理汇总了Java中net.minecraft.client.renderer.RenderBlocks.renderStandardBlock方法的典型用法代码示例。如果您正苦于以下问题:Java RenderBlocks.renderStandardBlock方法的具体用法?Java RenderBlocks.renderStandardBlock怎么用?Java RenderBlocks.renderStandardBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.renderer.RenderBlocks的用法示例。


在下文中一共展示了RenderBlocks.renderStandardBlock方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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) {
	if (modelId == renderID) {
		TileGlassFluidTank tank = (TileGlassFluidTank) world.getTileEntity(x, y, z);
		if (renderPass == 0) {
			if (tank.tank.getFluid() != null) {
				Fluid fluid = tank.tank.getFluid().getFluid();
				Utils.renderBlockByCompleteness(GrandFluidTank.renderblocks,fluid, world.getBlockMetadata(x, y, z), renderer, (double) tank.tank.getFluidAmount() / (double) tank.tank.getCapacity(), x, y, z);
			}
		}
		else if (renderPass == 1) {
			renderer.setRenderBounds(0, 0, 0, 1, 1, 1);
			renderer.renderStandardBlock(block, x, y, z);
			renderer.setRenderFromInside(true);
			renderer.setRenderBounds(0, 0, 0, 1, 1, 1);
			renderer.renderStandardBlock(block, x, y, z);
			renderer.setRenderFromInside(false);
		}
	}
	return true;
}
 
开发者ID:grand-mine-inc,项目名称:Steam-and-Steel,代码行数:22,代码来源:RenderGlassTank.java

示例2: 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.renderAllFaces = true;

	renderer.setRenderBounds(2 / 16F, 14 / 16F, 2 / 16F, 14 / 16F, 1, 14 / 16F);
	renderer.renderStandardBlock(block, x, y, z);

	renderer.setRenderBounds(0, 2 / 16F, 2 / 16F, 2 / 16F, 14 / 16F, 14 / 16F);
	renderer.renderStandardBlock(block, x, y, z);

	renderer.setRenderBounds(2 / 16F, 2 / 16F, 0, 14 / 16F, 14 / 16F, 2 / 16F);
	renderer.renderStandardBlock(block, x, y, z);

	renderer.setRenderBounds(2 / 16F, 2 / 16F, 14 / 16F, 14 / 16F, 14 / 16F, 1);
	renderer.renderStandardBlock(block, x, y, z);

	renderer.setRenderBounds(14 / 16F, 2 / 16F, 2 / 16F, 1, 14 / 16F, 14 / 16F);
	renderer.renderStandardBlock(block, x, y, z);

	renderer.setRenderBounds(2 / 16F, 0, 2 / 16F, 14 / 16F, 14 / 16F, 14 / 16F);
	renderer.renderStandardBlock(block, x, y, z);

	renderer.renderAllFaces = false;
	return true;
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:26,代码来源:BlockChorusFlowerRender.java

示例3: 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

示例4: renderMachineInWorld

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
public void renderMachineInWorld(RenderBlocks renderBlocks, IBlockAccess iblockaccess, Block par1Block, int x, int y, int z)
{
    par1Block.setBlockBoundsBasedOnState(iblockaccess, x, y, z);
    renderBlocks.setRenderBoundsFromBlock(par1Block);

    int metadata = iblockaccess.getBlockMetadata(x, y, z) & 12;

    if (metadata == BlockMachineMars.CRYOGENIC_CHAMBER_METADATA && par1Block == MarsBlocks.machine)
    {

    }
    else
    {
        renderBlocks.renderStandardBlock(par1Block, x, y, z);
    }

    renderBlocks.clearOverrideBlockTexture();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:19,代码来源:BlockRendererMachine.java

示例5: renderBlockByCompleteness

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
public static void renderBlockByCompleteness(Block block, Fluid fluid, int meta, RenderBlocks renderer, double complete, int x, int y, int z) {

		renderer.setRenderBounds(0.01, 0.01, 0.01, 0.99, complete * 0.99, 0.99);
		renderer.setOverrideBlockTexture(fluid.getIcon());
		renderer.renderStandardBlock(block, x, y, z);
		renderer.clearOverrideBlockTexture();
	}
 
开发者ID:grand-mine-inc,项目名称:Steam-and-Steel,代码行数:8,代码来源:Utils.java

示例6: 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.renderStandardBlock(ModBlocks.slime, x, y, z);
	float f = 0.0625F;
	renderer.setRenderBounds(f * 3, f * 3, f * 3, f * 13, f * 13, f * 13);
	renderer.renderAllFaces = true;
	boolean flag = renderer.renderStandardBlock(ModBlocks.slime, x, y, z);
	renderer.renderAllFaces = false;
	return flag;
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:11,代码来源:BlockSlimeBlockRender.java

示例7: 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)
{
    setBound(_bound, renderer);
    renderer.renderStandardBlock(block, x, y, z);

    return true;
}
 
开发者ID:Wahazar,项目名称:TFCPrimitiveTech,代码行数:9,代码来源:RenderWoodenPress.java

示例8: renderWorldBlock

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
private boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, BlockInfusedBlockOre block, int modelId,
		RenderBlocks renderer) {
	renderer.setRenderBoundsFromBlock(block);
	renderer.renderStandardBlock(block.getBaseBlock(), x, y, z);
	renderer.clearOverrideBlockTexture();
	return true;
}
 
开发者ID:MJaroslav,项目名称:ThaumOres,代码行数:8,代码来源:BlockInfusedBlockOreRenderer.java

示例9: 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

示例10: renderBlockMeteor

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
public void renderBlockMeteor(RenderBlocks renderBlocks, Block par1Block, IBlockAccess var1, int par2, int par3, int par4)
{
    var1.getBlockMetadata(par2, par3, par4);

    renderBlocks.setRenderBounds(0.2F, 0.0F, 0.2F, 0.8F, 0.5F, 0.8F);
    renderBlocks.renderStandardBlock(par1Block, par2, par3, par4);

    renderBlocks.setRenderBounds(0.52F, 0.0F, 0.4F, 0.68F, 0.68F, 0.6F);
    renderBlocks.renderStandardBlock(par1Block, par2, par3, par4);

    renderBlocks.setRenderBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.65F, 0.75F);
    renderBlocks.renderStandardBlock(par1Block, par2, par3, par4);

    renderBlocks.setRenderBounds(0.15F, 0.0F, 0.25F, 0.2F, 0.4F, 0.75F);
    renderBlocks.renderStandardBlock(par1Block, par2, par3, par4);

    renderBlocks.setRenderBounds(0.8F, 0.0F, 0.25F, 0.85F, 0.4F, 0.75F);
    renderBlocks.renderStandardBlock(par1Block, par2, par3, par4);

    renderBlocks.setRenderBounds(0.25F, 0.0F, 0.1F, 0.75F, 0.4F, 0.2F);
    renderBlocks.renderStandardBlock(par1Block, par2, par3, par4);

    renderBlocks.setRenderBounds(0.25F, 0.0F, 0.8F, 0.75F, 0.4F, 0.9F);
    renderBlocks.renderStandardBlock(par1Block, par2, par3, par4);

    renderBlocks.clearOverrideBlockTexture();
    par1Block.setBlockBoundsForItemRender();
    renderBlocks.uvRotateTop = 0;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:30,代码来源:BlockRendererEgg.java

示例11: renderNasaBench

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
public void renderNasaBench(RenderBlocks renderBlocks, IBlockAccess iblockaccess, Block par1Block, int par2, int par3, int par4)
{
    renderBlocks.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.92F, 1.0F);
    renderBlocks.renderStandardBlock(par1Block, par2, par3, par4);

    renderBlocks.clearOverrideBlockTexture();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:8,代码来源:BlockRendererNasaWorkbench.java

示例12: 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

示例13: 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) 
{
	int ovenType = 0;
	
	if(block instanceof TFPBrickOven)
		ovenType = ((TFPBrickOven)block).getOvenType();
	
	IIcon cobbleIcon = TFCBlocks.stoneIgExCobble.getIcon(0, ovenType);
	
	if(ovenType > 3)
		cobbleIcon = TFCBlocks.stoneIgInCobble.getIcon(0, ovenType - 4);
			
	renderer.renderAllFaces = true;
	
	renderer.setRenderBounds(0, 0, 0, 1, 1, 1);

	renderer.overrideBlockTexture = cobbleIcon;
	renderer.renderStandardBlock(block, x, y, z);
	renderer.clearOverrideBlockTexture();
	
	renderer.renderStandardBlock(block, x, y, z);
	
	renderer.uvRotateTop = 0;
	renderer.uvRotateBottom = 0;
	renderer.uvRotateWest = 0;
	renderer.uvRotateEast = 0;
	renderer.uvRotateNorth = 0;
	renderer.uvRotateSouth = 0;
	
	renderer.renderAllFaces = false;
	return true;
}
 
开发者ID:StrayWolfe,项目名称:TerrafirmaPunk-Tweaks,代码行数:35,代码来源:TFPBrickOvenRenderer.java

示例14: 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

示例15: 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) {
    final int metadata = world.getBlockMetadata(x, y, z);
    if (!(block instanceof IMultiBoxBlock)) {
        return false;
    }
    final BoxModel boxes = ((IMultiBoxBlock)block).getWorldModel(world, x, y, z);
    if (boxes == null || boxes.size() == 0) {
        return false;
    }
    ((IMultiBoxBlock)block).prepareForRender(boxes.label);
    for (final Box b1 : boxes) {
        final float r = (b1.color >> 16 & 0xFF) / 255.0f;
        final float g = (b1.color >> 8 & 0xFF) / 255.0f;
        final float b2 = (b1.color & 0xFF) / 255.0f;
        ((IMultiBoxBlock)block).prepareForRender(b1.label);
        block.setBlockBounds(b1.minX, b1.minY, b1.minZ, b1.maxX, b1.maxY, b1.maxZ);
        renderer.uvRotateEast = b1.uvRotateEast;
        renderer.uvRotateWest = b1.uvRotateWest;
        renderer.uvRotateSouth = b1.uvRotateSouth;
        renderer.uvRotateNorth = b1.uvRotateNorth;
        renderer.uvRotateTop = b1.uvRotateTop;
        renderer.uvRotateBottom = b1.uvRotateBottom;
        renderer.setRenderBoundsFromBlock(block);
        if (b1.renderAsNormalBlock) {
            renderer.renderStandardBlock(block, x + b1.offsetx, y + b1.offsety, z + b1.offsetz);
        }
        else {
            renderer.enableAO = false;
            final Tessellator tessellator = Tessellator.instance;
            tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x + b1.offsetx, y + b1.offsety, z + b1.offsetz));
            tessellator.setColorOpaque_F(r * 0.5f, g * 0.5f, b2 * 0.5f);
            renderer.flipTexture = false;
            if (!b1.invisibleSide[0]) {
                renderer.renderFaceYNeg(block, (double)(x + b1.offsetx), (double)(y + b1.offsety), (double)(z + b1.offsetz), this.getTexture(world, x, y, z, renderer, b1, block, 0, metadata));
            }
            tessellator.setColorOpaque_F(r, g, b2);
            if (!b1.invisibleSide[1]) {
                renderer.renderFaceYPos(block, (double)(x + b1.offsetx), (double)(y + b1.offsety), (double)(z + b1.offsetz), this.getTexture(world, x, y, z, renderer, b1, block, 1, metadata));
            }
            tessellator.setColorOpaque_F(r * 0.8f, g * 0.8f, b2 * 0.8f);
            renderer.flipTexture = true;
            if (!b1.invisibleSide[2]) {
                renderer.renderFaceZNeg(block, (double)(x + b1.offsetx), (double)(y + b1.offsety), (double)(z + b1.offsetz), this.getTexture(world, x, y, z, renderer, b1, block, 2, metadata));
            }
            renderer.flipTexture = false;
            if (!b1.invisibleSide[3]) {
                renderer.renderFaceZPos(block, (double)(x + b1.offsetx), (double)(y + b1.offsety), (double)(z + b1.offsetz), this.getTexture(world, x, y, z, renderer, b1, block, 3, metadata));
            }
            tessellator.setColorOpaque_F(r * 0.6f, g * 0.6f, b2 * 0.6f);
            if (!b1.invisibleSide[4]) {
                renderer.renderFaceXNeg(block, (double)(x + b1.offsetx), (double)(y + b1.offsety), (double)(z + b1.offsetz), this.getTexture(world, x, y, z, renderer, b1, block, 4, metadata));
            }
            renderer.flipTexture = true;
            if (!b1.invisibleSide[5]) {
                renderer.renderFaceXPos(block, (double)(x + b1.offsetx), (double)(y + b1.offsety), (double)(z + b1.offsetz), this.getTexture(world, x, y, z, renderer, b1, block, 5, metadata));
            }
            renderer.flipTexture = false;
        }
        renderer.uvRotateBottom = 0;
        renderer.uvRotateTop = 0;
        renderer.uvRotateSouth = 0;
        renderer.uvRotateNorth = 0;
        renderer.uvRotateWest = 0;
        renderer.uvRotateEast = 0;
    }
    block.setBlockBoundsBasedOnState(world, x, y, z);
    return true;
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:69,代码来源:RenderBlockMultiBlock.java


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