Tutorials/Space Station for Server Admins

From Galacticraft Wiki
Jump to: navigation, search

For Linux servers running OpenJDK

Several Linux distributions include OpenJDK for running Java code, instead of the Java Runtime (JRE) from Sun / Oracle. Unfortunately OpenJDK currently has a bug in its JPEG library. Galacticraft makes use of the standard JPEG library to encode map images sent from the server to the client (e.g. when you fly in a rocket or uses a Display Screen). So a server running on Linux using OpenJDK will crash at that point, like this:

cpw.mods.fml.common.LoaderException: java.lang.UnsatisfiedLinkError: com.sun.imageio.plugins.jpeg.JPEGImageWriter.initWriterIDs(Ljava/lang/Class;Ljava/lang/Class;)V

Currently the only workaround is for the server to use the Sun / Oracle JRE instead. [Further discussion of this issue]

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.

So, by default, space stations are dynamically loaded dimensions - the dimension only exists on the server when a player is actually in the space station. Some other mods, and Bukkit plugins can't figure that out (including the basics 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 keep the Galacticraft dimensions loaded all the time. To enable it, 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.)

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.

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.)

Additional Info 2

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

Additional Info 3

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 unfortunately operation of a Galacticraft server with BungeeCord is not possible, players will be unable to login correctly if they are in a space station or any other Galacticraft dimension - login will only work if the player is on the Overworld or another vanilla dimension. This is due to BungeeCord apparently having decided to block Forge Custom packets at the login stage. That is a strange decision, as it will likely affect other mods as well in various subtle ways. We have searched for a workaround in Galacticraft but have not found one. [Further discussion] If anyone has some ideas for how to solve this, they are welcome to contribute there. A server could maybe solve the problem by making a custom plugin to force-teleport players to the Overworld whenever they logout, but that would probably not be very popular.

Additional Info 4

To delete a space station from the server, you need to do three things: 1. Delete the DIMSPACESTATION_# folder from the /world folder 2. Remove the corresponding spacestation_#.dat from the /world/data folder 3. 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

You do not need to renumber the dimensions of the other space stations, it is OK if there are gaps. Item 3 is needed only if you want to allow that player the option of creating a new space station in future.

(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.)

Additional Info 5

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?)

Additional Info 6

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.)


Impt.png
Unless stated otherwise, all information contained on this wiki should be considered outdated and might not reflect in-game experiences