Sponge

From Galacticraft Wiki
Revision as of 22:21, 21 August 2017 by Radfast (talk | contribs)
Jump to: navigation, search

Sponge

Now that Bukkit no longer exists in recent Minecraft versions, most large multiplayer servers will want to be running Sponge.

Galacticraft 4, versions for Minecraft 1.10.2 and 1.11.2, are Sponge compatible on servers. If you follow the tips below, it should be as simple as adding both Galacticraft and Sponge in the /mods folder.


Sponge version

We recommend the very latest version of Sponge. For 1.11.2, that's version 1.11.2-2393-6.1.0-BETA-2592 or later. This is tested with Galacticraft and should be stable on servers.


If for some reason you can't use the latest version of Sponge as recommended above, please be aware that there was an issue with some Sponge versions released between April and July 2017. The issue was with any mod which made players change dimensions - like Galacticraft. The prior Sponge versions which worked OK with Galacticraft (which did not have the issue) were:

   1.10.2   Sponge 2250 + Forge 1.10.2-12.18.3.2254 or before
   1.11.2   Sponge 2244 + Forge 1.11.2-13.20.0.2228 or before

Those are versions from March 2017.

(If you do not use the latest Sponge version, then you may find that Sponge breaks Galacticraft lander spawning client-side after rocket flights. There are other weird effects seen client-side: the April-July Sponge versions could prevent players from seeing rockets newly placed on launch pads client-side, and moon buggy on buggy pads, astro miner in astro miner dock, etc etc and other issues with other mods, including some issues when players pass through Nether Portals. All issues of these kinds are fixable by players re-logging, but you don't want to force your players to re-log all the time... so be smart and use a version of Sponge we recommend.)



IMPORTANT: spawn area generation on first server start

On your new Sponge server's first run, when the server starts it will generate some map chunks around the "spawn location" for the Asteroids, Mars, Moon and Venus, as well as for the Overworld.

It's actually not our intention for the server to do this - players won't be going to these other planets in the first few minutes on a server - but we didn't find a way to stop Sponge from doing this. (It doesn't happen on a standard Forge server so it looks like it's a bug in Sponge.)

Depending on how quick your server is and the number of other mods installed, this spawn map generation could take 4-5 minutes or even longer, the very first time you start your server. The problem? Defaul server configurations tell a server to time out if any tick takes longer than 1 minute. Spawn generation counts as a tick (seems bizarre but hey). 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 easily like this: in server.properties set max-tick-time=999999 - that's 16 minutes - or an even higher number if you have a ton of mods and a slow PC. The high max-tick-time setting like this is only needed for this first server start. After the first start you can lower it to 60000 as per the default - that's 1 minute - or even less than that if you prefer.



For info: Galacticraft background mapping: CPU usage

Galacticraft has a background mapping function which is used for Overworld map images on Display Screens and will have additional uses in future.

This background mapping aims to generate a complete visual map of the Overworld - for Galacticraft's future use - when a server very first starts. The process takes approximately 30 minutes, depending on the CPU speed of your server PC. The process does not generate map chunks on your server. The process takes around 2-3MB of disk space in your server world's Galacticraft folder, that's all. The process is multi-threaded so it should have no impact on server performance: but it will take up an extra full CPU core on your server PC, for around 30 minutes but only the first time you start the server. For example, if you have a 4-core CPU on your server, the standard Server Thread and Netty networking threads will use up around 1 CPU core, so a normal Minecraft server should show up as using "25% CPU" on a 4-core machine - maybe less than that if the server is not heavily loaded and there are not too many players online. But, in the first 30 minutes while the background mapping process is running, the server will take up to 50% CPU because during this time it's using two CPU cores.

What happens if you start your server and shut it down in the first 30 minutes, before the background mapping finished? On a basic Minecraft + Forge server, Galacticraft saves its background mapping progress on shutdown and next time you start the server it resumes where it left off, so it will only need a few more minutes to finish the job. But with Sponge the save somehow gets skipped (probably a bug somewhere in Sponge). This means that if you keep on, over and over, starting your Sponge + Galacticraft server and shutting it down after 1-29 minutes from first start - maybe because of crashes in another mod? - Galacticraft will never finish its background mapping. The consequence will be that the background mapping thread will run every time, or at least until you get your server decently stable so that it can run for a full 30 minutes without crashing.

Our recommendation is to set up your server with Galacticraft and other mods, and then when you're ready to go, start the server running for the first 30 minutes to 1 hour with no players online. So just start the server running and leave it alone for an hour or so, or overnight. If you then check the World/galacticraft/overworldMap folder for a file named Overworld1536.bin, you'll know it has finished the background mapping, and as long as that file is there, it won't need to do it again.

(The background mapping will also activate to generate a smaller local map whenever a player places a Display Screen. This takes maybe 2-3 seconds in the background, and it's fully multi-threaded so you shouldn't notice any impact on server performance or tick speed, but your CPU might temporarily spike up from 25% to 50% while this is happening.)



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