Playing Archived Revisions

From MC Public Wiki
Jump to navigation Jump to search


Overview

This page describes the procedure for hosting the final map download archive of a PvE revision on a Minecraft server running on your computer. The procedure should be mostly applicable to running Creative revisions too.

Minecraft supports three worlds by default (the overworld, nether and end), but our servers also include some extra worlds that don't exist in vanilla Minecraft. In order to load non-default worlds, we will use a modified server, capable of running plugins, and the Multiverse-Core plugin, to manage those worlds.

For some time now, NerdNu has used Paper as our Minecraft server. It's a modified version of Spigot which allows us to use plugins, is more efficient than Mojang's server, has many more configuration options, and in its default configuration plays almost the same as vanilla Minecraft. We recommend Paper, but you could use Spigot, or any server derived from Spigot.



Requirements

You will need:

  • A computer with a few spare gigabytes of RAM and an internet connection.
  • A Long Term Support (LTS) release of Java from Oracle. You probably have Java 8 or better on your computer already. We recommend Java 11, which is the current LTS release at the time of writing (Jan 2021).
  • A copy of Paper downloaded from the Paper downloads page.
  • A copy of Multiverse-Core, downloaded from its project page on the Spigot site.
  • A copy of the final download archive for the server revision from https://mcp-dl.com. The procedure in this document was tested with PvE rev 25's final download http://mcp-dl.com/pve-rev25.tar.gz (gzip-compressed tar file).



Folder Structure

In this document, we will create the server in a folder called "archive", but you are free to give it any name you desire. Where it resides on the disk doesn't matter either; all that matters is what it contains. That folder is called the "server folder". It is the top level of a structure of folders and files on the disk that defines a Minecraft server.

The procedure in the next section will walk you through placing files into this structure.

Folder Structure



Procedure for Creating the Server

  1. Install or update Java, as needed.
  2. Create the server folder, "archive" or whatever name you chose.
  3. Extract the final download archive into the server folder. This will create a child folder for each world, including at least "world", "world_nether" and "world_the_end" (and "mapworld" if included in the final save). The final download is in "gzipped tar file" format. Just about any archiving program worth its salt can extract that, but especially GNU tar on UNIX-like systems (including Linux and Macs).
  4. Create the "plugins" folder.
  5. Download the Multiverse-Core JAR file and put it in the "plugins" folder.
  6. Place the Paper JAR in the server folder. At the time of writing, Paper 1.16.4 build 391 (JAR file) is current.
  7. Rename that JAR file to "server.jar".
  8. Create "eula.txt" in the server folder and edit it to include the line "eula=true". The server will refuse to start in the absence of this text file, which acknowledges Mojang's End User License Agreement (EULA).

The Microsoft Windows file browser "Explorer" hides file extensions in its default configuration. This usually creates more problems than it solves. If things aren't working, consider editing the settings for this program and turning off the option to hide file type extensions.


Running the Server

Minecraft servers need quite a lot of RAM - probably more than just the 1GB that Java allocates by default. We'll start the server with 2GB set aside from the get-go. Start a "command prompt" or "terminal", change directory to the "archive" directory ("cd path/to/archive") and enter:

java -Xms2G -Xmx2G -jar server.jar

The output of the running server will look something like the following. Paper starts by downloading Mojang's vanilla server and modifying it with custom code from the Spigot and Paper developers.

Downloading vanilla jar...
Patching vanilla jar...
System Info: Java 11 (OpenJDK 64-Bit Server VM 11.0.9.1+1) Host: Linux 5.9.14-100.fc32.x86_64 (amd64)
Loading libraries, please wait...
[15:44:57 ERROR]: Failed to load properties from file: server.properties
[15:44:57 INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[15:44:57 INFO]: Found new data pack file/bukkit, loading it automatically
[15:44:57 INFO]: Reloading ResourceManager: Default, bukkit
[15:44:58 INFO]: Loaded 7 recipes
[15:45:00 INFO]: Starting minecraft server version 1.16.4
[15:45:00 INFO]: Loading properties
[15:45:00 INFO]: This server is running Paper version git-Paper-391 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)
...

After a while, a window will pop up that shows a graph of memory usage, the tick time in milliseconds, and the console log. Beneath the console log is a text entry field where you can type commands.

Graphical Console

The server is now running. The address is "localhost", or "localhost:25565" if you prefer to be specific about the port number. You can connect there directly with the Multiplayer "Direct Connection" button of your Minecraft client, or click "Add Server" to add that address to your server list.

Note, however, that it would be wise to follow the instructions in the next section to stop fire from damaging the map before you log in. Some chunks at spawn are already loaded; it's a good idea to stop fires spreading as soon as possible.



Preventing Fire Spread With Multiverse Core

We'll use Multiverse to prevent fire from destroying builds in all worlds. There are other ways to do this: you could install the WorldGuard plugin, for instance, and configure it to stop fire spread.

Note that the vanilla /gamerule command won't influence worlds when running Multiverse. You need to use the /mv gamerule command to tell Multiverse to configure the game rule in each world.

If you need to, you can consult the Multiverse Core Command Reference. The list of World Properties has example commands you can use in-game to configure the player's current world. When using the console, append the world name to the command in order to configure a specific world.

To prevent builds from catching fire in the 3 default Minecraft worlds, enter the following commands in the console:

mv gamerule doFireTick false world
mv gamerule doFireTick false world_nether
mv gamerule doFireTick false world_the_end

Note that you must omit the leading "/" from commands when using the console.



Importing Non-Default Worlds

Enter the following commands in the console to:

  • import the "mapworld" world,
  • prevent fire spread there,
  • stop the daylight cycle (you can then run "/time set noon" to place the sun directly overhead),
  • set the game mode to creative there,
  • prevent monster and animal spawns there, and
  • prevent weather there.
mv import mapworld normal
mv gamerule doFireTick false mapworld
mv gamerule doDaylightCycle false mapworld
mv modify set gamemode creative mapworld
mv modify set monsters false mapworld
mv modify set animals false mapworld
mv modify set weather false mapworld

Setting Per-World Spawn Locations

Each world managed by Multiverse has its own spawn location. To set the spawn location in a world, go to the location and run "/mv setspawn". You can then teleport there with "/mv tp worldname".

For example, to set the spawn location of the PvE "mapworld" world:

  1. In the console, give yourself full "OP" permissions (change "totemo" to your player name):
    op totemo
  2. Log in to your server using the Multiplayer menu of your client (the address is "localhost").
  3. Teleport to the spawn location using vanilla commands (in-game):
    /execute in mapworld run tp totemo -9985 4 -9985
  4. Set the Multiverse spawn location for that world:
    /mv setspawn
  5. Test teleportation to the overworld:
    /mv tp world
  6. Test teleportation back to the mapworld:
    /mv tp mapworld

The "/execute in worldname run ..." syntax of vanilla commands is not very convenient. Consider downloading NerdNu's TPControl plugin's most recent JAR file and placing it in the "plugins" folder, then restart the server. That plugin allows "/tppos worldname x y z" or "/tppos x y z" in the current world.



Shutting Down the Server

To shut down the server, enter the "stop" command in the console.

Shutting down the program in an orderly manner guarantees that all of the settings (including Multiverse configuration) will be correctly saved, ready for you to use next time you start the server.