List of usage examples for org.lwjgl.opengl GL11 glRotatef
public static native void glRotatef(@NativeType("GLfloat") float angle, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z);
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.items.ItemScytheRender.java
License:Creative Commons License
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch (type) { case EQUIPPED: { GL11.glPushMatrix();/*from w ww.j a v a2 s . com*/ Minecraft.getMinecraft().renderEngine.bindTexture(texture); GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(140F, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0.0F, 0.0F, -0.8F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } case EQUIPPED_FIRST_PERSON: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(140F, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0.0F, 0.0F, -0.8F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } case ENTITY: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); if (RenderItem.renderInFrame) { GL11.glScalef(0.4F, 0.4F, 0.4F); GL11.glTranslatef(-0.9F, 0.5F, 0.0F); GL11.glRotatef(-26F, 0.0F, 0.0F, 1.0F); } GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(140F, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0.0F, 0.0F, -0.8F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } default: break; } }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.RenderReinforcedFishingHook.java
License:Creative Commons License
public void doRenderFishHook(EntityReinforcedFishingHook entityFishHook, double par2, double par4, double par6, float par8, float par9) { GL11.glPushMatrix();// w w w. j a va 2s . c om GL11.glTranslatef((float) par2, (float) par4, (float) par6); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(0.5F, 0.5F, 0.5F); this.bindEntityTexture(entityFishHook); Tessellator tessellator = Tessellator.instance; byte b0 = 1; byte b1 = 2; float f2 = (b0 * 8 + 0) / 128.0F; float f3 = (b0 * 8 + 8) / 128.0F; float f4 = (b1 * 8 + 0) / 128.0F; float f5 = (b1 * 8 + 8) / 128.0F; float f6 = 1.0F; float f7 = 0.5F; float f8 = 0.5F; GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); tessellator.addVertexWithUV(0.0F - f7, 0.0F - f8, 0.0D, f2, f5); tessellator.addVertexWithUV(f6 - f7, 0.0F - f8, 0.0D, f3, f5); tessellator.addVertexWithUV(f6 - f7, 1.0F - f8, 0.0D, f3, f4); tessellator.addVertexWithUV(0.0F - f7, 1.0F - f8, 0.0D, f2, f4); tessellator.draw(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); if (entityFishHook.angler != null) { float f9 = entityFishHook.angler.getSwingProgress(par9); float f10 = MathHelper.sin(MathHelper.sqrt_float(f9) * (float) Math.PI); Vec3 vec3 = Vec3.createVectorHelper(-0.5D, 0.03D, 0.8D); vec3.rotateAroundX(-(entityFishHook.angler.prevRotationPitch + (entityFishHook.angler.rotationPitch - entityFishHook.angler.prevRotationPitch) * par9) * (float) Math.PI / 180.0F); vec3.rotateAroundY(-(entityFishHook.angler.prevRotationYaw + (entityFishHook.angler.rotationYaw - entityFishHook.angler.prevRotationYaw) * par9) * (float) Math.PI / 180.0F); vec3.rotateAroundY(f10 * 0.5F); vec3.rotateAroundX(-f10 * 0.7F); double d3 = entityFishHook.angler.prevPosX + (entityFishHook.angler.posX - entityFishHook.angler.prevPosX) * par9 + vec3.xCoord; double d4 = entityFishHook.angler.prevPosY + (entityFishHook.angler.posY - entityFishHook.angler.prevPosY) * par9 + vec3.yCoord; double d5 = entityFishHook.angler.prevPosZ + (entityFishHook.angler.posZ - entityFishHook.angler.prevPosZ) * par9 + vec3.zCoord; double d6 = entityFishHook.angler == Minecraft.getMinecraft().thePlayer ? 0.0D : (double) entityFishHook.angler.getEyeHeight(); if (this.renderManager.options.thirdPersonView > 0 || entityFishHook.angler != Minecraft.getMinecraft().thePlayer) { float f11 = (entityFishHook.angler.prevRenderYawOffset + (entityFishHook.angler.renderYawOffset - entityFishHook.angler.prevRenderYawOffset) * par9) * (float) Math.PI / 180.0F; double d7 = MathHelper.sin(f11); double d8 = MathHelper.cos(f11); d3 = entityFishHook.angler.prevPosX + (entityFishHook.angler.posX - entityFishHook.angler.prevPosX) * par9 - d8 * 0.35D - d7 * 0.85D; d4 = entityFishHook.angler.prevPosY + d6 + (entityFishHook.angler.posY - entityFishHook.angler.prevPosY) * par9 - 0.45D; d5 = entityFishHook.angler.prevPosZ + (entityFishHook.angler.posZ - entityFishHook.angler.prevPosZ) * par9 - d7 * 0.35D + d8 * 0.85D; } double d9 = entityFishHook.prevPosX + (entityFishHook.posX - entityFishHook.prevPosX) * par9; double d10 = entityFishHook.prevPosY + (entityFishHook.posY - entityFishHook.prevPosY) * par9 + 0.25D; double d11 = entityFishHook.prevPosZ + (entityFishHook.posZ - entityFishHook.prevPosZ) * par9; double d12 = ((float) (d3 - d9)); double d13 = ((float) (d4 - d10)); double d14 = ((float) (d5 - d11)); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_LIGHTING); tessellator.startDrawing(3); tessellator.setColorOpaque_I(0); byte b2 = 16; for (int i = 0; i <= b2; ++i) { float f12 = (float) i / (float) b2; tessellator.addVertex(par2 + d12 * f12, par4 + d13 * (f12 * f12 + f12) * 0.5D + 0.25D, par6 + d14 * f12); } tessellator.draw(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_TEXTURE_2D); } }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.RenderSatelite.java
License:Creative Commons License
public void renderSatelite(EntitySatelite entitySatelite, double par2, double par4, double par6, float par8, float par9) { GL11.glPushMatrix();//from w ww . ja v a2s .c o m GL11.glTranslatef((float) par2, (float) par4, (float) par6); GL11.glRotatef(180.0F - par8, 0.0F, 1.0F, 0.0F); GL11.glRotatef( entitySatelite.prevRotationYaw + (entitySatelite.rotationYaw - entitySatelite.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef( entitySatelite.prevRotationPitch + (entitySatelite.rotationPitch - entitySatelite.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F); GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); float f4 = 5.75F; GL11.glScalef(f4, f4, f4); GL11.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4); this.bindEntityTexture(entitySatelite); GL11.glScalef(-1.0F, -1.0F, 1.0F); this.model.render(entitySatelite, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.RenderSuperEnderman.java
License:Creative Commons License
protected void renderCarrying(MobSuperEnderman superEnderMan, float par2) { super.renderEquippedItems(superEnderMan, par2); if (superEnderMan.func_146080_bZ().getMaterial() != Material.air) { GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glPushMatrix();//from ww w.j av a 2s . c o m float f1 = 0.5F; GL11.glTranslatef(0.0F, 0.6875F, -0.75F); f1 *= 1.0F; GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(-f1, -f1, f1); int i = superEnderMan.getBrightnessForRender(par2); int j = i % 65536; int k = i / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.bindTexture(TextureMap.locationBlocksTexture); this.field_147909_c.renderBlockAsItem(superEnderMan.func_146080_bZ(), superEnderMan.getCarryingData(), 1.0F); GL11.glPopMatrix(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); } }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.RenderTheDeath.java
License:Creative Commons License
protected void renderTheDeathEquippedItems(MobThedeath living, float par2) { float f1 = 1.0F; GL11.glColor3f(f1, f1, f1);// ww w . j a v a2 s . com super.renderEquippedItems(living, par2); ItemStack itemstack = living.getHeldItem(); float f2; if (itemstack != null) { GL11.glPushMatrix(); if (this.mainModel.isChild) { f2 = 0.5F; GL11.glTranslatef(0.0F, 0.625F, 0.0F); GL11.glRotatef(-20.0F, -1.0F, 0.0F, 0.0F); GL11.glScalef(f2, f2, f2); } GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F); IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED); boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D)); if (itemstack.getItem().equals(NanotechItem.scythe)) { GL11.glRotatef(120F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(160F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(-15F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.5F, 1.0F, 1.3F); } else if (itemstack.getItem().isFull3D()) { f2 = 0.625F; if (itemstack.getItem().shouldRotateAroundWhenRendering()) { GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, -0.125F, 0.0F); } GL11.glTranslatef(0.0F, 0.1875F, 0.0F); GL11.glScalef(f2, -f2, f2); GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); } else { f2 = 0.375F; GL11.glTranslatef(0.25F, 0.1875F, -0.1875F); GL11.glScalef(f2, f2, f2); 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); } this.renderManager.itemRenderer.renderItem(living, itemstack, 0); if (itemstack.getItem().requiresMultipleRenderPasses()) { for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++) { this.renderManager.itemRenderer.renderItem(living, itemstack, x); } } GL11.glPopMatrix(); } }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.tileentity.TileEntityButtonRender.java
License:Creative Commons License
public void renderTileEntityAtBlockLamp(TileEntityButton tileentity, double x, double y, double z, float scale) { GL11.glPushMatrix();/*from w w w . jav a 2s. co m*/ GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); this.bindTexture(texture); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); this.model.renderModel((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F, tileentity.getBlockMetadata() == 2 ? true : (tileentity.getBlockMetadata() == 3 ? true : false)); GL11.glPopMatrix(); GL11.glPopMatrix(); }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.tileentity.TileEntityPortableChestRender.java
License:Creative Commons License
public void renderTileEntityAtPortableChest(TileEntityPortableChest tePortableChest, double x, double y, double z, float tick, boolean isInv) { GL11.glPushMatrix();/*from w w w . j av a 2 s. c o m*/ GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); this.bindTexture(texture); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); if (tePortableChest != null && !isInv) { GL11.glRotatef(180F + 90F * tePortableChest.getDirection(), 0.0F, 1.0F, 0.0F); float angle = tePortableChest.prevLidAngle + (tePortableChest.lidAngle - tePortableChest.prevLidAngle) * tick; angle = 1.0F - angle; angle = 1.0F - angle * angle * angle; this.model.Shape6.rotateAngleX = -(angle * (float) Math.PI / 2.0F); this.model.Shape7.rotateAngleX = -(angle * (float) Math.PI / 2.0F); this.model.Shape8.rotateAngleX = -(angle * (float) Math.PI / 2.0F); this.model.Shape9.rotateAngleX = -(angle * (float) Math.PI / 2.0F); this.model.Shape10.rotateAngleX = -(angle * (float) Math.PI / 2.0F); this.model.Shape11.rotateAngleX = -(angle * (float) Math.PI / 2.0F); } else { GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F); } this.model.render(0.0625F); GL11.glPopMatrix(); }
From source file:fr.theshark34.craftsender.client.CSModemSpecialRenderer.java
License:Open Source License
@Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) { TileEntityCSModem modemTE = (TileEntityCSModem) te; if (modemTE.getChest() == null) switch (modemTE.getBlockMetadata()) { case 0://w ww .j a va 2s . c om modemTE.setChest((TileEntityChest) te.getWorldObj().getTileEntity(modemTE.xCoord - 1, modemTE.yCoord, modemTE.zCoord)); break; case 1: modemTE.setChest((TileEntityChest) te.getWorldObj().getTileEntity(modemTE.xCoord + 1, modemTE.yCoord, modemTE.zCoord)); break; case 2: modemTE.setChest((TileEntityChest) te.getWorldObj().getTileEntity(modemTE.xCoord, modemTE.yCoord, modemTE.zCoord - 1)); break; case 3: modemTE.setChest((TileEntityChest) te.getWorldObj().getTileEntity(modemTE.xCoord, modemTE.yCoord, modemTE.zCoord + 1)); break; } GL11.glPushMatrix(); { GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); ResourceLocation textures = new ResourceLocation("craftsender", "textures/model/cs_modem.png"); Minecraft.getMinecraft().renderEngine.bindTexture(textures); GL11.glPushMatrix(); { GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); int meta = te.getBlockMetadata(); switch (meta) { case 0: GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); break; case 1: GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F); break; case 2: GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F); break; } GL11.glTranslatef(0.0F, 0.0F, 0.20F); this.model.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); } GL11.glPopMatrix(); } GL11.glPopMatrix(); }
From source file:fr.wolf.addons.client.render.RenderHammer.java
License:Minecraft Mod Public
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch (type) { case EQUIPPED: { if (item.getItem().equals(WolfItemList.woodHammer)) { GL11.glPushMatrix();/* w w w. j a va 2 s. c om*/ Minecraft.getMinecraft().renderEngine.bindTexture(texture0); GL11.glRotatef(-105F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.4F, 0.0F, 0.0F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } else if (item.getItem().equals(WolfItemList.stoneHammer)) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture1); GL11.glRotatef(-105F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.4F, 0.0F, 0.0F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } else if (item.getItem().equals(WolfItemList.ironHammer)) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture2); GL11.glRotatef(-105F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.4F, 0.0F, 0.0F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } else if (item.getItem().equals(WolfItemList.goldHammer)) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture3); GL11.glRotatef(-105F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.4F, 0.0F, 0.0F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } else if (item.getItem().equals(WolfItemList.diamondHammer)) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture4); GL11.glRotatef(-105F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.4F, 0.0F, 0.0F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } else if (item.getItem().equals(WolfItemList.silverHammer)) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture5); GL11.glRotatef(-105F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.4F, 0.0F, 0.0F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } else if (item.getItem().equals(WolfItemList.redstoneHammer)) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture6); GL11.glRotatef(-105F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.4F, 0.0F, 0.0F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } else if (item.getItem().equals(WolfItemList.lapisHammer)) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture7); GL11.glRotatef(-105F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.4F, 0.0F, 0.0F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } else { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture8); GL11.glRotatef(-105F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.4F, 0.0F, 0.0F); model.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } break; } default: break; } }
From source file:fr.wolf.addons.client.render.TESRCable.java
License:Minecraft Mod Public
private void renderStraight(EnumFacing direction) { Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); worldrenderer.startDrawingQuads();/*from w ww . j a v a 2s . com*/ { GL11.glTranslatef(0.5F, 0.5F, 0.5F); if (direction.equals(EnumFacing.NORTH) || direction.equals(EnumFacing.SOUTH)) GL11.glRotatef(90F, 1F, 0F, 0F); if (direction.equals(EnumFacing.WEST) || direction.equals(EnumFacing.EAST)) GL11.glRotatef(90F, 0F, 0F, 1F); if (direction.equals(EnumFacing.UP) || direction.equals(EnumFacing.DOWN)) ; GL11.glTranslatef(-0.5F, -0.5F, -0.5F); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 0, 1 - 11 * pixel / 2, 10 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 26 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 26 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 0, 1 - 11 * pixel / 2, 10 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 0, 11 * pixel / 2, 10 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 26 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 26 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 0, 11 * pixel / 2, 10 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 0, 11 * pixel / 2, 10 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 26 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 26 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 0, 1 - 11 * pixel / 2, 10 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 0, 1 - 11 * pixel / 2, 10 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 26 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 26 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 0, 11 * pixel / 2, 10 * pixel_texture, 0 * pixel_texture); if (drawInside) { worldrenderer.addVertexWithUV(11 * pixel / 2, 0, 1 - 11 * pixel / 2, 10 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 26 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 26 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 0, 1 - 11 * pixel / 2, 10 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 0, 11 * pixel / 2, 10 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 26 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 26 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 0, 11 * pixel / 2, 10 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 0, 1 - 11 * pixel / 2, 10 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 26 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 26 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(1 - 11 * pixel / 2, 0, 11 * pixel / 2, 10 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 0, 11 * pixel / 2, 10 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 26 * pixel_texture, 0 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 26 * pixel_texture, 5 * pixel_texture); worldrenderer.addVertexWithUV(11 * pixel / 2, 0, 1 - 11 * pixel / 2, 10 * pixel_texture, 5 * pixel_texture); } } tessellator.draw(); GL11.glTranslatef(0.5F, 0.5F, 0.5F); if (direction.equals(EnumFacing.NORTH) || direction.equals(EnumFacing.SOUTH)) GL11.glRotatef(-90F, 1F, 0F, 0F); if (direction.equals(EnumFacing.WEST) || direction.equals(EnumFacing.EAST)) GL11.glRotatef(-90F, 0F, 0F, 1F); if (direction.equals(EnumFacing.UP) || direction.equals(EnumFacing.DOWN)) ; GL11.glTranslatef(-0.5F, -0.5F, -0.5F); }