List of usage examples for org.lwjgl.opengl GL11 glDisable
public static void glDisable(@NativeType("GLenum") int target)
From source file:com.professorvennie.machinerycraft.client.renderer.item.ItemRenderCable.java
License:Creative Commons License
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { GL11.glDisable(GL11.GL_LIGHTING); Minecraft.getMinecraft().renderEngine.bindTexture(texture); new TileEntityRendererCable().drawStriaght(ForgeDirection.NORTH); GL11.glEnable(GL11.GL_LIGHTING);/*from w w w . j av a2s. c o m*/ }
From source file:com.professorvennie.machinerycraft.client.renderer.tileentity.TileEntityRendererCable.java
License:Creative Commons License
@Override public void renderTileEntityAt(TileEntity entity, double x, double y, double z, float var8) { GL11.glTranslated(x, y, z);/*from w w w. j a v a 2 s . c o m*/ GL11.glDisable(GL11.GL_LIGHTING); this.bindTexture(texture); TileEntityCable cable = (TileEntityCable) entity; if (!cable.onlyOneOppsoite(cable.connections)) { RenderCenter(); for (int i = 0; i < cable.connections.length; i++) { if (cable.connections[i] != null) { drawConnector(cable.connections[i]); } } } else { for (int i = 0; i < cable.connections.length; i++) { if (cable.connections[i] != null) { drawStriaght(cable.connections[i]); break; } } } GL11.glEnable(GL11.GL_LIGHTING); GL11.glTranslated(-x, -y, -z); }
From source file:com.professorvennie.machinerycraft.client.renderer.tileentity.TileEntityRendererPlasticChest.java
License:Creative Commons License
@Override public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick) { if (tileEntity instanceof TileEntityPlasticChest) { TileEntityPlasticChest tileEntityPlasticChest = (TileEntityPlasticChest) tileEntity; ForgeDirection direction = null; if (tileEntityPlasticChest.getWorldObj() != null) { direction = tileEntityPlasticChest.getOrientation(); //System.out.println(tileEntityPlasticChest.getOrientation()); }//from w w w . ja v a 2 s . co m this.bindTexture(texture); GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL11.GL_LIGHTING); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F); GL11.glScalef(1.0F, -1.0F, -1.0F); GL11.glTranslatef(0.5F, 0.5F, 0.5F); short angle = 0; if (direction != null) { if (direction == ForgeDirection.NORTH) { angle = 180; } else if (direction == ForgeDirection.SOUTH) { angle = 0; } else if (direction == ForgeDirection.WEST) { angle = 90; } else if (direction == ForgeDirection.EAST) { angle = -90; } } GL11.glRotatef(angle, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); float adjustedLidAngle = tileEntityPlasticChest.prevLidAngle + (tileEntityPlasticChest.lidAngle - tileEntityPlasticChest.prevLidAngle) * tick; adjustedLidAngle = 1.0F - adjustedLidAngle; adjustedLidAngle = 1.0F - adjustedLidAngle * adjustedLidAngle * adjustedLidAngle; modelChest.chestLid.rotateAngleX = -(adjustedLidAngle * (float) Math.PI / 2.0F); modelChest.renderAll(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glDisable(GL11.GL_LIGHTING); GL11.glPopMatrix(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); } }
From source file:com.professorvennie.machinerycraft.core.handlers.HudHandler.java
License:Creative Commons License
private void drawBookGUI(BookEntry entry, ScaledResolution res) { GL11.glEnable(GL11.GL_BLEND);/* www.jav a 2s . c om*/ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); Minecraft mc = Minecraft.getMinecraft(); int x = res.getScaledWidth() / 2 + 8; int y = res.getScaledHeight() / 2 - 4; int color = 0xFF5A28; String info = StatCollector.translateToLocal("mc.book.shiftToRead"); int itemX = x - (mc.fontRenderer.getStringWidth(new ItemStack(ModItems.book).getDisplayName()) / 2); mc.fontRenderer.drawStringWithShadow(StatCollector.translateToLocal(entry.getUnlocalizedName()), itemX, y + 6, color); mc.fontRenderer.drawStringWithShadow(info, x - (mc.fontRenderer.getStringWidth(info) / 2), y + 18, color); itemRender.renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, new ItemStack(ModItems.book), itemX - 20, y + 2); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_BLEND); GL11.glColor4f(1F, 1F, 1F, 1F); }
From source file:com.professorvennie.machinerycraft.core.helpers.RenderHelper.java
License:Creative Commons License
public static void renderTooltip(int x, int y, List<String> tooltipData, int color, int color2) { boolean lighting = GL11.glGetBoolean(GL11.GL_LIGHTING); if (lighting) net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting(); if (!tooltipData.isEmpty()) { int var5 = 0; int var6; int var7; FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; for (var6 = 0; var6 < tooltipData.size(); ++var6) { var7 = fontRenderer.getStringWidth(tooltipData.get(var6)); if (var7 > var5) var5 = var7; }/*from www. ja v a 2s .co m*/ var6 = x + 12; var7 = y - 12; int var9 = 8; if (tooltipData.size() > 1) var9 += 2 + (tooltipData.size() - 1) * 10; float z = 300F; drawGradientRect(var6 - 3, var7 - 4, z, var6 + var5 + 3, var7 - 3, color2, color2); drawGradientRect(var6 - 3, var7 + var9 + 3, z, var6 + var5 + 3, var7 + var9 + 4, color2, color2); drawGradientRect(var6 - 3, var7 - 3, z, var6 + var5 + 3, var7 + var9 + 3, color2, color2); drawGradientRect(var6 - 4, var7 - 3, z, var6 - 3, var7 + var9 + 3, color2, color2); drawGradientRect(var6 + var5 + 3, var7 - 3, z, var6 + var5 + 4, var7 + var9 + 3, color2, color2); int var12 = (color & 0xFFFFFF) >> 1 | color & -16777216; drawGradientRect(var6 - 3, var7 - 3 + 1, z, var6 - 3 + 1, var7 + var9 + 3 - 1, color, var12); drawGradientRect(var6 + var5 + 2, var7 - 3 + 1, z, var6 + var5 + 3, var7 + var9 + 3 - 1, color, var12); drawGradientRect(var6 - 3, var7 - 3, z, var6 + var5 + 3, var7 - 3 + 1, color, color); drawGradientRect(var6 - 3, var7 + var9 + 2, z, var6 + var5 + 3, var7 + var9 + 3, var12, var12); GL11.glDisable(GL11.GL_DEPTH_TEST); for (int var13 = 0; var13 < tooltipData.size(); ++var13) { String var14 = tooltipData.get(var13); fontRenderer.drawStringWithShadow(var14, var6, var7, -1); if (var13 == 0) var7 += 2; var7 += 10; } GL11.glEnable(GL11.GL_DEPTH_TEST); } if (!lighting) net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting(); GL11.glColor4f(1F, 1F, 1F, 1F); }
From source file:com.professorvennie.machinerycraft.core.helpers.RenderHelper.java
License:Creative Commons License
public static void drawGradientRect(int par1, int par2, float z, int par3, int par4, int par5, int par6) { float var7 = (par5 >> 24 & 255) / 255F; float var8 = (par5 >> 16 & 255) / 255F; float var9 = (par5 >> 8 & 255) / 255F; float var10 = (par5 & 255) / 255F; float var11 = (par6 >> 24 & 255) / 255F; float var12 = (par6 >> 16 & 255) / 255F; float var13 = (par6 >> 8 & 255) / 255F; float var14 = (par6 & 255) / 255F; GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_BLEND);//from w w w . j a va 2 s. c o m GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glShadeModel(GL11.GL_SMOOTH); Tessellator var15 = Tessellator.instance; var15.startDrawingQuads(); var15.setColorRGBA_F(var8, var9, var10, var7); var15.addVertex(par3, par2, z); var15.addVertex(par1, par2, z); var15.setColorRGBA_F(var12, var13, var14, var11); var15.addVertex(par1, par4, z); var15.addVertex(par3, par4, z); var15.draw(); GL11.glShadeModel(GL11.GL_FLAT); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_TEXTURE_2D); }
From source file:com.professorvennie.machinerycraft.machines.washer.TileEntityRendererWasher.java
License:Creative Commons License
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float var8) { int x1 = tileentity.xCoord; int y1 = tileentity.yCoord; int z1 = tileentity.zCoord; int metadata = tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord);/*from w w w. j a v a2s .c o m*/ GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glTranslatef((float) x, (float) y, (float) z); Tessellator tessellator = Tessellator.instance; this.bindTexture(texterwasher); tessellator.startDrawingQuads(); if (metadata == 5) { this.bindTexture(glass); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 1, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 1, 0); tessellator.addVertexWithUV(1, 0, 0, 1, 1); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); } if (metadata == 7) { this.bindTexture(glass); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 1); } if (metadata == 6) { this.bindTexture(texterwasher); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 1, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 1, 0); tessellator.addVertexWithUV(1, 0, 0, 1, 1); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 1, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 0, 1, 1, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 0, 0, 1); } if (metadata == 3) { this.bindTexture(texterwasher); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 1, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 1, 0); tessellator.addVertexWithUV(1, 0, 0, 1, 1); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); } if (metadata == 2) { this.bindTexture(texterwasher); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 0, 1, 1, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 1, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); } if (metadata == 4) { this.bindTexture(texterwasher); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 0, 1, 1, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 1, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 1, 0); tessellator.addVertexWithUV(1, 0, 0, 1, 1); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 1, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); } if (metadata == 1) { this.bindTexture(texterwasher); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 1, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 1, 0); tessellator.addVertexWithUV(1, 0, 0, 1, 1); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 1, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 0, 1, 1, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 0, 0, 1); } if (metadata == 0) { this.bindTexture(texterwasher); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 1, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 1, 0); tessellator.addVertexWithUV(1, 0, 0, 1, 1); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 0, 1, 1, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 1, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); } if (metadata == 8) { this.bindTexture(texterwasher); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 1, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); } tessellator.draw(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:com.professorvennie.machinerycraft.machines.washer.TileEntityRendererWasher.java
License:Creative Commons License
public void renderInv() { Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads();//from w ww . j av a2 s . c o m GL11.glDisable(GL11.GL_LIGHTING); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 1, 1, 0); tessellator.addVertexWithUV(0, 1, 1, 0, 0); tessellator.addVertexWithUV(0, 0, 1, 0, 1); tessellator.addVertexWithUV(1, 1, 0, 1, 0); tessellator.addVertexWithUV(1, 0, 0, 1, 1); tessellator.addVertexWithUV(0, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 1, 1, 1); tessellator.addVertexWithUV(0, 0, 1, 1, 0); tessellator.addVertexWithUV(0, 0, 0, 0, 0); tessellator.addVertexWithUV(1, 0, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 1, 1, 0); tessellator.addVertexWithUV(1, 1, 1, 1, 1); tessellator.addVertexWithUV(1, 1, 0, 0, 1); tessellator.addVertexWithUV(0, 1, 0, 0, 0); tessellator.draw(); GL11.glEnable(GL11.GL_LIGHTING); }
From source file:com.professorvennie.machinerycraft.machines.windmill.ItemRenderWindmillGround.java
License:Creative Commons License
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { GL11.glDisable(GL11.GL_LIGHTING); Minecraft.getMinecraft().renderEngine.bindTexture(texture); new TileEnitityRendererwindmillGround().renderInv(); GL11.glEnable(GL11.GL_LIGHTING);// w w w . j a v a 2s . c o m }
From source file:com.professorvennie.machinerycraft.machines.windmill.TileEnitityRendererwindmillGround.java
License:Creative Commons License
@Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { GL11.glPushMatrix();//w ww. j a v a 2 s . co m GL11.glDisable(GL11.GL_LIGHTING); GL11.glTranslatef((float) x, (float) y, (float) z); Tessellator tessellator = Tessellator.instance; this.bindTexture(texterwindmillground); tessellator.startDrawingQuads(); { if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 0) { tessellator.addVertexWithUV(1, pixel * 14, 1, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, pixel * 14, 0, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, 0, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, 1, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, 0, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, 1, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, 0, 1, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, 0, 0, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, 0, 0, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, pixel * 14, 0, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, pixel * 14, 0, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, 0, 0, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, 1, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, pixel * 14, 1, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, 1, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, 0, 1, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, pixel * 14, 1, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, 1, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, 0, 0, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, pixel * 14, 0, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, pixel * 14, 0, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, 0, 0, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, 0, 1, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, 1, 1F / textureWidth * (0), 1F / textureHeight * (32)); } if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 1) { tessellator.addVertexWithUV(0.5, pixel * 14, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, pixel * 14, 0, 1F / textureWidth * (32), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0, pixel * 14, 0, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0, pixel * 14, 0.5, 1F / textureWidth * (8 + 16), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, 0, pixel * 8, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, pixel * 14, pixel * 8, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, pixel * 8, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, 0, pixel * 8, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(pixel * 8, 0, 0, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(pixel * 8, pixel * 14, 0, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(pixel * 8, pixel * 14, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(pixel * 8, 0, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, 0, 0, 1F / textureWidth * (32), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0.5, 0, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, 0, 0.5, 1F / textureWidth * (8 + 16), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, 0, 0, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8 + 16)); } if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 2) { tessellator.addVertexWithUV(0.5, pixel * 14, 1, 1F / textureWidth * (32), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0.5, pixel * 14, 0, 1F / textureWidth * (32), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0, pixel * 14, 0, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0, pixel * 14, 1, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(pixel * 8, 0, 0, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(pixel * 8, pixel * 14, 0, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(pixel * 8, pixel * 14, 1, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(pixel * 8, 0, 1, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, 0, 0, 1F / textureWidth * (32), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0.5, 0, 1, 1F / textureWidth * (32), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0, 0, 1, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0, 0, 0, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8)); } if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 3) { tessellator.addVertexWithUV(0.5, pixel * 14, 1, 1F / textureWidth * (32), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0.5, pixel * 14, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, 0.5, 1F / textureWidth * (8 + 16), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, 1, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8)); tessellator.addVertexWithUV(pixel * 8, 0, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(pixel * 8, pixel * 14, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(pixel * 8, pixel * 14, 1, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(pixel * 8, 0, 1, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, 0, pixel * 8, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, pixel * 14, pixel * 8, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, pixel * 14, pixel * 8, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, 0, pixel * 8, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, 0, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, 0, 1, 1F / textureWidth * (32), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0, 0, 1, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0, 0, 0.5, 1F / textureWidth * (8 + 16), 1F / textureHeight * (0)); } if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 4) { tessellator.addVertexWithUV(1, pixel * 14, 0.5, 1F / textureWidth * (24), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, pixel * 14, 0, 1F / textureWidth * (24), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0, pixel * 14, 0, 1F / textureWidth * (8), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0, pixel * 14, 0.5, 1F / textureWidth * (8), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, pixel * 8, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, pixel * 14, pixel * 8, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, pixel * 8, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, 0, pixel * 8, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, 0, 1F / textureWidth * (24), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(1, 0, 0.5, 1F / textureWidth * (24), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, 0, 0.5, 1F / textureWidth * (8), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, 0, 0, 1F / textureWidth * (8), 1F / textureHeight * (8 + 16)); } if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 5) { tessellator.addVertexWithUV(1, pixel * 14, 1, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(1, pixel * 14, 0, 1F / textureWidth * (8 + 16), 1F / textureHeight * 8); tessellator.addVertexWithUV(0, pixel * 14, 0, 1F / textureWidth * 8, 1F / textureHeight * 8); tessellator.addVertexWithUV(0, pixel * 14, 1, 1F / textureWidth * 8, 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(1, 0, 0, 1F / textureWidth * (8 + 16), 1F / textureHeight * 8); tessellator.addVertexWithUV(1, 0, 1, 1F / textureWidth * (8 + 16), 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0, 0, 1, 1F / textureWidth * 8, 1F / textureHeight * (8 + 16)); tessellator.addVertexWithUV(0, 0, 0, 1F / textureWidth * 8, 1F / textureHeight * 8); } if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 6) { tessellator.addVertexWithUV(1, pixel * 14, 1, 1F / textureWidth * (24), 1F / textureHeight * (8)); tessellator.addVertexWithUV(1, pixel * 14, 0.5, 1F / textureWidth * (24), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, 0.5, 1F / textureWidth * (8), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0, pixel * 14, 1, 1F / textureWidth * (8), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0, 0, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0, pixel * 14, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, pixel * 14, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, 0, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, 0.5, 1F / textureWidth * (24), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, 0, 1, 1F / textureWidth * (24), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0, 0, 1, 1F / textureWidth * (8), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0, 0, 0.5, 1F / textureWidth * (8), 1F / textureHeight * (0)); } if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 7) { tessellator.addVertexWithUV(1, pixel * 14, 0.5, 1F / textureWidth * (8), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, pixel * 14, 0, 1F / textureWidth * (8), 1F / textureHeight * (24)); tessellator.addVertexWithUV(0.5, pixel * 14, 0, 1F / textureWidth * (0), 1F / textureHeight * (24)); tessellator.addVertexWithUV(0.5, pixel * 14, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, pixel * 8, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, pixel * 14, pixel * 8, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, pixel * 14, pixel * 8, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, 0, pixel * 8, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, pixel * 14, 0, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, 0, 0, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, 0, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, pixel * 14, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, 0, 1F / textureWidth * (8), 1F / textureHeight * (24)); tessellator.addVertexWithUV(1, 0, 0.5, 1F / textureWidth * (8), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, 0, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, 0, 0, 1F / textureWidth * (0), 1F / textureHeight * (24)); } if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 8) { tessellator.addVertexWithUV(1, pixel * 14, 1, 1F / textureWidth * (8), 1F / textureHeight * (24)); tessellator.addVertexWithUV(1, pixel * 14, 0, 1F / textureWidth * (8), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0.5, pixel * 14, 0, 1F / textureWidth * (0), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0.5, pixel * 14, 1, 1F / textureWidth * (0), 1F / textureHeight * (24)); tessellator.addVertexWithUV(0.5, pixel * 14, 0, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, 0, 0, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, 0, 1, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, pixel * 14, 1, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, 0, 1F / textureWidth * (8), 1F / textureHeight * (8)); tessellator.addVertexWithUV(1, 0, 1, 1F / textureWidth * (8), 1F / textureHeight * (24)); tessellator.addVertexWithUV(0.5, 0, 1, 1F / textureWidth * (0), 1F / textureHeight * (24)); tessellator.addVertexWithUV(0.5, 0, 0, 1F / textureWidth * (0), 1F / textureHeight * (8)); } if (tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 9) { tessellator.addVertexWithUV(1, pixel * 14, 1, 1F / textureWidth * (8), 1F / textureHeight * (8)); tessellator.addVertexWithUV(1, pixel * 14, 0.5, 1F / textureWidth * (8), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, pixel * 14, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, pixel * 14, 1, 1F / textureWidth * (0), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0.5, 0, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, pixel * 14, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, pixel * 14, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, 0, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, pixel * 14, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (32)); tessellator.addVertexWithUV(0.5, 0, 0.5, 1F / textureWidth * (32), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, 0, 1, 1F / textureWidth * (0), 1F / textureHeight * (0)); tessellator.addVertexWithUV(0.5, pixel * 14, 1, 1F / textureWidth * (0), 1F / textureHeight * (32)); tessellator.addVertexWithUV(1, 0, 0.5, 1F / textureWidth * (8), 1F / textureHeight * (0)); tessellator.addVertexWithUV(1, 0, 1, 1F / textureWidth * (8), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0.5, 0, 1, 1F / textureWidth * (0), 1F / textureHeight * (8)); tessellator.addVertexWithUV(0.5, 0, 0.5, 1F / textureWidth * (0), 1F / textureHeight * (0)); } } tessellator.draw(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }