Tutorials/Space Station for Server Admins

From Galacticraft Wiki
Jump to: navigation, search

Latest version

There is no reason why a server should not be running the latest Galacticraft, you will experience issues if you don't. Galacticraft 3.0.12.490 and later give much higher performance on servers, and are extremely stable. If you're using a modpack which doesn't include the latest Galacticraft then complain to the modpack creator, or just update it yourself or make your own pack!

Updating Galacticraft should never break compatibility with other mods, if anything it should increase compatibility!


Servers and Sponge : Galacticraft 4

Now that Bukkit no longer exists after 1.7.10, most large multiplayer servers will want to be running Sponge.

Galacticraft 4, versions for Minecraft 1.10.2 and 1.11.2, are fully Sponge compatible on servers.

One minor issue with Sponge is that - due to a bug in Sponge - on your server's first run, when the server starts it will slowly generate the map around the spawn location for the Asteroids, Mars, Moon and Venus, as well as for the Overworld. Depending on how powerful your server is and the number of other mods installed, this map generation could take 4-5 minutes or even longer. Default Sponge server configurations tell a server to time out if a single 'tick' takes longer than 1 minute. So with a default config, your server will stop and exit after the first minute ... probably somewhere in the middle of generating the Asteroids. It's not a crash in Galacticraft, it's just a server time out. You can fix it like this: in server.properties set max-tick-time=999999 or an even higher number. This high time out setting (16 minutes) is only needed for this first server start, after the first start you can lower it to 60000 as per the default, or even less than that.

The remainder of this page is more aimed at Galacticraft 3 / Minecraft 1.7.10 servers with Cauldron or Thermos, but Galacticraft 4 server admins might find some useful tips in some of this as well


Guide to Galacticraft dimensions and commands

Originally from: http://forum.micdoodle8.com/index.php?threads/galacticraft-space-station-dimensions-a-thread-for-server-admins.4044

Recent Galacticraft versions (since Galacticraft 2 version 1001, and all versions of Galacticraft 3) offer server admins the option to set some "static dimensions" in the config. This is intended to help with some of the tougher-to-solve dimension issues with other mods and Bukkit plugins.

It does not harm your server to have the Galacticraft dimensions "loaded" all the time - this does not make a server lag. Just because a dimension is loaded, doesn't mean the map chunks in that dimension are loaded (the map chunks should not be loaded if there are no players there). Large numbers of loaded chunks can make a server slow down or lag, especially if those are busy chunks with lots of machinery or other TileEntities, or lots of animals or other moving Entities. But usually, chunks will only load around the locations where your players are at. (Chunk loaders are obviously an exception!)

By default on Galacticraft, space stations are dynamically loaded dimensions - the dimension only exists on the server when a player is actually in the space station. This is because if you have a lot of players making space stations, you will have many space station dimensions, maybe 100 or more on a large server. Some other mods, and Bukkit plugins can't figure out how to access the unloaded dimensions (including basic Bukkit plugins like Factions /f home and Essentials /home or /tpa commands ... but strangely /back seems to be ok with it).

There is a Bukkit / MCPC+ config option to control which of the Galacticraft dimensions are kept loaded all the time, so that teleports etc will always work. Your bukkit.yml should contain something like this: Older versions (1.5.2):

world-settings:
  default:
  keeploaded-environment-normal: true
  keeploaded-environment-nether: true
  keeploaded-environment-the_end: true
  keeploaded-environment-twilightforest: false
  keeploaded-environment-gccorespacestation: true
  keeploaded-environment-gcmoon: true

Newer versions (1.6.4 and later):

world-environment-settings:
  normal:
    keep-world-loaded: true
  nether:
    keep-world-loaded: true
  the_end:
    keep-world-loaded: false
  gccorespacestation:
    keep-world-loaded: false
  gcmoon:
    keep-world-loaded: false
    enabled: true
  gcmars:
    keep-world-loaded: false
    enabled: true

Note, like every .yml file, you must be super careful to use spaces and not TAB characters for your indents. But I guess all server admins know that.

Note also that if "keep-world-loaded" is set to false, then it doesn't keep the dimension in memory all the time, but you can still set "enabled" to true which should allow the dimension at least to be registered so that teleportation works. (See more notes on teleportation in my post below - there is a Galacticraft respawn setting which is also relevant.)

Keeping individual dimensions loaded

Using the /gckeeploaded command, you can set Galacticraft to keep one or more specific dimensions always loaded, even if other Galacticraft dimensions are not dynamically loaded. For example, you might configure your bukkit.yml to have dynamically loaded space stations, but there is one special space station which you want all of your players to be able to access all the time (maybe you have a teleport set up to take any player there from spawn?).

Making dimensions available to other mods using core.conf

If it's mods not plugins which are the issue, or your server doesn't use Bukkit or you don't want to keep all the space stations loaded but only some of them, another option is to register the space stations as "static dimensions" in Galacticraft's config. Either edit the core.conf file, or the Galacticraft command /gckeeploaded lets admins specify a dimension number which you want to add to the static list, from within the game.

By default the core.conf should contain this:

####################
# dimensions
####################
dimensions {
# IDs to load at startup, and keep loaded until server stops. Can be added via /gckeeploaded
I:"Static Loaded Dimensions" <
>
I:idDimensionOverworldOrbit=-27
# Static Space Station ID
I:idDimensionOverworldOrbitStatic=-26
}

You can add static dimensions to the list between < and >, each dimension number on its own line. This is useful if you have other mods or server plugins which need to "know" about the Galacticraft dimensions at server start. For example, if using Galacticraft with Multiverse, you should add the dimensions -28, -29, -30 in there (each on its own line), and maybe also any permanent space stations.

Disabling space stations

Galacticraft 3, and versions of Galacticraft 2 since 2.0.13.1068, also offer the option for server owners to disable space station creation completely.

To keep some space station fun but with maximum dimension stability, one idea could be to whitelist the server, have your server staff create one or two "public" space stations, set those as static dimensions, then disable space station creation.

(Players who want to make their own space station can, I guess, build out to another spot in the "public" space station dimension and start a space station there, same as they would if they want to build far out in The End. Or if the player can't be bothered to build out, admins can create a building spot for them anywhere in space using the /up 1 trick.)

Get your admins into space

A useful command to know: admins can use /dimensiontp MYNAME as a quick way to get to the space stations or other planets.

The command can also be used to help out players, for example if they made a rocket then they lost it somehow on a server rollback. The command takes the player to the relevant dimension and gives them a parachest / lander with a Tier 1 rocket inside it.

(In Galacticraft 3, the name can be omitted in which case /dimensiontp will teleport the command user.)

See also: Commands#Permission_nodes

Bungeecord

In Galacticraft 2 if you have multiple Galacticraft servers linked with BungeeCord, you may want to take a look at this thread: http://forum.micdoodle8.com/index.php?threads/possible-to-stop-space-station-creation.4017/ The issues described there should be fixed in Galacticraft 2 builds 2.0.13.1067 and later, though note that those must be installed client-side so you may need to ensure that all players on your server have that build. It would definitely be wise for 1.6.4 modpacks to be based on that build or later.

In Galacticraft 3 early builds operation of a Galacticraft server with BungeeCord was not possible, players were unable to login correctly if they were in a space station or any other Galacticraft dimension. This is due to BungeeCord apparently having decided to block Forge Custom packets at the login stage. This issue is fixed as from GC 3.0.10.298 and all later builds. [Further discussion for any network coders interested in the details]

Space station numeric limit

Galacticraft creates space stations with dimension IDs starting at 2, 3, 4 ... skipping any dimension ID which is in use by another mod.

For Forge versions prior to 1.7.10-1340, there was a bug / unimplemented feature in Forge so that the Minecraft client could crash if a player attempted to log in to a dimension number higher than 127. The crash looked like this, where XXX can be any number probably between -128 and -1:

java.lang.IllegalArgumentException: Could not get provider type for dimension XXX, does not exist
        at net.minecraftforge.common.DimensionManager.getProviderType(DimensionManager.java:148)
        at net.minecraftforge.common.DimensionManager.createProviderFor(DimensionManager.java:302)

In theory it's also possible a player logging in to space station with an even higher ID would have no crash but would log in to the wrong dimension - basically, subtract 256 from the intended dimension ID and see what you get, for example 226 would take you to the Asteroids dimension.

Two ways to fix this:

  • update your Forge to version 1340 or later - note client and server both need to update
  • if that's not possible for some reason, then delete any space stations with IDs higher than 127 - see next section

Deleting a space station

To delete a space station from the server, you need the dimension number, and then you need to do three things:

1. As from GC build 3.0.12.411 and later use the /ssnewowner command in-game to set any random name (not a real player) as the new owner of this dimension. This will free up the existing owner so he can create a new station in future.

2. While the server is offline, delete the DIMSPACESTATION_# folder from the /world folder

3. While the server is offline, remove the corresponding spacestation_#.dat from the main /world/data folder

(Before GC build 3.0.12.411, in place of the /ssnewowner command, you had to edit an NBT file like this: for the player who owned the space station (name is in the spacestation_#.dat file), edit the player .dat file and set "spaceStationDimensionID" to -1. NBTExplorer is the tool you should most likely use to edit the player .dat file.)

After deleting a space station, you must not renumber the dimensions of the other space stations. It is OK if there are gaps in the numbering!

(Note: not tested with other mods which do inter-dimensional teleports, for example, Waypoints, Enhanced Portals 2, or Mekanism. If those mods store teleport data some other place than in the DIMSPACESTATION_# folder then you might need to edit that mod data also, to delete teleports in the deleted dimension.)

Teleporting using Essentials

Another relevant config setting:

# By default, you will respawn on galacticraft dimensions if you die. If you set this to true, you will respawn back on earth.
  B:"Force Overworld Spawn"=false

If this is set to true, you will likely find that Bukkit teleportation (for example, /home /tp /warp - and even /back) does not work to take players to Galacticraft dimensions. The reason for the issue is that Essentials, which operates all those commands, makes use of the vanilla respawn code to do its teleporting. It's possible that different Bukkit plugins, or different teleport methods (for example mods like Enhanced Portals 2) will still work ok even if that respawn setting is set to true.

The intended effect is that setting this to true will prevent players from setting their bed home on Galacticraft dimensions - or more accurately, they can put a bed down and sleep in it, but it won't be the place they respawn at. It also prevents spawning at the default world spawn location in Galacticraft dimensions. It's there to help out players in single player who get "stuck" in a Galacticraft dimension, for example a player who flies to the Moon but doesn't have enough fuel to make it back again, or he forgot to bring a fuel loader. Set this config to true, and the player will be brought back to the Overworld next time he dies.

This setting is "false" by default. I'm not sure why you would ever want it "true" on a server unless you specifically want to prevent players from teleporting to space dimensions on your server (maybe you want to make it hard-mode for players so each one has to make his own rocket?)

Due to a bug in Essentials (Essentials is not using the recommend Block.isAir() method to check for air blocks), it is not possible to teleport to a /home location which is in a Sealed Space. So in space dimensions, players will need to use an airlock. Set the /home location in vacuum just outside the airlock, and then walk into your base.

Listing the space stations

Galacticraft does not currently offer any way for admins to list all the space station names and their dimension numbers, the only way is to make a list manually by looking in the /world/data folder and opening up each spacestation#.dat file using a tool like NBTExplorer, to see its name and which player created it. (A command for server admins to do this is added in the to-do list.)

Multiverse

If you use the Multiverse plugin to add some new dimensions: by default, Galacticraft will not allow player rockets to fly to these Multiverse dimensions (and they are not accessible from the Celestial Selection Screen - only the Overworld which is set in server's configuration as idDimensionOverworld is accessible from that screen). If you want to allow Launch Controllers to send rockets to all the other Multiverse dimensions (if there is a corresponding landing pad and Launch Controller there), you can use the config entry launchControllerAllDims in planets.conf.

Linux servers with OpenJDK

Galacticraft currently tries to initialise a JPEGImageWriter during startup, though in fact this is only used clientside, servers do not use it. OpenJDK currently has a bug in its JPEG library, which Galacticraft will detect and log with an info message. If you're running a server, you really don't need to worry about this, it won't affect anything at all. (If you're running a client, it only means that some of the map image files used by the Display Screen will not be saved to disk client-side.)

(If you're running an antique version of Galacticraft - prior to 3.0.12.352 - then you may see a crash in server startup with OpenJDK. [Discussion of this past issue] Either update your Galacticraft or change to using the Sun/Oracle Java runtime in place of OpenJDK.)