Package micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementGradientList

Examples of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementGradientList.ListElement


    @SideOnly(Side.CLIENT)
    @Override
    public GuiScreen getResultScreen(EntityPlayer player, int x, int y, int z)
    {
        return new GuiSchematicBuggy(player.inventory);
    }
View Full Code Here


    @SideOnly(Side.CLIENT)
    @Override
    public GuiScreen getResultScreen(EntityPlayer player, int x, int y, int z)
    {
        return new GuiSchematicInput(player.inventory, x, y, z);
    }
View Full Code Here

    @SideOnly(Side.CLIENT)
    @Override
    public GuiScreen getResultScreen(EntityPlayer player, int x, int y, int z)
    {
        return new GuiSchematicTier1Rocket(player.inventory, x, y, z);
    }
View Full Code Here

                this.currentState = EnumSpaceRaceGui.ADD_PLAYER;
                this.initGui();
            }
            else if (this.currentState == EnumSpaceRaceGui.ADD_PLAYER)
            {
                ListElement playerToInvite = this.gradientListAddPlayers.getSelectedElement();
                if (playerToInvite != null && !this.recentlyInvited.containsKey(playerToInvite.value))
                {
                    SpaceRace race = SpaceRaceManager.getSpaceRaceFromPlayer(this.thePlayer.getGameProfile().getName());
                    if (race != null)
                    {
                        GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_INVITE_RACE_PLAYER, new Object[] { playerToInvite.value, race.getSpaceRaceID() }));
                        this.recentlyInvited.put(playerToInvite.value, 20 * 60);
                    }
                }
            }
            else if (this.currentState == EnumSpaceRaceGui.REMOVE_PLAYER)
            {
                ListElement playerToRemove = this.gradientListRemovePlayers.getSelectedElement();
                if (playerToRemove != null)
                {
                    SpaceRace race = SpaceRaceManager.getSpaceRaceFromPlayer(this.thePlayer.getGameProfile().getName());
                    if (race != null)
                    {
View Full Code Here

                {
                    String username = player.getGameProfile().getName();

                    if (!this.spaceRaceData.getPlayerNames().contains(username))
                    {
                        playerNames.add(new ListElement(username, this.recentlyInvited.containsKey(username) ? GCCoreUtil.to32BitColor(255, 250, 120, 0) : GCCoreUtil.to32BitColor(255, 190, 190, 190)));
                    }
                }
            }

            this.gradientListAddPlayers.updateListContents(playerNames);

            if (this.buttonList.size() >= 2)
            {
                ((GuiElementGradientButton) this.buttonList.get(1)).enabled = this.gradientListAddPlayers.getSelectedElement() != null;
            }
        }

        if (this.currentState == EnumSpaceRaceGui.REMOVE_PLAYER && this.gradientListRemovePlayers != null && this.ticksPassed % 20 == 0)
        {
            List<ListElement> playerNames = new ArrayList<ListElement>();
            for (int i = 1; i < this.spaceRaceData.getPlayerNames().size(); i++)
            {
                String playerName = this.spaceRaceData.getPlayerNames().get(i);
                playerNames.add(new ListElement(playerName, GCCoreUtil.to32BitColor(255, 190, 190, 190)));
            }

            this.gradientListRemovePlayers.updateListContents(playerNames);

            if (this.buttonList.size() >= 2)
View Full Code Here

        RecipeManagerGC.loadRecipes();
        NetworkRegistry.INSTANCE.registerGuiHandler(GalacticraftCore.instance, new GuiHandler());
        FMLCommonHandler.instance().bus().register(new TickHandlerServer());
        GalaxyRegistry.refreshGalaxies();
       
      GalacticraftRegistry.registerScreen(new GameScreenText())//Screen API demo
      //Note: add-ons can register their own screens in postInit by calling GalacticraftRegistry.registerScreen(IGameScreen) like this.
      //[Called on both client and server: do not include any client-specific code in the new game screen's constructor method.]
    }
View Full Code Here

                {
                    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

    }

    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

    @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

TOP

Related Classes of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementGradientList.ListElement

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.