Package micdoodle8.mods.galacticraft.api.vector

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


    public Vector3 getPlayerSpawnLocation(WorldServer world, EntityPlayerMP player)
    {
        if (player != null)
        {
            GCPlayerStats stats = GCPlayerStats.get(player);
            return new Vector3(stats.coordsTeleportedFromX, ConfigManagerCore.disableLander ? 250.0 : 900.0, stats.coordsTeleportedFromZ);
        }

        return null;
    }
View Full Code Here


    }

    @Override
    public Vector3 getEntitySpawnLocation(WorldServer world, Entity entity)
    {
        return new Vector3(entity.posX, ConfigManagerCore.disableLander ? 250.0 : 900.0, entity.posZ);
    }
View Full Code Here

        {
            for (final ForgeDirection orientation : ForgeDirection.values())
            {
                if (orientation != ForgeDirection.UNKNOWN)
                {
                    final Vector3 vector = new Vector3(par2, par3, par4);
                    Vector3 blockVec = this.modifyPositionFromSide(vector.clone(), orientation, 1);
                    Block connection = blockVec.getBlock(world);

                    if (connection != null && connection.equals(GCBlocks.airLockSeal))
                    {
                        if (orientation.offsetY == -1)
                        {
                            if (side == 0)
                            {
                                return this.airLockIcons[1];
                            }
                            else if (side == 1)
                            {
                                return this.airLockIcons[0];
                            }
                            else
                            {
                                return this.airLockIcons[2];
                            }
                        }
                        else if (orientation.offsetY == 1)
                        {
                            if (side == 0)
                            {
                                return this.airLockIcons[0];
                            }
                            else if (side == 1)
                            {
                                return this.airLockIcons[1];
                            }
                            else
                            {
                                return this.airLockIcons[3];
                            }
                        }
                        else if (orientation.ordinal() == side)
                        {
                            if (side == 0)
                            {
                                return this.airLockIcons[0];
                            }
                            else if (side == 1)
                            {
                                return this.airLockIcons[1];
                            }
                            else
                            {
                                return this.airLockIcons[3];
                            }
                        }
                        else if (orientation.getOpposite().ordinal() == side)
                        {
                            return this.airLockIcons[0];
                        }

                        blockVec = vector.clone().translate(new Vector3(orientation.offsetX, orientation.offsetY, orientation.offsetZ));
                        connection = blockVec.getBlock(world);

                        if (connection != null && connection.equals(GCBlocks.airLockSeal))
                        {
                            if (orientation.offsetX == 1)
                            {
View Full Code Here

        if (tile instanceof TileEntityFallenMeteor)
        {
            TileEntityFallenMeteor meteor = (TileEntityFallenMeteor) tile;

            Vector3 col = new Vector3(198, 108, 58);
            col.translate(200 - meteor.getScaledHeatLevel() * 200);
            col.x = Math.min(255, col.x);
            col.y = Math.min(255, col.y);
            col.z = Math.min(255, col.z);

            return GCCoreUtil.to32BitColor(255, (byte) col.x, (byte) col.y, (byte) col.z);
View Full Code Here

                case 3:
                    distance = 10.0D;
                    break;
                }

                Vector3 thisPos = new Vector3(this).translate(0.5F);
                Vector3 minPos = new Vector3(thisPos).translate(-distance);
                Vector3 maxPos = new Vector3(thisPos).translate(distance);
                AxisAlignedBB matchingRegion = AxisAlignedBB.getBoundingBox(minPos.x, minPos.y, minPos.z, maxPos.x, maxPos.y, maxPos.z);
                List playersWithin = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, matchingRegion);

                boolean foundPlayer = false;
View Full Code Here

                {
                    GCPlayerStats playerStats = GCPlayerStats.get(player);
                    // If it has been long enough since the last step
                    if (playerStats.distanceSinceLastStep > 0.35D)
                    {
                        Vector3 pos = new Vector3(player);
                        // Set the footprint position to the block below and add random number to stop z-fighting
                        pos.y = MathHelper.floor_double(player.posY - 1D) + player.worldObj.rand.nextFloat() / 100.0F;

                        // Adjust footprint to left or right depending on step count
                        switch (playerStats.lastStep)
                        {
                        case 0:
                            float a = (-player.rotationYaw + 90F) / 57.295779513F;
                            pos.translate(new Vector3(MathHelper.sin(a) * 0.25F, 0, MathHelper.cos(a) * 0.25F));
                            break;
                        case 1:
                            a = (-player.rotationYaw - 90F) / 57.295779513F;
                            pos.translate(new Vector3(MathHelper.sin(a) * 0.25, 0, MathHelper.cos(a) * 0.25));
                            break;
                        }

                        float rotation = player.rotationYaw - 180;
                        pos = WorldUtil.getFootprintPosition(player.worldObj, rotation, pos, new BlockVec3(player));

                        long chunkKey = ChunkCoordIntPair.chunkXZ2Int(pos.intX() >> 4, pos.intZ() >> 4);
                        TickHandlerServer.addFootprint(chunkKey, new Footprint(player.worldObj.provider.dimensionId, pos, rotation), player.worldObj.provider.dimensionId);

                        // Increment and cap step counter at 1
                        playerStats.lastStep++;
                        playerStats.lastStep %= 2;
View Full Code Here

{
    @Override
    public Vector3 getFogColor()
    {
        float f = 1.0F - this.getStarBrightness(1.0F);
        return new Vector3(210F / 255F * f, 120F / 255F * f, 59F / 255F * f);
    }
View Full Code Here

    @Override
    public Vector3 getSkyColor()
    {
        float f = 1.0F - this.getStarBrightness(1.0F);
        return new Vector3(154 / 255.0F * f, 114 / 255.0F * f, 66 / 255.0F * f);
    }
View Full Code Here

    }

    @Override
    public Vector3 getFogColor()
    {
        return new Vector3(0, 0, 0);
    }
View Full Code Here

    }

    @Override
    public Vector3 getSkyColor()
    {
        return new Vector3(0, 0, 0);
    }
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.