Package micdoodle8.mods.galacticraft.core.dimension

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


    @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

        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

            {
                e.printStackTrace();
            }
            break;
        case C_UPDATE_SPACESTATION_DATA:
            SpaceStationWorldData var4 = SpaceStationWorldData.getMPSpaceStationData(player.worldObj, (Integer) this.data.get(0), player);
            var4.readFromNBT((NBTTagCompound) this.data.get(1));
            break;
        case C_UPDATE_SPACESTATION_CLIENT_ID:
            ClientProxyCore.clientSpaceStationID = (Integer) this.data.get(0);
            break;
        case C_UPDATE_PLANETS_LIST:
View Full Code Here

                player.addChatMessage(new ChatComponentText(GCCoreUtil.translateWithFormat("gui.chest.warning.wrongkey", this.data.get(0))));
                stats.chatCooldown = 100;
            }
            break;
        case S_RENAME_SPACE_STATION:
            final SpaceStationWorldData ssdata = SpaceStationWorldData.getStationData(playerBase.worldObj, (Integer) this.data.get(1), playerBase);

            if (ssdata != null && ssdata.getOwner().equalsIgnoreCase(player.getGameProfile().getName()))
            {
                ssdata.setSpaceStationName((String) this.data.get(0));
                ssdata.setDirty(true);
            }
            break;
        case S_OPEN_EXTENDED_INVENTORY:
            player.openGui(GalacticraftCore.instance, GuiIdsCore.EXTENDED_INVENTORY, player.worldObj, 0, 0, 0);
            break;
View Full Code Here

                    {
                        throw new WrongUsageException(GCCoreUtil.translate("commands.ssinvite.notFound"), new Object[0]);
                    }
                    else
                    {
                        final SpaceStationWorldData data = SpaceStationWorldData.getStationData(playerBase.worldObj, stats.spaceStationDimensionID, playerBase);

                        String str = null;
                        for (String player : data.getAllowedPlayers())
                        {
                            if (player.equalsIgnoreCase(var3))
                            {
                                str = player;
                                break;
                            }
                        }

                        if (str != null)
                        {
                            data.getAllowedPlayers().remove(str);
                            data.markDirty();
                        }
                        else
                        {
                            throw new CommandException(GCCoreUtil.translateWithFormat("commands.ssuninvite.noPlayer", "\"" + var3 + "\""), new Object[0]);
                        }
View Full Code Here

        {
            GCPlayerStats stats = GCPlayerStats.get(playerBase);
            int ssdim = stats.spaceStationDimensionID;
            if (ssdim > 0)
            {
                final SpaceStationWorldData data = SpaceStationWorldData.getStationData(playerBase.worldObj, ssdim, playerBase);
                String[] allNames = MinecraftServer.getServer().getAllUsernames();
                //data.getAllowedPlayers may include some in lowercase
                //Convert to correct case at least for those players who are online
                ArrayList<String> allowedNames = new ArrayList(data.getAllowedPlayers());
                Iterator<String> itName = allowedNames.iterator();
                ArrayList<String> replaceNames = new ArrayList();
                while (itName.hasNext())
                {
                    String name = itName.next();
View Full Code Here

                    {
                        throw new WrongUsageException(GCCoreUtil.translate("commands.ssinvite.notFound"), new Object[0]);
                    }
                    else
                    {
                        final SpaceStationWorldData data = SpaceStationWorldData.getStationData(playerBase.worldObj, stats.spaceStationDimensionID, playerBase);

                        if (!data.getAllowedPlayers().contains(var3))
                        {
                            data.getAllowedPlayers().add(var3);
                            data.markDirty();
                        }
                    }

                    final EntityPlayerMP playerToAdd = PlayerUtil.getPlayerBaseServerFromPlayerUsername(var3, true);
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.