List of usage examples for org.lwjgl.opengl GL11 glTranslated
public static native void glTranslated(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z);
From source file:sqr.client.model.ModelHatchedSpider.java
License:Open Source License
private void renderFlatSpider(float partialTickTime) { GL11.glPushMatrix();/* ww w.j a v a 2 s . c o m*/ { GL11.glScalef(1F, 0.8F, 1F); GL11.glTranslated(0D, 0.05D, 0D); flatSpiderHead.render(partialTickTime); flatSpiderBody.render(partialTickTime); flatSpiderRearEnd.render(partialTickTime); flatSpiderLeg8.render(partialTickTime); flatSpiderLeg6.render(partialTickTime); flatSpiderLeg4.render(partialTickTime); flatSpiderLeg2.render(partialTickTime); flatSpiderLeg7.render(partialTickTime); flatSpiderLeg5.render(partialTickTime); flatSpiderLeg3.render(partialTickTime); flatSpiderLeg1.render(partialTickTime); } GL11.glPopMatrix(); }
From source file:sqr.client.model.ModelHatchedSpider.java
License:Open Source License
private void renderVillagerSpiderChest(float partialTickTime) { GL11.glPushMatrix();//from w w w . j av a 2 s.co m { GL11.glTranslated(0.0D, -0.30D, 0.0D); villagerSpiderChestRight.render(partialTickTime); villagerSpiderChestLeft.render(partialTickTime); } GL11.glPopMatrix(); }
From source file:sqr.client.model.ModelSpiderQueen.java
License:Open Source License
@Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { setRotationAngles(f, f1, f2, f3, f4, f5); boolean isKing = false; if (entity instanceof EntityPlayer) { final EntityPlayer player = (EntityPlayer) entity; final ModPropertiesList modPropertiesList = SpiderQueen.getInstance().getModProperties(); if (player.ridingEntity instanceof EntityHatchedSpider) { final EntityHatchedSpider spider = (EntityHatchedSpider) player.ridingEntity; if (spider.isOnLadder()) { final Vec3 lookVector = spider.getLookVec(); if (lookVector.xCoord <= -0.90 || lookVector.zCoord <= -0.90) { GL11.glRotatef(270, 1, 0, 0); GL11.glTranslated(0, 1.8, 0); }/*from w w w . j av a 2 s . co m*/ else if (lookVector.xCoord >= 0.90 || lookVector.zCoord >= 0.90) { GL11.glRotatef(-90, 1, 0, 0); GL11.glTranslated(0, 1.8, 0); } } } if (modPropertiesList.spiderSkin.contains("King")) { isKing = true; } } head.render(f5); body.render(f5); rear.render(f5); leg1.render(f5); leg2.render(f5); leg3.render(f5); leg4.render(f5); leg5.render(f5); leg6.render(f5); leg7.render(f5); leg8.render(f5); torso.render(f5); armLeft.render(f5); armRight.render(f5); spinner1.render(f5); spinner2.render(f5); if (!isKing) { breasts.render(f5); } }
From source file:sqr.client.render.RenderCocoon.java
License:Open Source License
public void render(EntityCocoon entityCocoon, double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { GL11.glPushMatrix();/*from w w w . j av a 2 s. c om*/ { GL11.glTranslated(posX, posY, posZ); GL11.glRotatef(entityCocoon.rotationYaw, 0.0F, 1.0F, 0.0F); final float rotateAdjustForHit = entityCocoon.getTimeSinceHit() - rotationPitch / 2; float rotateAdjustForDamage = entityCocoon.getCurrentDamage() - rotationPitch / 2; if (rotateAdjustForDamage < 0.0F) { rotateAdjustForDamage = 0.0F; } if (rotateAdjustForHit > 0.0F) { GL11.glRotatef( MathHelper.sin(rotateAdjustForHit) * rotateAdjustForHit * rotateAdjustForDamage / 10F, 1.0F, 0.0F, 0.0F); } bindTexture(getEntityTexture(entityCocoon)); if (entityCocoon.getCocoonType() == EnumCocoonType.GHAST) { GL11.glScalef(3.5F, 3.5F, 3.5F); GL11.glTranslated(0.0D, -0.5D, 0.0); } else { GL11.glScalef(-1F, -1F, 1.0F); } modelCocoon.render(entityCocoon, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); } GL11.glPopMatrix(); }
From source file:sqr.client.render.RenderMiniGhast.java
License:Open Source License
@Override protected void preRenderCallback(EntityLivingBase entityLivingBase, float partialTickTime) { super.preRenderCallback(entityLivingBase, partialTickTime); GL11.glTranslated(0.0D, -1.0D, 0.0D); }
From source file:sqr.client.render.RenderSpiderEgg.java
License:Open Source License
public void render(EntitySpiderEgg entitySpiderEgg, double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { GL11.glPushMatrix();//w w w . j a v a2 s . c o m { GL11.glTranslated(posX, posY + 1.11D, posZ); GL11.glRotatef(0.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(0.75F, 0.75F, 0.75F); GL11.glScalef(-1F, -1F, 1.0F); bindTexture(getEntityTexture(entitySpiderEgg)); modelEgg.render(entitySpiderEgg, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); } GL11.glPopMatrix(); }
From source file:sqr.client.render.RenderSpiderQueen.java
License:Open Source License
@Override public void renderFirstPersonArm(EntityPlayer entityPlayer) { GL11.glColor3f(1.0F, 1.0F, 1.0F);/* w w w.j ava 2 s . co m*/ modelBipedMain.onGround = 0.0F; modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, entityPlayer); GL11.glPushMatrix(); { GL11.glScalef(0.7F, 0.9F, 0.7F); GL11.glTranslated(-0.3D, 0.1D, 0.0D); try { final ModPropertiesList modPropertiesList = SpiderQueen.getInstance().getModProperties(); bindTexture(new ResourceLocation( "spiderqueen:textures/entity/Arms" + modPropertiesList.spiderSkin.substring(6) + ".png")); } catch (NullPointerException e) { //Happens sometimes just when the player is logging in. } modelFirstPerson.bipedRightArm.render(0.0625F); } GL11.glPopMatrix(); }
From source file:sqr.client.render.RenderSpiderQueen.java
License:Open Source License
@Override public void renderEquippedItems(AbstractClientPlayer clientPlayer, float partialTickTime) { RenderPlayerEvent.Specials.Pre event = new RenderPlayerEvent.Specials.Pre(clientPlayer, this, partialTickTime);//from w w w . ja v a 2 s.c o m if (MinecraftForge.EVENT_BUS.post(event)) { return; } GL11.glColor3f(1.0F, 1.0F, 1.0F); GL11.glScaled(-1, -1, -1); GL11.glTranslated(-0.05D, 0.3D, -0.15D); super.renderArrowsStuckInEntity(clientPlayer, partialTickTime); ItemStack itemstack = clientPlayer.inventory.armorItemInSlot(3); if (itemstack != null && event.renderHelmet) { GL11.glPushMatrix(); this.modelBipedMain.head.postRender(0.0625F); float f1; if (itemstack.getItem() instanceof ItemBlock) { IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED); boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D)); if (is3D || RenderBlocks .renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType())) { f1 = 0.625F; GL11.glTranslatef(0.0F, -0.25F, 0.0F); GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(f1, -f1, -f1); } this.renderManager.itemRenderer.renderItem(clientPlayer, itemstack, 0); } else if (itemstack.getItem() == Items.skull) { f1 = 1.0625F; GL11.glScalef(f1, -f1, -f1); GameProfile gameprofile = null; if (itemstack.hasTagCompound()) { NBTTagCompound nbttagcompound = itemstack.getTagCompound(); if (nbttagcompound.hasKey("SkullOwner", 10)) { gameprofile = NBTUtil.func_152459_a(nbttagcompound.getCompoundTag("SkullOwner")); } else if (nbttagcompound.hasKey("SkullOwner", 8) && !StringUtils.isNullOrEmpty(nbttagcompound.getString("SkullOwner"))) { gameprofile = new GameProfile((UUID) null, nbttagcompound.getString("SkullOwner")); } } TileEntitySkullRenderer.field_147536_b.func_152674_a(-0.5F, 0.0F, -0.5F, 1, 180.0F, itemstack.getItemDamage(), gameprofile); } GL11.glPopMatrix(); } float f3; if (clientPlayer.getCommandSenderName().equals("deadmau5") && clientPlayer.func_152123_o()) { this.bindTexture(clientPlayer.getLocationSkin()); for (int j = 0; j < 2; ++j) { float f10 = clientPlayer.prevRotationYaw + (clientPlayer.rotationYaw - clientPlayer.prevRotationYaw) * partialTickTime - (clientPlayer.prevRenderYawOffset + (clientPlayer.renderYawOffset - clientPlayer.prevRenderYawOffset) * partialTickTime); float f2 = clientPlayer.prevRotationPitch + (clientPlayer.rotationPitch - clientPlayer.prevRotationPitch) * partialTickTime; GL11.glPushMatrix(); GL11.glRotatef(f10, 0.0F, 1.0F, 0.0F); GL11.glRotatef(f2, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0.375F * (float) (j * 2 - 1), 0.0F, 0.0F); GL11.glTranslatef(0.0F, -0.375F, 0.0F); GL11.glRotatef(-f2, 1.0F, 0.0F, 0.0F); GL11.glRotatef(-f10, 0.0F, 1.0F, 0.0F); f3 = 1.3333334F; GL11.glScalef(f3, f3, f3); GL11.glPopMatrix(); } } boolean flag = clientPlayer.func_152122_n(); flag = event.renderCape && flag; float f5; if (flag && !clientPlayer.isInvisible() && !clientPlayer.getHideCape()) { this.bindTexture(clientPlayer.getLocationCape()); GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 0.0F, 0.125F); double d3 = clientPlayer.field_71091_bM + (clientPlayer.field_71094_bP - clientPlayer.field_71091_bM) * (double) partialTickTime - (clientPlayer.prevPosX + (clientPlayer.posX - clientPlayer.prevPosX) * (double) partialTickTime); double d4 = clientPlayer.field_71096_bN + (clientPlayer.field_71095_bQ - clientPlayer.field_71096_bN) * (double) partialTickTime - (clientPlayer.prevPosY + (clientPlayer.posY - clientPlayer.prevPosY) * (double) partialTickTime); double d0 = clientPlayer.field_71097_bO + (clientPlayer.field_71085_bR - clientPlayer.field_71097_bO) * (double) partialTickTime - (clientPlayer.prevPosZ + (clientPlayer.posZ - clientPlayer.prevPosZ) * (double) partialTickTime); f5 = clientPlayer.prevRenderYawOffset + (clientPlayer.renderYawOffset - clientPlayer.prevRenderYawOffset) * partialTickTime; double d1 = (double) MathHelper.sin(f5 * (float) Math.PI / 180.0F); double d2 = (double) (-MathHelper.cos(f5 * (float) Math.PI / 180.0F)); float f6 = (float) d4 * 10.0F; if (f6 < -6.0F) { f6 = -6.0F; } if (f6 > 32.0F) { f6 = 32.0F; } float f7 = (float) (d3 * d1 + d0 * d2) * 100.0F; float f8 = (float) (d3 * d2 - d0 * d1) * 100.0F; if (f7 < 0.0F) { f7 = 0.0F; } float f9 = clientPlayer.prevCameraYaw + (clientPlayer.cameraYaw - clientPlayer.prevCameraYaw) * partialTickTime; f6 += MathHelper.sin((clientPlayer.prevDistanceWalkedModified + (clientPlayer.distanceWalkedModified - clientPlayer.prevDistanceWalkedModified) * partialTickTime) * 6.0F) * 32.0F * f9; if (clientPlayer.isSneaking()) { f6 += 25.0F; } GL11.glRotatef(6.0F + f7 / 2.0F + f6, 1.0F, 0.0F, 0.0F); GL11.glRotatef(f8 / 2.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(-f8 / 2.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); GL11.glPopMatrix(); } ItemStack itemstack1 = clientPlayer.inventory.getCurrentItem(); if (itemstack1 != null && event.renderItem) { GL11.glPushMatrix(); this.modelBipedMain.armRight.postRender(0.0625F); GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F); if (clientPlayer.fishEntity != null) { itemstack1 = new ItemStack(Items.stick); } EnumAction enumaction = null; if (clientPlayer.getItemInUseCount() > 0) { enumaction = itemstack1.getItemUseAction(); } IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED); boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D)); if (is3D || itemstack1.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack1.getItem()).getRenderType())) { f3 = 0.5F; GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); f3 *= 0.75F; GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(-f3, -f3, f3); } else if (itemstack1.getItem() == Items.bow) { f3 = 0.625F; GL11.glTranslatef(0.0F, 0.125F, 0.3125F); GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(f3, -f3, f3); GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); } else if (itemstack1.getItem().isFull3D()) { f3 = 0.625F; if (itemstack1.getItem().shouldRotateAroundWhenRendering()) { GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, -0.125F, 0.0F); } if (clientPlayer.getItemInUseCount() > 0 && enumaction == EnumAction.block) { GL11.glTranslatef(0.05F, 0.0F, -0.1F); GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-10.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(-60.0F, 0.0F, 0.0F, 1.0F); } GL11.glTranslatef(0.0F, 0.1875F, 0.0F); GL11.glScalef(f3, -f3, f3); GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); } else { f3 = 0.375F; GL11.glTranslatef(0.25F, 0.1875F, -0.1875F); GL11.glScalef(f3, f3, f3); GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F); } float f4; float f12; int k; if (itemstack1.getItem().requiresMultipleRenderPasses()) { for (k = 0; k <= itemstack1.getItem().getRenderPasses(itemstack1.getItemDamage()); ++k) { int i = itemstack1.getItem().getColorFromItemStack(itemstack1, k); f12 = (float) (i >> 16 & 255) / 255.0F; f4 = (float) (i >> 8 & 255) / 255.0F; f5 = (float) (i & 255) / 255.0F; GL11.glColor4f(f12, f4, f5, 1.0F); this.renderManager.itemRenderer.renderItem(clientPlayer, itemstack1, k); } } else { k = itemstack1.getItem().getColorFromItemStack(itemstack1, 0); float f11 = (float) (k >> 16 & 255) / 255.0F; f12 = (float) (k >> 8 & 255) / 255.0F; f4 = (float) (k & 255) / 255.0F; GL11.glColor4f(f11, f12, f4, 1.0F); this.renderManager.itemRenderer.renderItem(clientPlayer, itemstack1, 0); } GL11.glPopMatrix(); } MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Specials.Post(clientPlayer, this, partialTickTime)); }
From source file:sqr.client.render.RenderWeb.java
License:Open Source License
public void render(EntityWeb entityWeb, double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { bindEntityTexture(entityWeb);//from www . j a v a2 s .c o m GL11.glPushMatrix(); { final Tessellator tessellator = Tessellator.instance; GL11.glTranslated(posX, posY, posZ); GL11.glRotatef(entityWeb.prevRotationYaw + (entityWeb.rotationYaw - entityWeb.prevRotationYaw) * rotationYaw - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef( entityWeb.prevRotationPitch + (entityWeb.rotationPitch - entityWeb.prevRotationPitch) * rotationYaw, 0.0F, 0.0F, 1.0F); final byte b0 = 0; final float f2 = 0.0F; final float f3 = 0.5F; final float f4 = (0 + b0 * 10) / 32.0F; final float f5 = (5 + b0 * 10) / 32.0F; final float f6 = 0.0F; final float f7 = 0.15625F; final float f8 = (5 + b0 * 10) / 32.0F; final float f9 = (10 + b0 * 10) / 32.0F; final float f10 = 0.05625F; GL11.glEnable(GL12.GL_RESCALE_NORMAL); 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.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(); 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(); for (int i = 0; i < 4; ++i) { GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); GL11.glNormal3f(0.0F, 0.0F, f10); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, f2, f4); tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, f3, f4); tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, f3, f5); tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, f2, f5); tessellator.draw(); } GL11.glDisable(GL12.GL_RESCALE_NORMAL); } GL11.glPopMatrix(); }
From source file:sqr.client.render.RenderWebslinger.java
License:Open Source License
public void renderWebSlinger(EntityWebslinger entityWebslinger, double posX, double posY, double posZ, float rotationYaw, float rotationPitch) { final Tessellator tessellator = Tessellator.instance; GL11.glPushMatrix();/*from w w w. j av a 2s . c om*/ { GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glTranslated(posX, posY, posZ); GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glRotatef(180F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F); bindTexture(getEntityTexture(entityWebslinger)); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); tessellator.addVertexWithUV(-0.5F, -0.5F, 0.0D, 0, 1); tessellator.addVertexWithUV(0.5F, -0.5F, 0.0D, 1, 1); tessellator.addVertexWithUV(0.5F, 0.5F, 0.0D, 1, 0); tessellator.addVertexWithUV(-0.5F, 0.5F, 0.0D, 0, 0); tessellator.draw(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); } GL11.glPopMatrix(); if (entityWebslinger.player != null) { final float deltaYaw = (entityWebslinger.player.prevRotationYaw + (entityWebslinger.player.rotationYaw - entityWebslinger.player.prevRotationYaw) * rotationPitch) * 3.141593F / 180F; final Vec3 vec3d = Vec3.createVectorHelper(-0.5D, 0.03D, 0.8D); vec3d.rotateAroundX(-(entityWebslinger.player.prevRotationPitch + (entityWebslinger.player.rotationPitch - entityWebslinger.player.prevRotationPitch) * rotationPitch) * 3.141593F / 180F); vec3d.rotateAroundY(-(entityWebslinger.player.prevRotationYaw + (entityWebslinger.player.rotationYaw - entityWebslinger.player.prevRotationYaw) * rotationPitch) * 3.141593F / 180F); double correctedPosX = entityWebslinger.player.prevPosX + (entityWebslinger.player.posX - entityWebslinger.player.prevPosX) * rotationPitch + vec3d.xCoord; double correctedPosY = entityWebslinger.player.prevPosY + (entityWebslinger.player.posY - entityWebslinger.player.prevPosY) * rotationPitch + vec3d.yCoord; double correctedPosZ = entityWebslinger.player.prevPosZ + (entityWebslinger.player.posZ - entityWebslinger.player.prevPosZ) * rotationPitch + vec3d.zCoord; if (renderManager.options.thirdPersonView > 0) { final float deltaYawOffset = (entityWebslinger.player.prevRenderYawOffset + (entityWebslinger.player.renderYawOffset - entityWebslinger.player.prevRenderYawOffset) * rotationPitch) * 3.141593F / 180F; final double sinDeltaYawOffset = MathHelper.sin(deltaYawOffset); final double cosDeltaYawOffset = MathHelper.cos(deltaYawOffset); correctedPosX = entityWebslinger.player.prevPosX + (entityWebslinger.player.posX - entityWebslinger.player.prevPosX) * rotationPitch - cosDeltaYawOffset * 0.35D - sinDeltaYawOffset * 0.85D; correctedPosY = entityWebslinger.player.prevPosY + (entityWebslinger.player.posY - entityWebslinger.player.prevPosY) * rotationPitch - 0.45D; correctedPosZ = entityWebslinger.player.prevPosZ + (entityWebslinger.player.posZ - entityWebslinger.player.prevPosZ) * rotationPitch - sinDeltaYawOffset * 0.35D + cosDeltaYawOffset * 0.85D; } final double deltaPosX = entityWebslinger.prevPosX + (entityWebslinger.posX - entityWebslinger.prevPosX) * rotationPitch; final double deltaPosY = entityWebslinger.prevPosY + (entityWebslinger.posY - entityWebslinger.prevPosY) * rotationPitch + 0.25D; final double deltaPosZ = entityWebslinger.prevPosZ + (entityWebslinger.posZ - entityWebslinger.prevPosZ) * rotationPitch; final double correctedDeltaPosX = (float) (correctedPosX - deltaPosX); final double correctedDeltaPosY = (float) (correctedPosY - deltaPosY); final double correctedDeltaPosZ = (float) (correctedPosZ - deltaPosZ); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_LIGHTING); tessellator.startDrawing(3); tessellator.setColorOpaque_I(8161437); final int verteces = 16; for (int currentVertex = 0; currentVertex <= verteces; currentVertex++) { final float vertexPos = (float) currentVertex / (float) verteces; tessellator.addVertex(posX + correctedDeltaPosX * vertexPos, posY + correctedDeltaPosY * vertexPos + 0.2F, posZ + correctedDeltaPosZ * vertexPos); } tessellator.draw(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_TEXTURE_2D); } }