Package com.forgeessentials.client.util

Examples of com.forgeessentials.client.util.ClientPoint


        boolean render1 = false;

        // render p1
        if (info.getPoint1() != null)
        {
            ClientPoint p1 = info.getPoint1();
            GL11.glTranslated(p1.x - RenderManager.renderPosX, p1.y + 1 - RenderManager.renderPosY, p1.z - RenderManager.renderPosZ);
            GL11.glScalef(1.0F, -1.0F, -1.0F);
            GL11.glColor3f(255, 0, 0);
            renderBlockBox(tess);
            render1 = true;
        }

        // render p2
        if (info.getPoint2() != null)
        {
            ClientPoint p1 = info.getPoint1();
            ClientPoint p2 = info.getPoint2();

            if (render1)
            {
                float x = p2.getX() - p1.getX();
                float y = (float) (p1.getY() - p2.getY()) + 1;
                float z = (float) (p1.getZ() - p2.getZ()) - 1;

                GL11.glTranslated(x, y, z);
            }
            else
            {
                GL11.glTranslated(p2.x - RenderManager.renderPosX, p2.y + 1 - RenderManager.renderPosY, p2.z - RenderManager.renderPosZ);
            }

            GL11.glScalef(1.0F, -1.0F, -1.0F);
            GL11.glColor3f(0, 255, 0);
            renderBlockBox(tess);
        }

        if (info.getSelection() != null)
        {
            ClientSelection sel = info.getSelection();

            float x = sel.getLowPoint().getX() - sel.getEnd().getX();
            float y = sel.getLowPoint().getY() - sel.getEnd().getY();
            float z = (float) (sel.getLowPoint().getZ() - sel.getEnd().getZ()) - 1;

            // translate to the low point..
            GL11.glTranslated(x, y, z);

            GL11.glScalef(1.0F, -1.0F, -1.0F);
            GL11.glColor3f(0, 5, 100);
            // renderBlockBox(tess);
            renderBlockBoxTo(tess, new ClientPoint(sel.getXLength(), -sel.getYLength(), -sel.getZLength()));
        }

        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
View Full Code Here


        if (player == null || info == null || !info.playerLogger)
        {
            return;
        }

        ClientPoint p = getPoint(player);

        if (p == null)
        {
            return;
        }
View Full Code Here

        if (mo == null)
        {
            return null;
        }

        ClientPoint p = new ClientPoint(mo.blockX, mo.blockY, mo.blockZ);

        if (!player.isSneaking())
        {
            return p;
        }
View Full Code Here

            int amount = buf.readInt();
            for (int i = 0; i < amount; i++)
            {
                try
                {
                    ClientPoint p = new ClientPoint(buf.readInt(), buf.readInt(), buf.readInt());
                    System.out.println(p.x + "; " + p.y + "; " + p.z);
                    ForgeEssentialsClient.info.rbList.put(p, buf.readInt());
                }
                catch (Exception e)
                {
View Full Code Here

        {
            double x = byteBuf.readDouble();
            double y = byteBuf.readDouble();
            double z = byteBuf.readDouble();

            ForgeEssentialsClient.info.setPoint1(new ClientPoint(x, y, z));
        }
        else
        {
            ForgeEssentialsClient.info.setPoint1(null);
        }

        // podouble 2 available
        if (byteBuf.readBoolean())
        {
            double x = byteBuf.readDouble();
            double y = byteBuf.readDouble();
            double z = byteBuf.readDouble();

            ForgeEssentialsClient.info.setPoint2(new ClientPoint(x, y, z));
        }
        else
        {
            ForgeEssentialsClient.info.setPoint2(null);
        }
View Full Code Here

TOP

Related Classes of com.forgeessentials.client.util.ClientPoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.