Package micdoodle8.mods.galacticraft.api.galaxies

Examples of micdoodle8.mods.galacticraft.api.galaxies.SolarSystem


    @SuppressWarnings({ "unchecked", "rawtypes" })
    @Override
    @SideOnly(Side.CLIENT)
    public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List par2List, boolean b)
    {
        EnumRocketType type = EnumRocketType.values()[par1ItemStack.getItemDamage()];

        if (!type.getTooltip().isEmpty())
        {
            par2List.add(type.getTooltip());
        }

        if (type.getPreFueled())
        {
            par2List.add(EnumColor.RED + "\u00a7o" + GCCoreUtil.translate("gui.creativeOnly.desc"));
        }

        if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("RocketFuel"))
View Full Code Here


    {
        final HashMap<String, Integer> map = new HashMap<String, Integer>();

        for (Integer id : ids)
        {
            CelestialBody celestialBody = getReachableCelestialBodiesForDimensionID(id);

            if (id > 0 && celestialBody == null)
            {
                celestialBody = GalacticraftCore.satelliteSpaceStation;
            }

            WorldProvider provider = WorldUtil.getProviderForDimension(id);
            if (celestialBody != null && provider != null)
            {
                if (provider instanceof IGalacticraftWorldProvider && !(provider instanceof IOrbitDimension) || provider.dimensionId == 0)
                {
                    map.put(celestialBody.getName(), provider.dimensionId);
                }
                else if (playerBase != null && provider instanceof IOrbitDimension)
                {
                    final SpaceStationWorldData data = SpaceStationWorldData.getStationData(playerBase.worldObj, id, playerBase);

                    if (!ConfigManagerCore.spaceStationsRequirePermission || data.getAllowedPlayers().contains(playerBase.getGameProfile().getName()) || VersionUtil.isPlayerOpped(playerBase))
                    {
                        map.put(celestialBody.getName() + "$" + data.getOwner() + "$" + data.getSpaceStationName() + "$" + provider.dimensionId, provider.dimensionId);
                    }
                }
            }
        }
View Full Code Here

    }
   
    private void drawCelestialBodies(CelestialBody body, float ticks)
    {
      Star star = null;
      SolarSystem solarSystem = null;
      if (body instanceof Planet)
        solarSystem = ((Planet)body).getParentSolarSystem();
      else if (body instanceof Moon)
        solarSystem = ((Moon)body).getParentPlanet().getParentSolarSystem();
      else if (body instanceof Satellite)
        solarSystem = ((Satellite)body).getParentPlanet().getParentSolarSystem();
     
      if (solarSystem == null)
        solarSystem = GalacticraftCore.solarSystemSol;
    star = solarSystem.getMainStar();

        if (star != null && star.getBodyIcon() != null)
        {
        this.drawCelestialBody(star, 0F, 0F, ticks, 6F);
        }

      String mainSolarSystem = solarSystem.getUnlocalizedName();
        for (Planet planet : GalaxyRegistry.getRegisteredPlanets().values())
        {
          if (planet.getParentSolarSystem() != null && planet.getBodyIcon() != null)
            {
            if (planet.getParentSolarSystem().getUnlocalizedName().equalsIgnoreCase(mainSolarSystem))
View Full Code Here

    private String getGrandparentName()
    {
        if (this.selectedParent instanceof Planet)
        {
            SolarSystem parentSolarSystem = ((Planet) this.selectedParent).getParentSolarSystem();

            if (parentSolarSystem != null)
            {
                return parentSolarSystem.getLocalizedParentGalaxyName();
            }
        }
        else if (this.selectedParent instanceof IChildBody)
        {
            Planet parentPlanet = ((IChildBody) this.selectedParent).getParentPlanet();

            if (parentPlanet != null)
            {
                SolarSystem parentSolarSystem = parentPlanet.getParentSolarSystem();

                if (parentSolarSystem != null)
                {
                    return parentSolarSystem.getLocalizedName();
                }
            }
        }
        else if (this.selectedParent instanceof Star)
        {
            SolarSystem parentSolarSystem = ((Star) this.selectedParent).getParentSolarSystem();

            if (parentSolarSystem != null)
            {
                return parentSolarSystem.getLocalizedParentGalaxyName();
            }
        }
        else if (this.selectedParent instanceof SolarSystem)
        {
            return ((SolarSystem) this.selectedParent).getLocalizedParentGalaxyName();
View Full Code Here

    private String getParentName()
    {
        if (this.selectedParent instanceof Planet)
        {
            SolarSystem parentSolarSystem = ((Planet) this.selectedParent).getParentSolarSystem();

            if (parentSolarSystem != null)
            {
                return parentSolarSystem.getLocalizedName();
            }
        }
        else if (this.selectedParent instanceof IChildBody)
        {
            Planet parentPlanet = ((IChildBody) this.selectedParent).getParentPlanet();

            if (parentPlanet != null)
            {
                return parentPlanet.getLocalizedName();
            }
        }
        else if (this.selectedParent instanceof SolarSystem)
        {
            return ((SolarSystem) this.selectedParent).getLocalizedName();
        }
        else if (this.selectedParent instanceof Star)
        {
            SolarSystem parentSolarSystem = ((Star) this.selectedParent).getParentSolarSystem();

            if (parentSolarSystem != null)
            {
                return parentSolarSystem.getLocalizedName();
            }
        }

        return "Null";
    }
View Full Code Here

    {
        List<CelestialBody> bodyList = Lists.newArrayList();

        if (celestialBody instanceof Planet)
        {
            SolarSystem solarSystem = ((Planet) celestialBody).getParentSolarSystem();

            for (Planet planet : GalaxyRegistry.getRegisteredPlanets().values())
            {
                SolarSystem solarSystem1 = planet.getParentSolarSystem();

                if (solarSystem1 != null && solarSystem1.equals(solarSystem))
                {
                    bodyList.add(planet);
                }
            }
        }
View Full Code Here

        if (!this.worldObj.isRemote)
        {
        ItemStack oxygenItemStack = this.getStackInSlot(2);
        if (oxygenItemStack != null && oxygenItemStack.getItem() instanceof IItemOxygenSupply)
        {
          IItemOxygenSupply oxygenItem = (IItemOxygenSupply) oxygenItemStack.getItem();
          float oxygenDraw = Math.min(this.oxygenPerTick * 2.5F, this.maxOxygen - this.storedOxygen);
          this.storedOxygen += oxygenItem.discharge(oxygenItemStack, oxygenDraw);
          if (this.storedOxygen > this.maxOxygen) this.storedOxygen = this.maxOxygen;
        }
        }
     
        super.updateEntity();
View Full Code Here

        for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
        {
            if (approachingDirection.contains(side))
            {
                TileEntity outputConductor = tileVec.getTileEntityOnSide(tileEntity.getWorldObj(), side);
                IElectricityNetwork electricityNetwork = NetworkHelper.getElectricalNetworkFromTileEntity(outputConductor, side);

                if (electricityNetwork != null)
                {
                    connectedNetworks.add(electricityNetwork);
                }
View Full Code Here

        if (this.worldObj != null)
        {
            if (this.worldObj.isRemote)
            {
                final BlockVec3 thisVec = new BlockVec3(this);
                this.worldObj.func_147479_m(thisVec.x, thisVec.y, thisVec.z);
            }
            else
            {
                this.getNetwork().split(this);
View Full Code Here

            {
                this.attachedFuelable = null;

                for (final ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
                {
                    final TileEntity pad = new BlockVec3(this).getTileEntityOnSide(this.worldObj, dir);

                    if (pad instanceof TileEntityMulti)
                    {
                        final TileEntity mainTile = ((TileEntityMulti) pad).mainBlockPosition.getTileEntity(this.worldObj);
View Full Code Here

TOP

Related Classes of micdoodle8.mods.galacticraft.api.galaxies.SolarSystem

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.