Package micdoodle8.mods.galacticraft.api.vector

Examples of micdoodle8.mods.galacticraft.api.vector.Vector3


        final TileEntity tile = this.worldObj.getTileEntity(this.spawnerCoords.posX, this.spawnerCoords.posY, this.spawnerCoords.posZ);

        if (tile == null || !(tile instanceof TileEntityDungeonSpawner))
        {
            TileEntityDungeonSpawner spawner = new TileEntityDungeonSpawner();
            spawner.setRoom(new Vector3(this.posX, this.posY, this.posZ), new Vector3(this.sizeX, this.sizeY, this.sizeZ));
            this.worldObj.setTileEntity(this.spawnerCoords.posX, this.spawnerCoords.posY, this.spawnerCoords.posZ, spawner);
        }
        else if (tile instanceof TileEntityDungeonSpawner)
        {
            ((TileEntityDungeonSpawner) tile).setRoom(new Vector3(this.posX, this.posY, this.posZ), new Vector3(this.sizeX, this.sizeY, this.sizeZ));
        }
    }
View Full Code Here


        if (this.postThrowDelay > 0)
        {
            this.postThrowDelay--;
        }

        new Vector3(this);

        if (this.roomCoords != null && this.roomSize != null)
        {
            @SuppressWarnings("unchecked")
            List<Entity> entitiesWithin = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(this.roomCoords.intX() - 1, this.roomCoords.intY() - 1, this.roomCoords.intZ() - 1, this.roomCoords.intX() + this.roomSize.intX(), this.roomCoords.intY() + this.roomSize.intY(), this.roomCoords.intZ() + this.roomSize.intZ()));
View Full Code Here

    @Override
    public void readEntityFromNBT(NBTTagCompound nbt)
    {
        super.readEntityFromNBT(nbt);
        this.roomCoords = new Vector3();
        this.roomCoords.x = nbt.getDouble("roomCoordsX");
        this.roomCoords.y = nbt.getDouble("roomCoordsY");
        this.roomCoords.z = nbt.getDouble("roomCoordsZ");
        this.roomSize = new Vector3();
        this.roomSize.x = nbt.getDouble("roomSizeX");
        this.roomSize.y = nbt.getDouble("roomSizeY");
        this.roomSize.z = nbt.getDouble("roomSizeZ");
    }
View Full Code Here

        {
            GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_REQUEST_FLAG_DATA, new Object[] { playerName }));
            ClientProxyCore.flagRequestsSent.add(playerName);
        }

        return new Vector3(1, 1, 1);
    }
View Full Code Here

        }
    }

    protected void spawnParticles()
    {
        GalacticraftCore.proxy.spawnParticle("distanceSmoke", new Vector3(this.posX, this.posY + 1D + Math.random(), this.posZ), new Vector3(0.0D, 0.0D, 0.0D), new Object[] { });
        GalacticraftCore.proxy.spawnParticle("distanceSmoke", new Vector3(this.posX + Math.random() / 2, this.posY + 1D + Math.random() / 2, this.posZ), new Vector3(0.0D, 0.0D, 0.0D), new Object[] { });
        GalacticraftCore.proxy.spawnParticle("distanceSmoke", new Vector3(this.posX, this.posY + 1D + Math.random(), this.posZ + Math.random()), new Vector3(0.0D, 0.0D, 0.0D), new Object[] { });
        GalacticraftCore.proxy.spawnParticle("distanceSmoke", new Vector3(this.posX - Math.random() / 2, this.posY + 1D + Math.random() / 2, this.posZ), new Vector3(0.0D, 0.0D, 0.0D), new Object[] { });
        GalacticraftCore.proxy.spawnParticle("distanceSmoke", new Vector3(this.posX, this.posY + 1D + Math.random(), this.posZ - Math.random()), new Vector3(0.0D, 0.0D, 0.0D), new Object[] { });
    }
View Full Code Here

                    {
                        z2 = z + 0.5D + 0.25D * dir;
                        mZ = rand.nextFloat() * 2.0F * dir;
                    }

                    GalacticraftCore.proxy.spawnParticle("oxygen", new Vector3(x2, y2, z2), new Vector3(mX, mY, mZ), new Object[] { new Vector3(0.7D, 0.7D, 1.0D) });
                }
            }
        }
    }
View Full Code Here

            for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
            {
                if (dir != ForgeDirection.UP && dir != ForgeDirection.DOWN)
                {
                    Vector3 thisVec = new Vector3(x, y, z);
                    thisVec = thisVec.modifyPositionFromSide(dir);
                    Block blockID = thisVec.getBlock(world);

                    if (blockID == GCBlocks.airLockFrame || blockID == GCBlocks.airLockSeal)
                    {
                        adjacentCount++;
                    }
View Full Code Here

        }
        else
        {
            List<String> playerList = new ArrayList<String>();
            playerList.add(player.getGameProfile().getName());
            this.spaceRaceData = new SpaceRace(playerList, SpaceRace.DEFAULT_NAME, new FlagData(48, 32), new Vector3(1, 1, 1));
        }

        this.mc = FMLClientHandler.instance().getClient();
        this.canEdit = canPlayerEdit();
    }
View Full Code Here

                int availWidth = (int) ((guiRight - 10 - (this.flagDesignerMinX + this.flagDesignerWidth + 10)) / 3);
                float x1 = flagDesignerRight + 10;
                float x2 = guiRight - 10;
                float y1 = guiBottom - 10 - (x2 - x1);
                int height = (int) (y1 - 10 - (guiTop + 10));
                this.sliderColorR = new GuiElementSlider(1, flagDesignerRight + 10, guiTop + 10, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(1, 0, 0));
                this.sliderColorG = new GuiElementSlider(2, flagDesignerRight + 11 + availWidth, guiTop + 10, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(0, 1, 0));
                this.sliderColorB = new GuiElementSlider(3, flagDesignerRight + 12 + availWidth * 2, guiTop + 10, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(0, 0, 1));
                this.sliderColorR.setSliderPos(sliderR);
                this.sliderColorG.setSliderPos(sliderG);
                this.sliderColorB.setSliderPos(sliderB);
                this.buttonList.add(this.sliderColorR);
                this.buttonList.add(this.sliderColorG);
                this.buttonList.add(this.sliderColorB);
                this.checkboxPaintbrush = new GuiElementCheckbox(5, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 10, 13, 13, 26, 26, 133, 0, "", 4210752, false);
                this.checkboxEraser = new GuiElementCheckbox(6, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 25, 13, 13, 26, 26, 133, 52, "", 4210752, false);
                this.checkboxSelector = new GuiElementCheckbox(7, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 40, 13, 13, 26, 26, 133, 78, "", 4210752, false);
                this.checkboxColorSelector = new GuiElementCheckbox(8, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 55, 13, 13, 26, 26, 133, 104, "", 4210752, false);
                this.checkboxShowGrid = new GuiElementCheckbox(9, this, (int) (this.flagDesignerMinX - 15), this.height / 2 - this.height / 4 + 90, 13, 13, 26, 26, 133, 26, "", 4210752, false);
                this.sliderBrushSize = new GuiElementSlider(10, this.checkboxPaintbrush.xPosition - 40, this.checkboxPaintbrush.yPosition, 35, 13, false, new Vector3(0.34, 0.34, 0.34), new Vector3(0.34, 0.34, 0.34), GCCoreUtil.translate("gui.spaceRace.create.brushSize.name"));
                this.sliderEraserSize = new GuiElementSlider(11, this.checkboxEraser.xPosition - 40, this.checkboxEraser.yPosition, 35, 13, false, new Vector3(0.34, 0.34, 0.34), new Vector3(0.34, 0.34, 0.34), GCCoreUtil.translate("gui.spaceRace.create.eraserSize.name"));
                this.sliderEraserSize.visible = false;
                this.buttonList.add(this.checkboxPaintbrush);
                this.buttonList.add(this.checkboxShowGrid);
                this.buttonList.add(this.checkboxEraser);
                this.buttonList.add(this.checkboxSelector);
                this.buttonList.add(this.checkboxColorSelector);
                this.buttonList.add(this.sliderBrushSize);
                this.buttonList.add(this.sliderEraserSize);
                break;
            case CHANGE_TEAM_COLOR:
                guiBottom = this.height / 2 + this.height / 4;
                guiTop = this.height / 2 - this.height / 4;
                guiLeft = this.width / 6;
                guiRight = this.width / 2 + this.width / 3;
                flagDesignerRight = guiLeft;
                availWidth = (guiRight - guiLeft - 100) / 3;
                x1 = flagDesignerRight + 10;
                x2 = guiLeft - 10;
                y1 = guiBottom - 10 - (x2 - x1);
                height = (int) (y1 - 10 - (guiTop + 30));
                this.sliderColorR = new GuiElementSlider(1, flagDesignerRight + 25, guiTop + 30, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(1, 0, 0));
                this.sliderColorG = new GuiElementSlider(2, flagDesignerRight + availWidth + 50, guiTop + 30, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(0, 1, 0));
                this.sliderColorB = new GuiElementSlider(3, flagDesignerRight + availWidth * 2 + 75, guiTop + 30, availWidth, height, true, new Vector3(0, 0, 0), new Vector3(0, 0, 1));
                this.sliderColorR.setSliderPos(this.spaceRaceData.getTeamColor().floatX());
                this.sliderColorG.setSliderPos(this.spaceRaceData.getTeamColor().floatY());
                this.sliderColorB.setSliderPos(this.spaceRaceData.getTeamColor().floatZ());
                this.buttonList.add(this.sliderColorR);
                this.buttonList.add(this.sliderColorG);
View Full Code Here

                if (Mouse.isButtonDown(0))
                {
                    if (this.checkboxEraser.isSelected != null && this.checkboxEraser.isSelected)
                    {
                        this.setColorWithBrushSize(unScaledX, unScaledY, new Vector3(255, 255, 255), (int) Math.floor(this.sliderEraserSize.getNormalizedValue() * 10) + 1);
                    }
                    else if (this.checkboxColorSelector.isSelected != null && this.checkboxColorSelector.isSelected)
                    {
                        Vector3 colorAt = this.spaceRaceData.getFlagData().getColorAt(unScaledX, unScaledY);
                        this.sliderColorR.setSliderPos(colorAt.floatX());
                        this.sliderColorG.setSliderPos(colorAt.floatY());
                        this.sliderColorB.setSliderPos(colorAt.floatZ());
                    }
                    else if (this.checkboxPaintbrush.isSelected != null && this.checkboxPaintbrush.isSelected)
                    {
                        this.setColorWithBrushSize(unScaledX, unScaledY, new Vector3(this.sliderColorR.getColorValueD(), this.sliderColorG.getColorValueD(), this.sliderColorB.getColorValueD()), (int) Math.floor(this.sliderBrushSize.getNormalizedValue() * 10) + 1);
                    }
                }
            }

            if (this.checkboxSelector != null)
View Full Code Here

TOP

Related Classes of micdoodle8.mods.galacticraft.api.vector.Vector3

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.