Java Code Examples for net.minecraft.client.renderer.Tessellator#addVertexWithUV()

The following examples show how to use net.minecraft.client.renderer.Tessellator#addVertexWithUV() . 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: GuiNBTTree.java    From NBTEdit with GNU General Public License v3.0 6 votes vote down vote up
protected void overlayBackground(int par1, int par2, int par3, int par4)
{
	Tessellator var5 = Tessellator.instance;
	mc.renderEngine.bindTexture(optionsBackground);
	//GL11.glBindTexture(GL11.GL_TEXTURE_2D, mc.renderEngine.getTexture( "/gui/background.png"));
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	float var6 = 32.0F;
	var5.startDrawingQuads();
	var5.setColorRGBA_I(4210752, par4);
	var5.addVertexWithUV(0.0D, (double)par2, 0.0D, 0.0D, (double)((float)par2 / var6));
	var5.addVertexWithUV((double)this.width, (double)par2, 0.0D, (double)((float)this.width / var6), (double)((float)par2 / var6));
	var5.setColorRGBA_I(4210752, par3);
	var5.addVertexWithUV((double)this.width, (double)par1, 0.0D, (double)((float)this.width / var6), (double)((float)par1 / var6));
	var5.addVertexWithUV(0.0D, (double)par1, 0.0D, 0.0D, (double)((float)par1 / var6));
	var5.draw();
}
 
Example 2
Source File: RenderAutoChisel.java    From Chisel-2 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
	Tessellator tes = Tessellator.instance;
	IIcon icon = renderer.hasOverrideBlockTexture() ? renderer.overrideBlockTexture : block.getIcon(0, 0);
	tes.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
	tes.setColorOpaque_F(1, 1, 1);
	tes.addTranslation(x, y, z + 1);
	for (GroupObject go : model.groupObjects) {
		for (Face f : go.faces) {
			Vertex n = f.faceNormal;
			tes.setNormal(n.x, n.y, n.z);
			for (int i = 0; i < f.vertices.length; i++) {
				Vertex vert = f.vertices[i];
				TextureCoordinate t = f.textureCoordinates[i];
				if (!renderer.hasOverrideBlockTexture()) {
					tes.addVertexWithUV(vert.x, vert.y, vert.z, icon.getInterpolatedU(t.u * 16), icon.getInterpolatedV(t.v * 16));
				} else {
					tes.addVertexWithUV(vert.x, vert.y, vert.z, icon.getInterpolatedU((t.u * 64) % 16), icon.getInterpolatedV((t.v * 64) % 16));
				}
			}
		}
	}
	tes.addTranslation(-x, -y, -z - 1);
	return true;
}
 
Example 3
Source File: ModelWandPart.java    From Gadomancy with GNU Lesser General Public License v3.0 6 votes vote down vote up
private void drawRune(double x, double y, double z, int rune, EntityPlayer player) {
    GL11.glPushMatrix();
    UtilsFX.bindTexture("textures/misc/script.png");
    float r = MathHelper.sin((player.ticksExisted + rune * 5) / 5.0F) * 0.1F + 0.88F;
    float g = MathHelper.sin((player.ticksExisted + rune * 5) / 7.0F) * 0.1F + 0.63F;
    float alpha = MathHelper.sin((player.ticksExisted + rune * 5) / 10.0F) * 0.2F;
    GL11.glColor4f(r, g, 0.2F, alpha + 0.6F);
    GL11.glRotated(90.0D, 0.0D, 0.0D, 1.0D);
    GL11.glTranslated(x, y, z);

    Tessellator tessellator = Tessellator.instance;
    float var8 = 0.0625F * rune;
    float var9 = var8 + 0.0625F;
    float var10 = 0.0F;
    float var11 = 1.0F;
    tessellator.startDrawingQuads();
    tessellator.setColorRGBA_F(r, g, 0.2F, alpha + 0.6F);
    tessellator.addVertexWithUV(-0.06D - alpha / 40.0F, 0.06D + alpha / 40.0F, 0.0D, var9, var11);
    tessellator.addVertexWithUV(0.06D + alpha / 40.0F, 0.06D + alpha / 40.0F, 0.0D, var9, var10);
    tessellator.addVertexWithUV(0.06D + alpha / 40.0F, -0.06D - alpha / 40.0F, 0.0D, var8, var10);
    tessellator.addVertexWithUV(-0.06D - alpha / 40.0F, -0.06D - alpha / 40.0F, 0.0D, var8, var11);
    tessellator.draw();
    GL11.glPopMatrix();
}
 
Example 4
Source File: MoCEntityFXVanish.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{
    //func_98187_b() = bindTexture();
	FMLClientHandler.instance().getClient().renderEngine.bindTexture(MoCreatures.proxy.MISC_TEXTURE + "fxvanish.png");
    float scale = 0.1F * this.particleScale;
    float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
    float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
    float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
    float colorIntensity = 1.0F;
    par1Tessellator.setColorOpaque_F(this.particleRed * colorIntensity, this.particleGreen * colorIntensity, this.particleBlue * colorIntensity);//, 1.0F);

    par1Tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D);
    par1Tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D);
    par1Tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D);
    par1Tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D);

    
}
 
Example 5
Source File: LingeringPotionRenderer.java    From Et-Futurum with The Unlicense 6 votes vote down vote up
private void renderIcon(IIcon icon) {
	Tessellator tessellator = Tessellator.instance;

	float minU = icon.getMinU();
	float maxU = icon.getMaxU();
	float minV = icon.getMinV();
	float maxV = icon.getMaxV();

	OpenGLHelper.rotate(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
	OpenGLHelper.rotate(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, 1.0F, 0.0F);
	tessellator.addVertexWithUV(-0.5F, -0.25F, 0.0D, minU, maxV);
	tessellator.addVertexWithUV(0.5F, -0.25F, 0.0D, maxU, maxV);
	tessellator.addVertexWithUV(0.5F, 0.75F, 0.0D, maxU, minV);
	tessellator.addVertexWithUV(-0.5F, 0.75F, 0.0D, minU, minV);
	tessellator.draw();
}
 
Example 6
Source File: MoCEntityFXStar.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{
	//func_98187_b = bindTexture(String)
	FMLClientHandler.instance().getClient().renderEngine.bindTexture(MoCreatures.proxy.MISC_TEXTURE + "fxstar.png");
    float sizeFactor = 0.1F * this.particleScale;
    float var13 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
    float var14 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
    float var15 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
    float var16 = 1.2F - ((float) Math.random() * 0.5F);
    par1Tessellator.setColorRGBA_F(this.particleRed * var16, this.particleGreen * var16, this.particleBlue * var16, 1.0F);
    par1Tessellator.addVertexWithUV((double) (var13 - par3 * sizeFactor - par6 * sizeFactor), (double) (var14 - par4 * sizeFactor), (double) (var15 - par5 * sizeFactor - par7 * sizeFactor), 0D, 1D);
    par1Tessellator.addVertexWithUV((double) (var13 - par3 * sizeFactor + par6 * sizeFactor), (double) (var14 + par4 * sizeFactor), (double) (var15 - par5 * sizeFactor + par7 * sizeFactor), 1D, 1D);
    par1Tessellator.addVertexWithUV((double) (var13 + par3 * sizeFactor + par6 * sizeFactor), (double) (var14 + par4 * sizeFactor), (double) (var15 + par5 * sizeFactor + par7 * sizeFactor), 1D, 0D);
    par1Tessellator.addVertexWithUV((double) (var13 + par3 * sizeFactor - par6 * sizeFactor), (double) (var14 - par4 * sizeFactor), (double) (var15 + par5 * sizeFactor - par7 * sizeFactor), 0D, 0D);
   
}
 
Example 7
Source File: BeefGuiControlBase.java    From BigReactors with MIT License 5 votes vote down vote up
protected static void drawTexturedModelRectFromIcon(int x, int y, IIcon icon, int width, int height)
{
    Tessellator tessellator = Tessellator.instance;
    tessellator.startDrawingQuads();
    tessellator.addVertexWithUV((double)(x + 0), (double)(y + height), 0.0D, (double)icon.getMinU(), (double)icon.getMaxV());
    tessellator.addVertexWithUV((double)(x + width), (double)(y + height), 0.0D, (double)icon.getMaxU(), (double)icon.getMaxV());
    tessellator.addVertexWithUV((double)(x + width), (double)(y + 0), 0.0D, (double)icon.getMaxU(), (double)icon.getMinV());
    tessellator.addVertexWithUV((double)(x + 0), (double)(y + 0), 0.0D, (double)icon.getMinU(), (double)icon.getMinV());
    tessellator.draw();
}
 
Example 8
Source File: RendererRoadLine.java    From Chisel-2 with GNU General Public License v2.0 5 votes vote down vote up
public void renderTopFace(double y, IIcon icon) {
	Tessellator tessellator = Tessellator.instance;

	tessellator.addVertexWithUV(1, y, 0, icon.getMaxU(), icon.getMinV());
	tessellator.addVertexWithUV(0, y, 0, icon.getMinU(), icon.getMinV());
	tessellator.addVertexWithUV(0, y, 1, icon.getMinU(), icon.getMaxV());
	tessellator.addVertexWithUV(1, y, 1, icon.getMaxU(), icon.getMaxV());
}
 
Example 9
Source File: PotionCustomTexture.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void renderInventoryEffect(int x, int y, PotionEffect effect, Minecraft mc) {
    Tessellator tes = Tessellator.instance;
    mc.renderEngine.bindTexture(texture);
    tes.startDrawingQuads();
    Color c = new Color(getLiquidColor());
    tes.setColorRGBA(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha());
    tes.addVertexWithUV(x + 6, y + 7, 0, 0, 0);
    tes.addVertexWithUV(x + 6,      y + 7 + 18, 0, 0, 1);
    tes.addVertexWithUV(x + 6 + 18, y + 7 + 18, 0, 1, 1);
    tes.addVertexWithUV(x + 6 + 18, y + 7, 0, 1, 0);
    tes.draw();
}
 
Example 10
Source File: ProgWidget.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void render(){
    FMLClientHandler.instance().getClient().getTextureManager().bindTexture(getTexture());
    int width = getWidth() + (getParameters() != null && getParameters().length > 0 ? 10 : 0);
    int height = getHeight() + (hasStepOutput() ? 10 : 0);
    Tessellator t = Tessellator.instance;
    t.startDrawingQuads();
    t.addVertexWithUV(0, 0, 0, 0, 0);
    t.addVertexWithUV(0, height, 0, 0, 1);
    t.addVertexWithUV(width, height, 0, 1, 1);
    t.addVertexWithUV(width, 0, 0, 1, 0);
    t.draw();
}
 
Example 11
Source File: WidgetTank.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void render(int mouseX, int mouseY, float partialTick){
    GL11.glDisable(GL11.GL_LIGHTING);

    Fluid fluid = tank.getFluid() != null ? tank.getFluid().getFluid() : null;
    IIcon icon = fluid != null ? fluid.getStillIcon() : null;
    int amt = tank.getFluidAmount();
    int capacity = tank.getCapacity();
    int height = 64;
    int width = 16;

    if(fluid != null && icon != null && amt > 0 && capacity > 0) {
        Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);

        double fluidPercentage = amt / (double)capacity;
        double fluidHeight = height * fluidPercentage;

        GL11.glPushMatrix();
        {
            GL11.glTranslated(0, height, 0);
            GL11.glEnable(GL11.GL_BLEND);
            while(fluidHeight > 0) {
                double moved = Math.min(fluidHeight, icon.getIconHeight());
                GL11.glTranslated(0, -moved, 0);
                Tessellator t = Tessellator.instance;
                t.startDrawingQuads();
                t.setColorOpaque_I(fluid.getColor(tank.getFluid()));
                {
                    t.addVertexWithUV(x, y, 0, icon.getMinU(), icon.getMinV() + (icon.getMaxV() - icon.getMinV()) * (1 - moved / icon.getIconHeight()));
                    t.addVertexWithUV(x, y + moved, 0, icon.getMinU(), icon.getMaxV());
                    t.addVertexWithUV(x + width, y + moved, 0, icon.getMaxU(), icon.getMaxV());
                    t.addVertexWithUV(x + width, y, 0, icon.getMaxU(), icon.getMinV() + (icon.getMaxV() - icon.getMinV()) * (1 - moved / icon.getIconHeight()));
                }
                t.draw();
                fluidHeight -= moved;
            }
            GL11.glDisable(GL11.GL_BLEND);
        }
        GL11.glPopMatrix();
    }

    GL11.glColor4d(1, 1, 1, 1);
    Minecraft.getMinecraft().getTextureManager().bindTexture(Textures.WIDGET_TANK);
    Gui.func_146110_a(x, y, 0, 0, 16, 64, 16, 64);
}
 
Example 12
Source File: AntibuilderParticle.java    From Artifacts with MIT License 4 votes vote down vote up
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{
	par1Tessellator.draw();
	GL11.glPushMatrix();

	ParticleUtils.bindTexture("textures/items/radarparticle.png");

	//GL11.glDepthMask(false);
	GL11.glDepthFunc(GL11.GL_ALWAYS);
	//GL11.glEnable(3042);
	//GL11.glBlendFunc(770, 1);
	GL11.glEnable(GL11.GL_BLEND);
	GL11.glBlendFunc(GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_SRC_ALPHA);
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1F);
	//GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
	par1Tessellator.startDrawingQuads();
	/*int bright = -1;
	try {
		bright = ReflectionHelper.getPrivateValue(Tessellator.class, par1Tessellator, new String[] { "brightness", "b", "field_78401_l" });
	}
	catch (Exception e) {
		System.out.println("Bad reflection");
	}*/
	
	par1Tessellator.setBrightness(255);
	
	float var8 = ((float)this.particleAge + par2) / (float)this.particleMaxAge * 32.0F;

	if (var8 < 0.0F)
	{
		var8 = 0.0F;
	}

	if (var8 > 1.0F)
	{
		var8 = 1.0F;
	}

	this.particleScale = this.reddustParticleScale;// * var8;
	//replace this
	//super.renderParticle(par1Tessellator, par2, par3, par4, par5, par6, par7);
	
	//Minecraft.getMinecraft().renderEngine.bindTexture(rl);

	float f6 = (float)this.particleTextureIndexX / 32.0F;
	float f7 = f6 + 0.029375F;
	//              0.0624375
	//              0.0625
	float f8 = (float)this.particleTextureIndexY / 32.0F;
	float f9 = f8 + 0.029375F;
	float f10 = 0.15F;// * this.particleScale;

	float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)par2 - interpPosX);
	float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)par2 - interpPosY);
	float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)par2 - interpPosZ);
	float f14 = 1.0F;
	//par1Tessellator.draw();
	//GL11.glDepthFunc(GL11.GL_ALWAYS);
	//par1Tessellator.startDrawingQuads();
	//par1Tessellator.setBrightness(255);
	//GL11.glDisable(GL11.GL_DEPTH_TEST);
	float al = 0.0F;
	EntityPlayer player = (EntityPlayer) this.worldObj.findNearestEntityWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(this.posX - 16, this.posY-16, this.posZ-16, this.posX+16, this.posY+16, this.posZ+16), this);
	if(player != null) {
		double d = player.getDistanceToEntity(this);
		if(d < 6 && d > 1) {
			al = (float)(d / 8D);
		}
		else if(d > 1)
			al = 6F / 8F;
	}/**/
	par1Tessellator.setColorRGBA_F(this.particleRed * f14 - al/2, this.particleGreen * f14, this.particleBlue * f14 + al, 0.05F);
	par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 - par6 * f10), (double)(f12 - par4 * f10), (double)(f13 - par5 * f10 - par7 * f10), (double)f7, (double)f9);
	par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 + par6 * f10), (double)(f12 + par4 * f10), (double)(f13 - par5 * f10 + par7 * f10), (double)f7, (double)f8);
	par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 + par6 * f10), (double)(f12 + par4 * f10), (double)(f13 + par5 * f10 + par7 * f10), (double)f6, (double)f8);
	par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 - par6 * f10), (double)(f12 - par4 * f10), (double)(f13 + par5 * f10 - par7 * f10), (double)f6, (double)f9);
	par1Tessellator.draw();
	//GL11.glDepthFunc(GL11.GL_LEQUAL);
	//par1Tessellator.startDrawingQuads();
	//rl = new ResourceLocation("textures/particle/particles.png");
	//Minecraft.getMinecraft().renderEngine.bindTexture(rl2);
	//GL11.glEnable(GL11.GL_DEPTH_TEST);

	GL11.glDepthFunc(GL11.GL_LEQUAL);
	GL11.glDisable(GL11.GL_BLEND);
	GL11.glPopMatrix();
	Minecraft.getMinecraft().renderEngine.bindTexture(ParticleUtils.getParticleTexture());
	
	par1Tessellator.startDrawingQuads();
	par1Tessellator.setBrightness(0);
}
 
Example 13
Source File: RenderCarvableBeacon.java    From Chisel-2 with GNU General Public License v2.0 4 votes vote down vote up
public void renderTileEntityAt(TileEntityCarvableBeacon beacon, double x, double y, double z, float partialTicks) {
    float f1 = beacon.func_146002_i();
    GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
    if(f1 > 0.1F){
        Color color = new Color(ItemDye.field_150922_c[beacon.getWorldObj().getBlockMetadata(beacon.xCoord, beacon.yCoord, beacon.zCoord)]);
        Tessellator tessellator = Tessellator.instance;
        this.bindTexture(texture);
        GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F);
        GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F);
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glDisable(GL11.GL_CULL_FACE);
        GL11.glDisable(GL11.GL_BLEND);
        GL11.glDepthMask(true);
        OpenGlHelper.glBlendFunc(770, 1, 1, 0);
        float f2 = (float) beacon.getWorldObj().getTotalWorldTime() + partialTicks;
        float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
        byte b0 = 1;
        double d3 = (double) f2 * 0.025D * (1.0D - (double) (b0 & 1) * 2.5D);
        tessellator.startDrawingQuads();
        tessellator.setColorRGBA(color.getRed(), color.getGreen(), color.getBlue(), 32);
        double d5 = (double) b0 * 0.2D;
        double d7 = 0.5D + Math.cos(d3 + 2.356194490192345D) * d5;
        double d9 = 0.5D + Math.sin(d3 + 2.356194490192345D) * d5;
        double d11 = 0.5D + Math.cos(d3 + (Math.PI / 4D)) * d5;
        double d13 = 0.5D + Math.sin(d3 + (Math.PI / 4D)) * d5;
        double d15 = 0.5D + Math.cos(d3 + 3.9269908169872414D) * d5;
        double d17 = 0.5D + Math.sin(d3 + 3.9269908169872414D) * d5;
        double d19 = 0.5D + Math.cos(d3 + 5.497787143782138D) * d5;
        double d21 = 0.5D + Math.sin(d3 + 5.497787143782138D) * d5;
        double d23 = (double) (256.0F * f1);
        double d25 = 0.0D;
        double d27 = 1.0D;
        double d28 = (double) (-1.0F + f3);
        double d29 = (double) (256.0F * f1) * (0.5D / d5) + d28;
        tessellator.addVertexWithUV(x + d7, y + d23, z + d9, d27, d29);
        tessellator.addVertexWithUV(x + d7, y, z + d9, d27, d28);
        tessellator.addVertexWithUV(x + d11, y, z + d13, d25, d28);
        tessellator.addVertexWithUV(x + d11, y + d23, z + d13, d25, d29);
        tessellator.addVertexWithUV(x + d19, y + d23, z + d21, d27, d29);
        tessellator.addVertexWithUV(x + d19, y, z + d21, d27, d28);
        tessellator.addVertexWithUV(x + d15, y, z + d17, d25, d28);
        tessellator.addVertexWithUV(x + d15, y + d23, z + d17, d25, d29);
        tessellator.addVertexWithUV(x + d11, y + d23, z + d13, d27, d29);
        tessellator.addVertexWithUV(x + d11, y, z + d13, d27, d28);
        tessellator.addVertexWithUV(x + d19, y, z + d21, d25, d28);
        tessellator.addVertexWithUV(x + d19, y + d23, z + d21, d25, d29);
        tessellator.addVertexWithUV(x + d15, y + d23, z + d17, d27, d29);
        tessellator.addVertexWithUV(x + d15, y, z + d17, d27, d28);
        tessellator.addVertexWithUV(x + d7, y, z + d9, d25, d28);
        tessellator.addVertexWithUV(x + d7, y + d23, z + d9, d25, d29);
        tessellator.draw();
        GL11.glEnable(GL11.GL_BLEND);
        OpenGlHelper.glBlendFunc(770, 771, 1, 0);
        GL11.glDepthMask(false);
        tessellator.startDrawingQuads();
        tessellator.setColorRGBA(color.getRed(), color.getGreen(), color.getBlue(), 32);
        double d30 = 0.2D;
        double d4 = 0.2D;
        double d6 = 0.8D;
        double d8 = 0.2D;
        double d10 = 0.2D;
        double d12 = 0.8D;
        double d14 = 0.8D;
        double d16 = 0.8D;
        double d18 = (double) (256.0F * f1);
        double d20 = 0.0D;
        double d22 = 1.0D;
        double d24 = (double) (-1.0F + f3);
        double d26 = (double) (256.0F * f1) + d24;
        tessellator.addVertexWithUV(x + d30, y + d18, z + d4, d22, d26);
        tessellator.addVertexWithUV(x + d30, y, z + d4, d22, d24);
        tessellator.addVertexWithUV(x + d6, y, z + d8, d20, d24);
        tessellator.addVertexWithUV(x + d6, y + d18, z + d8, d20, d26);
        tessellator.addVertexWithUV(x + d14, y + d18, z + d16, d22, d26);
        tessellator.addVertexWithUV(x + d14, y, z + d16, d22, d24);
        tessellator.addVertexWithUV(x + d10, y, z + d12, d20, d24);
        tessellator.addVertexWithUV(x + d10, y + d18, z + d12, d20, d26);
        tessellator.addVertexWithUV(x + d6, y + d18, z + d8, d22, d26);
        tessellator.addVertexWithUV(x + d6, y, z + d8, d22, d24);
        tessellator.addVertexWithUV(x + d14, y, z + d16, d20, d24);
        tessellator.addVertexWithUV(x + d14, y + d18, z + d16, d20, d26);
        tessellator.addVertexWithUV(x + d10, y + d18, z + d12, d22, d26);
        tessellator.addVertexWithUV(x + d10, y, z + d12, d22, d24);
        tessellator.addVertexWithUV(x + d30, y, z + d4, d20, d24);
        tessellator.addVertexWithUV(x + d30, y + d18, z + d4, d20, d26);
        tessellator.draw();
        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glDepthMask(true);
    }
}
 
Example 14
Source File: RenderPortal.java    From LookingGlass with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
	if (!(entity instanceof EntityPortal)) return;
	EntityPortal portal = (EntityPortal) entity;
	IWorldView activeview = portal.getActiveView();
	if (activeview == null) return;

	int texture = activeview.getTexture();
	if (texture == 0) return;

	int width = 2;
	int height = 3;
	double left = -width / 2.;
	double top = 0;

	activeview.markDirty();
	GL11.glDisable(GL11.GL_ALPHA_TEST);
	GL11.glDisable(GL11.GL_LIGHTING);

	GL11.glPushMatrix();
	GL11.glTranslatef((float) d, (float) d1, (float) d2);

	GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
	Tessellator tessellator = Tessellator.instance;
	tessellator.setColorRGBA_F(1, 1, 1, 1);
	tessellator.startDrawingQuads();
	tessellator.addVertexWithUV(left, top, 0.0D, 0.0D, 0.0D); //inc=bl out; inc=bl down
	tessellator.addVertexWithUV(width + left, top, 0.0D, 1.0D, 0.0D); //dc=br out; inc=br down
	tessellator.addVertexWithUV(width + left, height + top, 0.0D, 1.0D, 1.0D); //dec=tr out; dec=tr up
	tessellator.addVertexWithUV(left, height + top, 0.0D, 0.0D, 1.0D); //inc=lt out; dec=tl up
	tessellator.draw();
	GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);
	//XXX: Make the back of the portals a little nicer
	tessellator.setColorRGBA_F(0, 0, 1, 1);
	tessellator.startDrawingQuads();
	tessellator.addVertexWithUV(left, height + top, 0.0D, 0.0D, 1.0D);
	tessellator.addVertexWithUV(width + left, height + top, 0.0D, 1.0D, 1.0D);
	tessellator.addVertexWithUV(width + left, top, 0.0D, 1.0D, 0.0D);
	tessellator.addVertexWithUV(left, top, 0.0D, 0.0D, 0.0D);
	tessellator.draw();
	GL11.glPopMatrix();

	GL11.glEnable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_ALPHA_TEST);
}
 
Example 15
Source File: RenderBlockGauge.java    From archimedes-ships with MIT License 4 votes vote down vote up
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
{
	Tessellator tessellator = Tessellator.instance;
	int l = world.getBlockMetadata(x, y, z);
	IIcon iicon = renderer.getBlockIconFromSideAndMetadata(block, 0, l);
	int dir = l & 3;
	
	tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
	tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
	double u0 = iicon.getMinU();
	double v0 = iicon.getMinV();
	double u1 = iicon.getMaxU();
	double v1 = iicon.getMaxV();
	double yoffset = 0.0625D;
	double dx = x + 1;
	double dz = z + 1;
	double dy = y + yoffset;
	
	switch (dir)
	{
	case 0:
		tessellator.addVertexWithUV(x, dy, z, u1, v1);
		tessellator.addVertexWithUV(x, dy, dz, u1, v0);
		tessellator.addVertexWithUV(dx, dy, dz, u0, v0);
		tessellator.addVertexWithUV(dx, dy, z, u0, v1);
		break;
	case 1:
		tessellator.addVertexWithUV(x, dy, z, u1, v0);
		tessellator.addVertexWithUV(x, dy, dz, u0, v0);
		tessellator.addVertexWithUV(dx, dy, dz, u0, v1);
		tessellator.addVertexWithUV(dx, dy, z, u1, v1);
		break;
	case 2:
		tessellator.addVertexWithUV(x, dy, z, u0, v0);
		tessellator.addVertexWithUV(x, dy, dz, u0, v1);
		tessellator.addVertexWithUV(dx, dy, dz, u1, v1);
		tessellator.addVertexWithUV(dx, dy, z, u1, v0);
		break;
	case 3:
	default:
		tessellator.addVertexWithUV(x, dy, z, u0, v1);
		tessellator.addVertexWithUV(x, dy, dz, u1, v1);
		tessellator.addVertexWithUV(dx, dy, dz, u1, v0);
		tessellator.addVertexWithUV(dx, dy, z, u0, v0);
	}
	return true;
}
 
Example 16
Source File: RenderEntityVortex.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
private void renderGust(){
    byte b0 = 0;
    //float f2 = 0.0F;
    //float f3 = 0.5F;
    //float f4 = (0 + b0 * 10) / 16.0F;
    // float f5 = (5 + b0 * 10) / 16.0F;
    float f6 = 0.0F;
    float f7 = 0.15625F;
    float f8 = (5 + b0 * 10) / 16.0F;
    float f9 = (10 + b0 * 10) / 16.0F;
    float f10 = 0.05625F;
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

    GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
    GL11.glScalef(f10, f10, f10);
    GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
    GL11.glNormal3f(f10, 0.0F, 0.0F);
    Tessellator tessellator = Tessellator.instance;
    tessellator.startDrawingQuads();

    tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, f6, f8);
    tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, f7, f8);
    tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, f7, f9);
    tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, f6, f9);

    double start = 0d;
    double end = 1 / 16d;
    tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, start, start);
    tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, start, end);
    tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, end, end);
    tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, end, start);
    tessellator.draw();
    GL11.glNormal3f(-f10, 0.0F, 0.0F);

    tessellator.startDrawingQuads();
    tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, f6, f8);
    tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, f7, f8);
    tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, f7, f9);
    tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, f6, f9);
    tessellator.draw();

}
 
Example 17
Source File: TileTranslocatorRenderer.java    From Translocators with MIT License 4 votes vote down vote up
private void drawLiquidSpiral(int src, int dst, FluidStack stack, double start, double end, double time, double theta0, double x, double y, double z)
{
    IIcon tex = RenderUtils.prepareFluidRender(stack, 255);
    
    CCRenderState.startDrawing(7);
    Tessellator t = Tessellator.instance;
    t.setTranslation(x, y, z);
    
    Vector3[] last = new Vector3[]{new Vector3(), new Vector3(), new Vector3(), new Vector3()};
    Vector3[] next = new Vector3[]{new Vector3(), new Vector3(), new Vector3(), new Vector3()};
    double tess = 0.05;

    Vector3 a = getPerp(src, dst);
    boolean rev = sum(a.copy().crossProduct(getPathNormal(src, dst, 0))) != sum(sideVec[src]);
    
    for(double di = end; di <= start; di+=tess)
    {
        Vector3 b = getPathNormal(src, dst, di);
        Vector3 c = getPath(src, dst, di);
        
        if(rev)
            b.negate();
        
        double r = (2*di-time/10+theta0+dst/6)*2*Math.PI;
        double sz = 0.1;
        Vector3 p = c.add(a.copy().multiply(MathHelper.sin(r)*sz)).add(b.copy().multiply(MathHelper.cos(r)*sz));

        double s1 = 0.02;
        double s2 =-0.02;
        next[0].set(p).add(a.x*s1+b.x*s1, a.y*s1+b.y*s1, a.z*s1+b.z*s1);
        next[1].set(p).add(a.x*s2+b.x*s1, a.y*s2+b.y*s1, a.z*s2+b.z*s1);
        next[2].set(p).add(a.x*s2+b.x*s2, a.y*s2+b.y*s2, a.z*s2+b.z*s2);
        next[3].set(p).add(a.x*s1+b.x*s2, a.y*s1+b.y*s2, a.z*s1+b.z*s2);
        
        if(di > end)
        {
            double u1 = tex.getInterpolatedU(Math.abs(di)*16);
            double u2 = tex.getInterpolatedU(Math.abs(di-tess)*16);
            for(int i = 0; i < 4; i++)
            {
                int j = (i+1)%4;
                Vector3 axis = next[j].copy().subtract(next[i]);
                double v1 = tex.getInterpolatedV(Math.abs(next[i].scalarProject(axis))*16);
                double v2 = tex.getInterpolatedV(Math.abs(next[j].scalarProject(axis))*16);
                t.addVertexWithUV(next[i].x, next[i].y, next[i].z, u1, v1);
                t.addVertexWithUV(next[j].x, next[j].y, next[j].z, u1, v2);
                t.addVertexWithUV(last[j].x, last[j].y, last[j].z, u2, v2);
                t.addVertexWithUV(last[i].x, last[i].y, last[i].z, u2, v1);
            }
        }
        
        Vector3[] tmp = last;
        last = next;
        next = tmp;
    }
    
    CCRenderState.draw();
    t.setTranslation(0, 0, 0);
    
    RenderUtils.postFluidRender();
}
 
Example 18
Source File: RotorSimpleRenderer.java    From BigReactors with MIT License 4 votes vote down vote up
private static void renderRotorBladeConnection(RenderBlocks renderer, Block block, int metadata,
		ForgeDirection rotorDir, ForgeDirection bladeDir, int x, int y, int z, boolean drawOuterRectangle) {

	// This is the dimension in which the blade expands
	ForgeDirection normal = findNormal(rotorDir, bladeDir);
	
	// Used for proper calculation of the IJK coords
	int rotorDirMultiplier = rotorDir.offsetX < 0 || rotorDir.offsetY < 0 || rotorDir.offsetZ < 0 ? -1 : 1;
	int bladeDirMultiplier = bladeDir.offsetX < 0 || bladeDir.offsetY < 0 || bladeDir.offsetZ < 0 ? -1 : 1;
	int normalDirMultiplier = normal.offsetX < 0 || normal.offsetY < 0 || normal.offsetZ < 0 ? -1 : 1;

	// Compute the 8 coordinates of the inner and outer rectangles in IJK space, which we'll re-orient later
	// I = blade dir, J = rotor dir, K = normal dir
	double rotorDirectionOffset = 0.05D;
	double bladeInnerOffset = 0.2D;
	double bladeOuterOffset = 0.5D;
	double normalInnerOffset = 0.2D;
	double normalOuterOffset = 0.4D;
	
	double rotorOffsets[] = new double[8];
	rotorOffsets[0] = rotorOffsets[3] = rotorOffsets[4] = rotorOffsets[7] = 0.5D + (rotorDirMultiplier * rotorDirectionOffset);
	rotorOffsets[1] = rotorOffsets[2] = rotorOffsets[5] = rotorOffsets[6] = 0.5D - (rotorDirMultiplier * rotorDirectionOffset);
	
	double bladeOffsets[] = new double[8];
	bladeOffsets[0] = bladeOffsets[1] = bladeOffsets[2] = bladeOffsets[3] = 0.5D + (bladeDirMultiplier * bladeInnerOffset);
	bladeOffsets[4] = bladeOffsets[5] = bladeOffsets[6] = bladeOffsets[7] = 0.5D + (bladeDirMultiplier * bladeOuterOffset);

	double normalOffsets[] = new double[8];
	normalOffsets[0] = normalOffsets[1] = 0.5D - (normalDirMultiplier * normalInnerOffset); 
	normalOffsets[2] = normalOffsets[3] = 0.5D + (normalDirMultiplier * normalInnerOffset); 
	normalOffsets[4] = normalOffsets[5] = 0.5D - (normalDirMultiplier * normalOuterOffset); 
	normalOffsets[6] = normalOffsets[7] = 0.5D + (normalDirMultiplier * normalOuterOffset);
	
	// Now calculate our 8 coordinates in XYZ space from IJK space
	double[] xCoords = {0D, 0D, 0D, 0D, 0D, 0D, 0D, 0D};
	double[] yCoords = {0D, 0D, 0D, 0D, 0D, 0D, 0D, 0D};
	double[] zCoords = {0D, 0D, 0D, 0D, 0D, 0D, 0D, 0D};

	int xMagRotor = Math.abs(rotorDir.offsetX);
	int xMagBlade = Math.abs(bladeDir.offsetX);
	int xMagNormal = Math.abs(normal.offsetX);
	int yMagRotor = Math.abs(rotorDir.offsetY);
	int yMagBlade = Math.abs(bladeDir.offsetY);
	int yMagNormal = Math.abs(normal.offsetY);
	int zMagRotor = Math.abs(rotorDir.offsetZ);
	int zMagBlade = Math.abs(bladeDir.offsetZ);
	int zMagNormal = Math.abs(normal.offsetZ);
	
	for(int i = 0; i < 8; i++) {
		xCoords[i] = rotorOffsets[i] * xMagRotor + bladeOffsets[i] * xMagBlade + normalOffsets[i] * xMagNormal;
		yCoords[i] = rotorOffsets[i] * yMagRotor + bladeOffsets[i] * yMagBlade + normalOffsets[i] * yMagNormal;
		zCoords[i] = rotorOffsets[i] * zMagRotor + bladeOffsets[i] * zMagBlade + normalOffsets[i] * zMagNormal;
	}

	// Calculate UV coords for each face.
	double[] u = {0D, 0D, 16D, 16D};
	double[] v = {0D, 16D, 16D, 0D};

	IIcon IIcon = BigReactors.blockTurbineRotorPart.getRotorConnectorIcon();
	for(int i = 0; i < 4; i++) {
		u[i] = IIcon.getInterpolatedU(u[i]);
		v[i] = IIcon.getInterpolatedV(v[i]);
	}
	
	// Element buffer, which of these do we draw?
	int[][] quads;
	if(rotorDir.offsetX != 0 || (bladeDir.offsetX != 0 && rotorDir.offsetY != 0)) {
		quads = quadSet2;
	}
	else {
		quads = quadSet1;
	}

	Tessellator tessellator = Tessellator.instance;
	tessellator.addTranslation(x, y, z);
	
	for(int face = drawOuterRectangle ? 0 : 1; face < quads.length; face++) {
		for(int vertex = 0; vertex < quads[face].length; vertex++) {
			int idx = quads[face][vertex];
			tessellator.addVertexWithUV(xCoords[idx], yCoords[idx], zCoords[idx], u[vertex], v[vertex]);
		}
	}
	
	tessellator.addTranslation(-x, -y, -z);
	renderer.setRenderBounds(0D, 0D, 0D, 1D, 1D, 1D);
}
 
Example 19
Source File: GardenProxyRenderer.java    From GardenCollection with MIT License 4 votes vote down vote up
private boolean renderBlockDoublePlant(IBlockAccess world, RenderBlocks renderer, BlockDoublePlant block, int x, int y, int z, TileEntityGarden potData)
{
    Tessellator tessellator = Tessellator.instance;
    tessellator.setBrightness(block.getMixedBrightnessForBlock(renderer.blockAccess, x, y, z));
    int l = block.colorMultiplier(renderer.blockAccess, x, y, z);
    //if (l == world.getBiomeGenForCoords(x, z).getBiomeGrassColor(x, y, z))
    //    l = ColorizerGrass.getGrassColor(potData.getBiomeTemperature(), potData.getBiomeHumidity());

    float f = (float)(l >> 16 & 255) / 255.0F;
    float f1 = (float)(l >> 8 & 255) / 255.0F;
    float f2 = (float)(l & 255) / 255.0F;

    if (EntityRenderer.anaglyphEnable)
    {
        float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F;
        float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F;
        float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F;
        f = f3;
        f1 = f4;
        f2 = f5;
    }

    tessellator.setColorOpaque_F(f, f1, f2);
    long j1 = (long)(x * 3129871) ^ (long)z * 116129781L;
    j1 = j1 * j1 * 42317861L + j1 * 11L;
    double d19 = (double)x;
    double d0 = (double)y;
    double d1 = (double)z;
    //d19 += ((double)((float)(j1 >> 16 & 15L) / 15.0F) - 0.5D) * 0.3D;
    //d1 += ((double)((float)(j1 >> 24 & 15L) / 15.0F) - 0.5D) * 0.3D;
    int i1 = renderer.blockAccess.getBlockMetadata(x, y, z);
    boolean flag = false;
    boolean flag1 = BlockDoublePlant.func_149887_c(i1);
    int k1;

    if (flag1)
    {
        k1 = BlockDoublePlant.func_149890_d(renderer.blockAccess.getBlockMetadata(x, y - 1, z));
    }
    else
    {
        k1 = BlockDoublePlant.func_149890_d(i1);
    }

    IIcon iicon = block.func_149888_a(flag1, k1);
    renderer.drawCrossedSquares(iicon, d19, d0, d1, 1.0F);

    if (flag1 && k1 == 0)
    {
        IIcon iicon1 = block.sunflowerIcons[0];
        double d2 = Math.cos((double)j1 * 0.8D) * Math.PI * 0.1D;
        double d3 = Math.cos(d2);
        double d4 = Math.sin(d2);
        double d5 = (double)iicon1.getMinU();
        double d6 = (double)iicon1.getMinV();
        double d7 = (double)iicon1.getMaxU();
        double d8 = (double)iicon1.getMaxV();
        double d9 = 0.3D;
        double d10 = -0.05D;
        double d11 = 0.5D + 0.3D * d3 - 0.5D * d4;
        double d12 = 0.5D + 0.5D * d3 + 0.3D * d4;
        double d13 = 0.5D + 0.3D * d3 + 0.5D * d4;
        double d14 = 0.5D + -0.5D * d3 + 0.3D * d4;
        double d15 = 0.5D + -0.05D * d3 + 0.5D * d4;
        double d16 = 0.5D + -0.5D * d3 + -0.05D * d4;
        double d17 = 0.5D + -0.05D * d3 - 0.5D * d4;
        double d18 = 0.5D + 0.5D * d3 + -0.05D * d4;
        tessellator.addVertexWithUV(d19 + d15, d0 + 1.0D, d1 + d16, d5, d8);
        tessellator.addVertexWithUV(d19 + d17, d0 + 1.0D, d1 + d18, d7, d8);
        tessellator.addVertexWithUV(d19 + d11, d0 + 0.0D, d1 + d12, d7, d6);
        tessellator.addVertexWithUV(d19 + d13, d0 + 0.0D, d1 + d14, d5, d6);
        IIcon iicon2 = block.sunflowerIcons[1];
        d5 = (double)iicon2.getMinU();
        d6 = (double)iicon2.getMinV();
        d7 = (double)iicon2.getMaxU();
        d8 = (double)iicon2.getMaxV();
        tessellator.addVertexWithUV(d19 + d17, d0 + 1.0D, d1 + d18, d5, d8);
        tessellator.addVertexWithUV(d19 + d15, d0 + 1.0D, d1 + d16, d7, d8);
        tessellator.addVertexWithUV(d19 + d13, d0 + 0.0D, d1 + d14, d7, d6);
        tessellator.addVertexWithUV(d19 + d11, d0 + 0.0D, d1 + d12, d5, d6);
    }

    return true;
}
 
Example 20
Source File: RadarParticle.java    From Artifacts with MIT License 4 votes vote down vote up
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{
	par1Tessellator.draw();
	GL11.glPushMatrix();

	ParticleUtils.bindTexture("textures/items/radarparticle.png");

	//GL11.glDepthMask(false);
	GL11.glDepthFunc(GL11.GL_ALWAYS);
	//GL11.glEnable(3042);
	//GL11.glBlendFunc(770, 1);

	GL11.glColor4f(1.0F, 1.0F, 1.0F, this.particleAlpha);
	par1Tessellator.startDrawingQuads();
	/*int bright = -1;
	try {
		bright = ReflectionHelper.getPrivateValue(Tessellator.class, par1Tessellator, new String[] { "brightness", "b", "field_78401_l" });
	}
	catch (Exception e) {
		System.out.println("Bad reflection");
	}*/
	
	par1Tessellator.setBrightness(255);
	
	float var8 = ((float)this.particleAge + par2) / (float)this.particleMaxAge * 32.0F;

	if (var8 < 0.0F)
	{
		var8 = 0.0F;
	}

	if (var8 > 1.0F)
	{
		var8 = 1.0F;
	}

	this.particleScale = this.reddustParticleScale;// * var8;
	//replace this
	//super.renderParticle(par1Tessellator, par2, par3, par4, par5, par6, par7);
	
	//Minecraft.getMinecraft().renderEngine.bindTexture(rl);

	float f6 = (float)this.particleTextureIndexX / 16.0F;
	float f7 = f6 + 0.0624375F;
	float f8 = (float)this.particleTextureIndexY / 16.0F;
	float f9 = f8 + 0.0624375F;
	float f10 = 0.3F;// * this.particleScale;

	float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)par2 - interpPosX);
	float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)par2 - interpPosY);
	float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)par2 - interpPosZ);
	float f14 = 1.0F;
	//par1Tessellator.draw();
	//GL11.glDepthFunc(GL11.GL_ALWAYS);
	//par1Tessellator.startDrawingQuads();
	//par1Tessellator.setBrightness(255);
	//GL11.glDisable(GL11.GL_DEPTH_TEST);
	par1Tessellator.setColorRGBA_F(this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha);
	par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 - par6 * f10), (double)(f12 - par4 * f10), (double)(f13 - par5 * f10 - par7 * f10), (double)f7, (double)f9);
	par1Tessellator.addVertexWithUV((double)(f11 - par3 * f10 + par6 * f10), (double)(f12 + par4 * f10), (double)(f13 - par5 * f10 + par7 * f10), (double)f7, (double)f8);
	par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 + par6 * f10), (double)(f12 + par4 * f10), (double)(f13 + par5 * f10 + par7 * f10), (double)f6, (double)f8);
	par1Tessellator.addVertexWithUV((double)(f11 + par3 * f10 - par6 * f10), (double)(f12 - par4 * f10), (double)(f13 + par5 * f10 - par7 * f10), (double)f6, (double)f9);
	par1Tessellator.draw();
	//GL11.glDepthFunc(GL11.GL_LEQUAL);
	//par1Tessellator.startDrawingQuads();
	//rl = new ResourceLocation("textures/particle/particles.png");
	//Minecraft.getMinecraft().renderEngine.bindTexture(rl2);
	//GL11.glEnable(GL11.GL_DEPTH_TEST);

	GL11.glDepthFunc(GL11.GL_LEQUAL);
	GL11.glPopMatrix();
	Minecraft.getMinecraft().renderEngine.bindTexture(ParticleUtils.getParticleTexture());
	
	par1Tessellator.startDrawingQuads();
	par1Tessellator.setBrightness(0);
}