Java Code Examples for net.minecraft.client.renderer.RenderBlocks#renderBlockAllFaces()

The following examples show how to use net.minecraft.client.renderer.RenderBlocks#renderBlockAllFaces() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RenderLaserSource.java    From Artifacts with MIT License 5 votes vote down vote up
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
	int l = 1;
	if(world != null)
		l = world.getBlockMetadata(x, y, z);
	IIcon laser = block.getIcon(0,0);
	Tessellator tessellator = Tessellator.instance;
	tessellator.setBrightness(15728880);
	tessellator.setColorOpaque_F(1, 1, 1);
       float f = 1F - 1F/128F;
       renderer.renderMaxX = 1;
       renderer.renderMinX = 0;
       renderer.renderMaxY = 1;
       renderer.renderMinY = 0;
       renderer.renderMaxZ = 1;
       renderer.renderMinZ = 0;
	switch(l&3) {
		case 0:
			renderer.renderFaceZPos(Blocks.ice, x, y, z-f, laser);
			break;
		case 1:
			renderer.renderFaceXNeg(Blocks.ice, x+f, y, z, laser);
			break;
		case 2:
			renderer.renderFaceZNeg(Blocks.ice, x, y, z+f, laser);
			break;
		case 3:
			renderer.renderFaceXPos(Blocks.ice, x-f, y, z, laser);
			break;
	}
	if(world != null)
		renderer.renderBlockAllFaces(BlockLaserBeam.instance, x, y, z);
	return true;
}
 
Example 2
Source File: ThaumcraftCandleSource.java    From GardenCollection with MIT License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void render (RenderBlocks renderer, int x, int y, int z, int meta, int pass) {
    renderer.renderBlockAllFaces(blockCandle, x, y, z);
}
 
Example 3
Source File: VanillaLanternSource.java    From GardenCollection with MIT License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void render (RenderBlocks renderer, int x, int y, int z, int meta, int pass) {
    renderer.renderBlockAllFaces(Blocks.torch, x, y, z);
}
 
Example 4
Source File: VanillaLanternSource.java    From GardenCollection with MIT License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void render (RenderBlocks renderer, int x, int y, int z, int meta, int pass) {
    renderer.renderBlockAllFaces(Blocks.redstone_torch, x, y, z);
}