Package micdoodle8.mods.galacticraft.core.dimension

Examples of micdoodle8.mods.galacticraft.core.dimension.SpaceStationWorldData


    @Override
    public IElectricityNetwork getNetwork()
    {
        if (this.network == null)
        {
            EnergyNetwork network = new EnergyNetwork();
            network.getTransmitters().add(this);
            this.setNetwork(network);
        }

        return (IElectricityNetwork) this.network;
    }
View Full Code Here


            {
                buffer.writeLong((Long) dataValue);
            }
            else if (dataValue instanceof EnergyStorage)
            {
                EnergyStorage storage = (EnergyStorage) dataValue;
                buffer.writeFloat(storage.getCapacityGC());
                buffer.writeFloat(storage.getMaxReceive());
                buffer.writeFloat(storage.getMaxExtract());
                buffer.writeFloat(storage.getEnergyStoredGC());
            }
            else if (dataValue instanceof NBTTagCompound)
            {
                NetworkUtil.writeNBTTagCompound((NBTTagCompound) dataValue, buffer);
            }
View Full Code Here

                }
                objList.add(bytes);
            }
            else if (clazz.equals(EnergyStorage.class))
            {
                EnergyStorage storage = new EnergyStorage(buffer.readFloat(), buffer.readFloat(), buffer.readFloat());
                storage.setEnergyStored(buffer.readFloat());
                objList.add(storage);
            }
            else if (clazz.equals(NBTTagCompound.class))
            {
                try
View Full Code Here

                {
                    break;
                }

                ++this.villagersSpawned;
                final EntityAlienVillager var11 = new EntityAlienVillager(par1World);
                var11.setLocationAndAngles(var8 + 0.5D, var9, var10 + 0.5D, 0.0F, 0.0F);
                par1World.spawnEntityInWorld(var11);
            }
        }
    }
View Full Code Here

        }

        GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_UPDATE_DIMENSION_LIST, new Object[] { player.getGameProfile().getName(), dimensionList }), player);
        stats.usingPlanetSelectionGui = true;
        stats.savedPlanetList = new String(dimensionList);
        Entity fakeEntity = new EntityCelestialFake(player.worldObj, player.posX, player.posY, player.posZ, 0.0F);
        player.worldObj.spawnEntityInWorld(fakeEntity);
        player.mountEntity(fakeEntity);
    }
View Full Code Here

              else
              {
                return false;
              }

              final EntityTier1Rocket spaceship = new EntityTier1Rocket(par3World, centerX, centerY, centerZ, EnumRocketType.values()[par1ItemStack.getItemDamage()]);

                spaceship.setPosition(spaceship.posX, spaceship.posY + spaceship.getOnPadYOffset(), spaceship.posZ);
                par3World.spawnEntityInWorld(spaceship);

                if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("RocketFuel"))
                {
                    spaceship.fuelTank.fill(new FluidStack(GalacticraftCore.fluidFuel, par1ItemStack.getTagCompound().getInteger("RocketFuel")), true);
View Full Code Here

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

        if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("RocketFuel"))
        {
            EntityTier1Rocket rocket = new EntityTier1Rocket(FMLClientHandler.instance().getWorldClient(), 0, 0, 0, EnumRocketType.values()[par1ItemStack.getItemDamage()]);
            par2List.add(GCCoreUtil.translate("gui.message.fuel.name") + ": " + par1ItemStack.getTagCompound().getInteger("RocketFuel") + " / " + rocket.fuelTank.getCapacity());
        }
    }
View Full Code Here

    public void preInit(FMLPreInitializationEvent event)
    {
      isPlanetsLoaded = Loader.isModLoaded(Constants.MOD_ID_PLANETS);
     
      MinecraftForge.EVENT_BUS.register(new EventHandlerGC());
        GCPlayerHandler handler = new GCPlayerHandler();
        MinecraftForge.EVENT_BUS.register(handler);
        FMLCommonHandler.instance().bus().register(handler);
        GalacticraftCore.proxy.preInit(event);

        ConfigManagerCore.initialize(new File(event.getModConfigurationDirectory(), GalacticraftCore.CONFIG_FILE));
View Full Code Here

    @Override
    public Vector3 getPlayerSpawnLocation(WorldServer world, EntityPlayerMP player)
    {
        if (player != null)
        {
            GCPlayerStats stats = GCPlayerStats.get(player);
            return new Vector3(stats.coordsTeleportedFromX, 250.0, stats.coordsTeleportedFromZ);
        }

        return null;
    }
View Full Code Here

    public static SpaceStationWorldData bindSpaceStationToNewDimension(World world, EntityPlayerMP player)
    {
        int newID = DimensionManager.getNextFreeDimId();
        SpaceStationWorldData data = WorldUtil.createSpaceStation(world, newID, player);
        GCPlayerStats stats = GCPlayerStats.get(player);
        stats.spaceStationDimensionID = newID;
        GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_UPDATE_SPACESTATION_CLIENT_ID, new Object[] { newID }), player);
        return data;
    }
View Full Code Here

TOP

Related Classes of micdoodle8.mods.galacticraft.core.dimension.SpaceStationWorldData

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.