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


Java RenderBlocks.setRenderBounds方法代码示例

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


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

示例1: renderItem

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
	
	RenderBlocks renderblocks = (RenderBlocks) data[0];
	Block block = Block.getBlockFromItem(item.getItem());
	if (item.hasTagCompound()) {
		NBTTagCompound tag = item.stackTagCompound;
		if (tag.hasKey("Fluid")) {
			FluidStack liquid = FluidStack.loadFluidStackFromNBT(item.getTagCompound().getCompoundTag("Fluid"));
			if (liquid != null) {
				GL11.glEnable(GL11.GL_BLEND);
				float height = ((float) liquid.amount / (float) 8000 * (float) 0.99);
				renderblocks.setRenderBounds(0.01, 0.01, 0.01, 0.99, height, 0.99);
				Utils.renderInventoryBlock(renderblocks, GrandFluidTank.renderblocks, liquid.getFluid());
				GL11.glDisable(GL11.GL_BLEND);
			}
		}

		GL11.glEnable(GL11.GL_ALPHA_TEST);
		renderblocks.setRenderBounds(0, 0, 0, 1, 1, 1);
		Utils.renderInventoryBlock(renderblocks, block, GrandFluidTank.glassfluidtank.getIcon(0, 0));
		GL11.glDisable(GL11.GL_ALPHA_TEST);

	}
}
 
开发者ID:grand-mine-inc,项目名称:Steam-and-Steel,代码行数:26,代码来源:RenderItemBlockGlassTank.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) {
	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

示例3: renderInventoryBlock

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
@Override
public void renderInventoryBlock(Block block, int meta, int modelID, RenderBlocks renderer) {
	OpenGLHelper.translate(-0.5F, -0.5F, -0.5F);

	renderer.setRenderBounds(2 / 16F, 14 / 16F, 2 / 16F, 14 / 16F, 1, 14 / 16F);
	renderCube(renderer, block, meta);
	renderer.setRenderBounds(0, 2 / 16F, 2 / 16F, 2 / 16F, 14 / 16F, 14 / 16F);
	renderCube(renderer, block, meta);
	renderer.setRenderBounds(2 / 16F, 2 / 16F, 0, 14 / 16F, 14 / 16F, 2 / 16F);
	renderCube(renderer, block, meta);
	renderer.setRenderBounds(2 / 16F, 2 / 16F, 14 / 16F, 14 / 16F, 14 / 16F, 1);
	renderCube(renderer, block, meta);
	renderer.setRenderBounds(14 / 16F, 2 / 16F, 2 / 16F, 1, 14 / 16F, 14 / 16F);
	renderCube(renderer, block, meta);
	renderer.setRenderBounds(2 / 16F, 0, 2 / 16F, 14 / 16F, 14 / 16F, 14 / 16F);
	renderCube(renderer, block, meta);
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:18,代码来源:BlockChorusFlowerRender.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) {
	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

示例5: renderInvNormalBlock

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
public static void renderInvNormalBlock(RenderBlocks renderBlocks, Block par1Block, int var2)
{
    renderBlocks.setRenderBounds(0.2F, 0.0F, 0.2F, 0.8F, 0.5F, 0.8F);
    BlockRendererEgg.renderStandardBlock(renderBlocks, par1Block, var2);

    renderBlocks.setRenderBounds(0.52F, 0.0F, 0.4F, 0.68F, 0.68F, 0.6F);
    BlockRendererEgg.renderStandardBlock(renderBlocks, par1Block, var2);

    renderBlocks.setRenderBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.65F, 0.75F);
    BlockRendererEgg.renderStandardBlock(renderBlocks, par1Block, var2);

    renderBlocks.setRenderBounds(0.15F, 0.0F, 0.25F, 0.2F, 0.4F, 0.75F);
    BlockRendererEgg.renderStandardBlock(renderBlocks, par1Block, var2);

    renderBlocks.setRenderBounds(0.8F, 0.0F, 0.25F, 0.85F, 0.4F, 0.75F);
    BlockRendererEgg.renderStandardBlock(renderBlocks, par1Block, var2);

    renderBlocks.setRenderBounds(0.25F, 0.0F, 0.1F, 0.75F, 0.4F, 0.2F);
    BlockRendererEgg.renderStandardBlock(renderBlocks, par1Block, var2);

    renderBlocks.setRenderBounds(0.25F, 0.0F, 0.8F, 0.75F, 0.4F, 0.9F);
    BlockRendererEgg.renderStandardBlock(renderBlocks, par1Block, var2);

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

示例6: setRotatedRenderBounds

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
private void setRotatedRenderBounds(RenderBlocks renderer, byte rotation, float minX, float minY, float minZ, float maxX, float maxY, float maxZ) {
	switch (rotation) {
	case 0:
		renderer.setRenderBounds(minX, minY, minZ, maxX, maxY, maxZ);
		break;
	case 1:
		renderer.setRenderBounds(MAX_Z - maxZ, minY, minX, MAX_Z - minZ, maxY, maxX);
		break;
	case 2:
		renderer.setRenderBounds(minX, minY, MAX_Z - maxZ, maxX, maxY, MAX_Z - minZ);
		break;
	case 3:
		renderer.setRenderBounds(minZ, minY, minX, maxZ, maxY, maxX);
		break;
	default:
		break;
	}
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:19,代码来源:RenderLatexExtractor.java

示例7: setRotatedRenderBounds

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
private void setRotatedRenderBounds(RenderBlocks renderer, byte rotation, float minX, float minY, float minZ, float maxX, float maxY, float maxZ) {
	switch (rotation) {
	case 0:
		renderer.setRenderBounds(minX, minY, minZ, maxX, maxY, maxZ);
		break;
	case 1:
		renderer.setRenderBounds(MAX_Z - maxZ - 1F + P, minY, minX, MAX_Z - minZ - 1F + P, maxY, maxX);
		break;
	case 2:
		renderer.setRenderBounds(1F - maxX, minY, MAX_Z - maxZ - 1F + P, 1F - minX, maxY, MAX_Z - minZ - 1F + P);
		break;
	case 3:
		renderer.setRenderBounds(minZ, minY, 1F - maxX, maxZ, maxY, 1F - minX);
		break;
	default:
		break;
	}
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:19,代码来源:RenderWireDrawBench.java

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

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

示例10: renderInventoryBlock

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
{
    final float minSize = 0.4F;
    final float maxSize = 0.6F;

    final Tessellator var3 = Tessellator.instance;
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    renderer.setRenderBounds(minSize, minSize, 0.0F, maxSize, maxSize, 1.0F);
    var3.startDrawingQuads();
    var3.setNormal(0.0F, -1.0F, 0.0F);
    renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.0F, 1.0F, 0.0F);
    renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.0F, 0.0F, -1.0F);
    renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.0F, 0.0F, 1.0F);
    renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(-1.0F, 0.0F, 0.0F);
    renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(1.0F, 0.0F, 0.0F);
    renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
    var3.draw();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:36,代码来源:BlockRendererHydrogenPipe.java

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

示例12: renderInvNormalBlock

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
public static void renderInvNormalBlock(RenderBlocks var0, Block var1, int var2)
{
    var0.setRenderBounds(0.2F, 0.2F, 0.2F, 0.8F, 0.8F, 0.8F);
    BlockRendererMeteor.renderStandardBlock(var0, var1, var2);

    var0.setRenderBounds(0.52F, 0.85F, 0.4F, 0.68F, 0.88F, 0.6F);
    BlockRendererMeteor.renderStandardBlock(var0, var1, var2);

    var0.setRenderBounds(0.25F, 0.8F, 0.25F, 0.75F, 0.85F, 0.75F);
    BlockRendererMeteor.renderStandardBlock(var0, var1, var2);

    var0.setRenderBounds(0.25F, 0.15F, 0.25F, 0.75F, 0.2F, 0.75F);
    BlockRendererMeteor.renderStandardBlock(var0, var1, var2);

    var0.setRenderBounds(0.15F, 0.3F, 0.25F, 0.2F, 0.7F, 0.75F);
    BlockRendererMeteor.renderStandardBlock(var0, var1, var2);

    var0.setRenderBounds(0.8F, 0.3F, 0.25F, 0.85F, 0.7F, 0.75F);
    BlockRendererMeteor.renderStandardBlock(var0, var1, var2);

    var0.setRenderBounds(0.25F, 0.3F, 0.15F, 0.75F, 0.7F, 0.2F);
    BlockRendererMeteor.renderStandardBlock(var0, var1, var2);

    var0.setRenderBounds(0.25F, 0.3F, 0.8F, 0.75F, 0.7F, 0.85F);
    BlockRendererMeteor.renderStandardBlock(var0, var1, var2);

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

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

示例14: renderInvNormalBlock

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
public static void renderInvNormalBlock(RenderBlocks var0, Block var1, int var2)
{
    final Tessellator var3 = Tessellator.instance;
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    var0.setRenderBounds(0.0F, 0.0F, 0.0F, 1F, 1F, 1F);
    var3.startDrawingQuads();
    var3.setNormal(0.0F, -0.8F, 0.0F);
    var0.renderFaceYNeg(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(0, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.0F, 0.8F, 0.0F);
    var0.renderFaceYPos(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(1, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.0F, 0.0F, -0.8F);
    var0.renderFaceXPos(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(2, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.0F, 0.0F, 0.8F);
    var0.renderFaceXNeg(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(3, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(-0.8F, 0.0F, 0.0F);
    var0.renderFaceZNeg(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(4, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.8F, 0.0F, 0.0F);
    var0.renderFaceZPos(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(5, var2));
    var3.draw();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:32,代码来源:BlockRendererUnlitTorch.java

示例15: renderInvNormalBlock

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
public static void renderInvNormalBlock(RenderBlocks var0, Block var1, int var2)
{
    final Tessellator var3 = Tessellator.instance;
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    var0.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    var3.startDrawingQuads();
    var3.setNormal(0.0F, -1.0F, 0.0F);
    var0.renderFaceYNeg(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(0, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.0F, 1.0F, 0.0F);
    var0.renderFaceYPos(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(1, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.0F, 0.0F, -1.0F);
    var0.renderFaceXPos(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(2, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(0.0F, 0.0F, 1.0F);
    var0.renderFaceXNeg(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(3, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(-1.0F, 0.0F, 0.0F);
    var0.renderFaceZNeg(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(4, var2));
    var3.draw();
    var3.startDrawingQuads();
    var3.setNormal(1.0F, 0.0F, 0.0F);
    var0.renderFaceZPos(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(5, var2));
    var3.draw();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:32,代码来源:BlockRendererBreathableAir.java


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