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