Playing Archived Revisions: Difference between revisions

From MC Public Wiki
Jump to navigation Jump to search
(Multiverse spawn location.)
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Overview ==
== Overview ==


This page describes the procedure for running a final download archive of a PvE revision on your own local server. It should be mostly applicable to running Create revisions too.
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.


In order to load non-default worlds, we will use a modified server, capable of running plugins, and the [https://www.spigotmc.org/resources/multiverse-core.390/ Multiverse-Core] plugin, to manage those worlds.
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 [https://www.spigotmc.org/resources/multiverse-core.390/ Multiverse-Core] plugin, to manage those worlds.


For some time now, NerdNu has used [https://papermc.io/ Paper] as our Minecraft server. It's a modified version of [https://www.spigotmc.org/ Spigot] which allows us to use plugins, is more efficient than Mojang's server, has many more configuration options but 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.
For some time now, NerdNu has used [https://papermc.io/ Paper] as our Minecraft server. It's a modified version of [https://www.spigotmc.org/ 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 ==
== Requirements ==


Line 17: Line 20:
* A copy of Paper downloaded from [https://papermc.io/downloads the Paper downloads page].
* A copy of Paper downloaded from [https://papermc.io/downloads the Paper downloads page].
* A copy of Multiverse-Core, downloaded from [https://www.spigotmc.org/resources/multiverse-core.390/ its project page on the Spigot site].
* A copy of Multiverse-Core, downloaded from [https://www.spigotmc.org/resources/multiverse-core.390/ its project page on the Spigot site].
* A copy of the final download archive for the server revision from [https://mcp-dl.com 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.md5 http://mcp-dl.com/pve-rev25.tar.gz.md5].  
* A copy of the final download archive for the server revision from [https://mcp-dl.com 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 http://mcp-dl.com/pve-rev25.tar.gz] (gzip-compressed tar file).  




----
----
== Folder Structure ==
== 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. 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.
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.
The procedure in the next section will walk you through placing files into this structure.
Line 31: Line 35:


----
----
== Procedure for Creating the Server ==
== Procedure for Creating the Server ==


# Install or update Java, as needed.
# Install or update Java, as needed.
# Create the server folder, "archive" or whatever name you chose.
# Create the server folder, "archive" or whatever name you chose.
# 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).
# 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).
# Create the "plugins" folder.
# Create the "plugins" folder.
# Download the [https://www.spigotmc.org/resources/multiverse-core.390/ Multiverse-Core] JAR file and put it in the "plugins" folder.
# Download the [https://www.spigotmc.org/resources/multiverse-core.390/ Multiverse-Core] JAR file and put it in the "plugins" folder.
Line 42: Line 47:
# 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).
# 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).


<blockquote>''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.''</blockquote>


----
----
Line 47: Line 53:
== Running the Server ==
== Running the Server ==


Minecraft servers need quite a lot of RAM - probably more than just the default 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 and enter:
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:


<pre style="width:90%;overflow:auto;font-size:0.9em">
<pre style="width:90%;overflow:auto;font-size:1.1em">
java -Xms2G -Xmx2G -jar server.jar
java -Xms2G -Xmx2G -jar server.jar
</pre>
</pre>
Line 55: Line 61:
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.
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.


<pre style="width:90%;overflow:auto;font-size:0.9em">
<pre style="width:90%;overflow:auto;font-size:1.1em">
Downloading vanilla jar...
Downloading vanilla jar...
Patching vanilla jar...
Patching vanilla jar...
Line 73: Line 79:
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.
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.


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.
[[File:console.png|alt=Graphical Console|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.


<blockquote>
<blockquote>
'''''Note, however, that it would be better 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 as soon as possible.'''''
'''''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.'''''
</blockquote>
</blockquote>




----
----
== Preventing Everything From Burning to the Ground With Multiverse Core ==
 
== 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.
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.


<blockquote>''Note, however, 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.''</blockquote>
<blockquote>''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.''</blockquote>


If you need to, you can consult the [https://github.com/Multiverse/Multiverse-Core/wiki/Command-Reference Multiverse Core Command Reference]. The list of [https://github.com/Multiverse/Multiverse-Core/wiki/World-properties 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.
If you need to, you can consult the [https://github.com/Multiverse/Multiverse-Core/wiki/Command-Reference Multiverse Core Command Reference]. The list of [https://github.com/Multiverse/Multiverse-Core/wiki/World-properties 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.
Line 92: Line 100:
To prevent builds from catching fire in the 3 default Minecraft worlds, enter the following commands in the console:
To prevent builds from catching fire in the 3 default Minecraft worlds, enter the following commands in the console:


<pre style="width:90%;overflow:auto;font-size:0.9em">
<pre style="width:90%;overflow:auto;font-size:1.1em">
mv gamerule doFireTick false world
mv gamerule doFireTick false world
mv gamerule doFireTick false world_nether
mv gamerule doFireTick false world_nether
Line 102: Line 110:


----
----
== Importing Non-Default Worlds ==
== Importing Non-Default Worlds ==


Line 107: Line 116:
* import the "mapworld" world,
* import the "mapworld" world,
* prevent fire spread there,
* prevent fire spread there,
* stop the daylight cycle (you can then "/time set noon" to place the sun directly overhead),
* stop the daylight cycle (you can then run "/time set noon" to place the sun directly overhead),
* set the game mode to creative there,
* set the game mode to creative there,
* prevent monster and animal spawns there, and
* prevent monster and animal spawns there, and
* prevent weather there.
* prevent weather there.


<pre style="width:90%;overflow:auto;font-size:0.9em">
<pre style="width:90%;overflow:auto;font-size:1.1em">
mv import mapworld normal
mv import mapworld normal
mv gamerule doFireTick false mapworld
mv gamerule doFireTick false mapworld
Line 122: Line 131:
</pre>
</pre>


----


----
== Setting Per-World Spawn Locations ==
== 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".
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".
Line 129: Line 138:
For example, to set the spawn location of the PvE "mapworld" world:
For example, to set the spawn location of the PvE "mapworld" world:


# In the console, give yourself full "OP" permissions (change "totemo" to your player name): <pre style="width:90%;overflow:auto;font-size:0.9em">op totemo</pre>
# In the console, give yourself full "OP" permissions (change "totemo" to your player name): <pre style="font-size:1.1em">op totemo</pre>
# Log in to your server using the Multiplayer menu of your client (the address is "localhost").
# Log in to your server using the Multiplayer menu of your client (the address is "localhost").
# Teleport to the spawn location using vanilla commands:<pre style="width:90%;overflow:auto;font-size:0.9em">execute in mapworld tp totemo -9985 4 -9985</pre>
# Teleport to the spawn location using vanilla commands (in-game):<pre style="font-size:1.1em">/execute in mapworld run tp totemo -9985 4 -9985</pre>
# Set the Multiverse spawn location for that world:<pre style="width:90%;overflow:auto;font-size:0.9em">mv setspawn</pre>
# Set the Multiverse spawn location for that world:<pre style="font-size:1.1em">/mv setspawn</pre>
# Test teleportation to the overworld:<pre style="width:90%;overflow:auto;font-size:0.9em">mv tp world</pre>
# Test teleportation to the overworld:<pre style="font-size:1.1em">/mv tp world</pre>
# Test teleportation back to the mapworld:<pre style="width:90%;overflow:auto;font-size:0.9em">mv tp mapworld</pre>
# Test teleportation back to the mapworld:<pre style="font-size:1.1em">/mv tp mapworld</pre>
 
<blockquote>''The "/execute in worldname run ..." syntax of vanilla commands is not very convenient. Consider downloading NerdNu's [https://github.com/NerdNu/TPControl/releases 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.''</blockquote>
 
 
----
 
== 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.


<blockquote>''The "/execute in worldname run ..." syntax of vanilla commands is not very convenient. Consider downloading NerdNu's [https://github.com/NerdNu/TPControl/releases TPControl plugin] 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.''</blockquote>
----

Latest revision as of 06:25, 7 January 2021


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.