Cuberite User's Manual

Generated on 25 August 2016

0 - Introduction

1 - Introduction

This is the Cuberite User's Manual. It is intended as a guide on how to operate the basics of Cuberite, as well as an introduction to some advanced features. It is organised into major sections as well as more detailed subsections and these are laid out in the Table of Contents. The first section deals with downloading, installing, and running Cuberite. The second section is an overview of configuring Cuberite. Reading those two sections is enough to get you started. The remaining sections cover more advanced features and further configuration options in greater depth.

As with Cuberite itself, this manual is in active development, and you can contribute yourself or file an issue if you find an error or ommission on the GitHub Repository. If you're using a printed version, note that the latest version of this manual is always available online.

Resources

Developer Resources

2 - What is Cuberite

Cuberite is a Free and Open Source (FOSS) Minecraft-compatible Game Server. Cuberite is designed with performance, configurability, and extensibility in mind, and also aims to accurately recreate most vanilla features. Cuberite is written in C++, and there is an extensive plugin system that allows for the user to write their own plugins with Lua. In fact, many of the built in commands are implemented by the Core plugin, which has its own GitHub repository and developer community. For more information on the plugin system and how to use it, as well as how to develop for it, please see Plugins.

Cuberite today is maintained by a large team of contributors and plugin developers. If you want to reward the developers for their work, you should set up a donation on Bountysource with a credit card, bitcoin or other currency.

3 - History

Cuberite was created in late 2010 by FakeTruth with its original name "MCServer", as a replacement for the vanilla server, designed to be better performing and more configurable. It was soon open-sourced and developers started working.

In the summer of 2013, the main MCServer repository was moved from Google Code to GitHub, and a new build system was introduced. Several new developers also joined the project around that time, and the project began to increase in members and popularity.

As of late 2014, MCServer had a team of more than 10 regular developers, and the codebase had grown to over 125,000 lines (excluding comments, blank lines and external libraries). Many new features were also introduced in 2014:

  • Chunk Sparsing (ram usage reduction)
  • New Redstone Simulator
  • New Water and Lava Simulators
  • New Generators (and improved speed)

In 2015, many new developers joined the project, and the community decided to adopt the current name of Cuberite. As of late 2015, Cuberite has over 1000 stars on GitHub.

1 - Installing

1 - Pre-Compiled Builds

For Windows, Linux, Raspberry Pi or Mac builds, the main download location is the official homepage, with the latest builds available. For developers who want more control over the builds they download, visit the buildserver.

On Linux or Raspberry Pi, you can simply paste this command into your terminal to install Cuberite:

sh -c "$(wget -O - https://download.cuberite.org)"

Once you have downloaded Cuberite, you can skip straight to Running Cuberite.

Pre-compiled builds are faster to install and easier to use than compiling the source yourself, and are recommended for beginners. However, for some unusual hardware for which no pre-compiled build exists it may be necessary to compile the code yourself. Compiling yourself also has a significant performance advantage on modern machines. If you know how to use the command line or want extra speed you should compile Cuberite yourself.

2 - Compiling Cuberite Yourself

Compiling yourself takes longer and is more involved, but on modern processors can lead to a speed increase of up to 1.5 to 3x. If your operating system or hardware is not officially supported, compiling may be the only way to run Cuberite.

The automatic compilation script is recommended for *nix users. Windows users should see the Other Systems subsection for instructions. The automatic compilation script takes care of the compilation process for you. You only need to copy this command to your terminal:

sh -c "$(wget -O - https://compile.cuberite.org)"

The rest of this section is for those who prefer to manually compile.

Linux/Mac/BSD

Compiling on Linux and related operating systems is easy and simple, although it does require some tools before you can get started. You need a C++ compiler (Clang++ or G++), a C compiler (Clang or GCC), Git, CMake and Make. A simple command to make sure these tools are installed (Ubuntu/Debian) is:

sudo apt-get install clang git cmake make

Once the tools are installed, you should clone the Git repo:

git clone --recursive https://github.com/cuberite/cuberite.git
cd cuberite

You should then run the CMake process and compile:

cmake . -DCMAKE_BUILD_TYPE=RELEASE
make -j 2

Once the compilation process is finished, the Cuberite executable will be placed inside the Server inside the repository that you downloaded. You can copy this folder anywhere you like, just make sure to copy the supporting files otherwise the server will not work properly.

Other Systems

For compiling on Windows or other systems, please see COMPILING.md in the main repository.

Build Flags

Cuberite's build process supports a large number of flags for customising the builds. Use these flags by adding -DFlag_name=Value to the cmake configuration command. For example to enable test generation using the SELF_TEST flag add: -DSELF_TEST=ON

BUILD_TOOLS
Adds the Cuberite tools to the build. At the moment only MCADefrag and ProtoProxy are added. Define as ON to enable. Define as OFF to disable.
BUILD_UNSTABLE_TOOLS
Adds tools that are not working yet to the build. Currently this is only the Generator Performance Test. Used for developing these tools. Define as ON to enable. Define as OFF to disable.
SELF_TEST
Enables generation of tests and self-test startup code. Tests can be run with ctest and with makefiles make test. Define as ON to enable. Define as OFF to disable.
FORCE_32
Forces the build to use 32 bit builds on *nix systems. Define as ON to enable. Define as OFF to disable.
NO_NATIVE_OPTIMIZATION
Disables optimizations for the build host. This is important when building on a different machine from the one you will run Cuberite on as the build machine may support instructions the final machine does not. This flag only has any effect on linux. Define as ON to enable. Define as OFF to disable.

3 - Running Cuberite

Once you have a compiled copy of Cuberite, with the supporting files (in most cases these are distributed with the executable, in a directory called Server), you can run the server and generate yourself a world. It's easy to run the server, although the method varies depending on the operating system you are using.

Windows

To run Cuberite on Windows, just double click on the executable. A command window will come up, and the world will generate.

Linux/Mac/BSD

To run Cuberite on Linux, Mac or FreeBSD, just run the executable in your shell:

./Cuberite

Joining Cuberite

Just like Vanilla, once you've started Cuberite, you can join the server on localhost:25565, or just localhost in your minecraft client.

2 - Configuration Basics

1 - Configuration Overview

Cuberite can be configured by editing various files. Below is a list of all such files:

settings.ini
The main configuration file, which contains server-wide configuration variables.
webadmin.ini
Allows you to tweak the web admin interface, which is available at http://localhost:8080 or http://<Server IP address>:8080 by default.
<World name>/world.ini
This file configures world-specific aspects. This is where you choose your game mode. See GameMode. Note that each world has its own world.ini file, each stored in <World name>/world.ini.
monsters.ini
Allows you to tweak monster behaviour.
motd.txt
The Message of the Day, which is shown to players upon joining your server.
crafting.txt, brewing.txt, furnace.txt
These three files allow you to tweak crafting, brewing, and furnace recipes.
plugins/...
Many plugins have their own configuration files. For instance, the WorldEdit config is plugins/WorldEdit/config.cfg
favicon.png
This is the icon that will appear in the Minecraft server list. You may replace it with your own.
items.ini
Edit item IDs. You probably shouldn't edit this file unless you know what you're doing.

2 - Permissions

Permissions allow different players to access different commands and features. Each plugin has its own permissions. Setting up player permissions is most easily done via the web admin. You can also use the rank <playername> command from the server console. Note that there is no leading slash. The console command is not /rank. To see the command and permissions list for the default commands, which are provided by the Core plugin, see the Core Plugin readme.

3 - WebAdmin

The WebAdmin allows you to control various aspects of Cuberite, including player permissions. A typical webadmin.ini configuration looks like this:

[User:john]
Password=cuberiteRocks

[WebAdmin]
Ports=8080
Enabled=1

In the example above, you can login to the web admin using the username john and the password cuberiteRocks by pointing your browser to http://<Server IP address>:8080. If you're running your server locally, point your browser to http://localhost:8080

4 - Worlds

By default, there are three worlds: world, world_nether, world_end. Each world can be tweaked by editing <World Name>/world.ini. You can use this file to edit things like the spawn point location, the game mode, and the diffculty level. See Configuring world.ini for details.

5 - Plugins

Plugins are an important method of customisation for Cuberite. There are many different first and third-party plugins available.

Cubrite plugins are written in Lua, and interact with the server through an extensive API. They are designed to be easy to write for anyone with basic programming experience, so if existing plugins don't fill your need you can easily write your own plugins. If you want to learn how to write your own plugins, check out the guide.

Cuberite has a plugin repository where you can upload your plugins publicly and download plugins others have released.

Activating a plugin

After downloading a plugin, you need to put it in the plugins/ directory. You should then edit the [Plugins] sections of the settings.ini file and add a plugin entry there. Below is an example of adding a plugin called MyNewPlugin.

[Plugins]
Plugin=Core
Plugin=TransApi
Plugin=MyNewPlugin
;Plugin=MyDisabledPlugin

Writing a plugin

To get started with writing Cuberite plugins, read this article. Cuberite Plugins are written with the Lua programming language. Cuberite has a well-documented API.

You're good to go!

If you have read this far, you should now have enough knowledge to operate a Cuberite server. The rest of this book covers more features and further configuration options in greater depth.

3 - Configuring world.ini

1 - What is world.ini

It is possible to configure many different aspects of individual worlds with Cuberite. Configuration options include:

  • Changing the spawn point of a world.
  • Changing the game mode of a world.
  • Changing the world generator, so as to change the terrain generated.
  • Changing the types of plants that generate in the world.
  • Changing which types of animals are allowed to spawn.
  • There are many more things that can be done, and these are just examples.

All this configuration can be done through one file. It is called world.ini and can be found in each world's individual folder. When a world is first created by Cuberite, the file is filled out with default values that are fairly close to vanilla minecraft.

The world.ini file is split into many different sections, each with a name surrounded in square brackets. For example [SpawnPosition] is a section. Each section contains configuration options related to a specific feature of Cuberite.

Default Settings

[SpawnProtect]
ProtectRadius=10

[WorldLimit]
LimitRadius=0

[Difficulty]
WorldDifficulty=1

[General]
Dimension=Overworld
IsDaylightCycleEnabled=1
Gamemode=1
Weather=0
TimeInTicks=188

[Broadcasting]
BroadcastDeathMessages=1
BroadcastAchievementMessages=1

[SpawnPosition]
MaxViewDistance=12
X=0.500000
Y=66.000000
Z=8.500000
PregenerateDistance=9

[Storage]
Schema=Default
CompressionFactor=6

[Plants]
MaxCactusHeight=3
MaxSugarcaneHeight=3
IsCactusBonemealable=0
IsCarrotsBonemealable=1
IsCropsBonemealable=1
IsGrassBonemealable=1
IsMelonStemBonemealable=1
IsMelonBonemealable=0
IsPotatoesBonemealable=1
IsPumpkinStemBonemealable=1
IsPumpkinBonemealable=0
IsSaplingBonemealable=1
IsSugarcaneBonemealable=0

[Physics]
DeepSnow=1
ShouldLavaSpawnFire=1
TNTShrapnelLevel=2
WaterSimulator=Vanilla
LavaSimulator=Vanilla
SandInstantFall=0
RedstoneSimulator=Incremental

[Mechanics]
CommandBlocksEnabled=0
PVPEnabled=1
UseChatPrefixes=1
MinNetherPortalWidth=2
MaxNetherPortalWidth=21
MinNetherPortalHeight=3
MaxNetherPortalHeight=21

[Monsters]
VillagersShouldHarvestCrops=1
AnimalsOn=1
Types=bat, cavespider, chicken, cow, creeper, enderman, guardian, horse, mooshroom, ocelot, pig, rabbit, sheep, silverfish, skeleton, slime, spider, squid, wolf, zombie

[Weather]
MaxSunnyTicks=180000
MinSunnyTicks=12000
MaxRainTicks=24000
MinRainTicks=12000
MaxThunderStormTicks=15600
MinThunderStormTicks=3600

[LinkedWorlds]
NetherWorldName=world_nether
EndWorldName=world_end

[Generator]
Generator=Composable
BiomeGen=Grown
ShapeGen=BiomalNoise3D
CompositionGen=Biomal
Finishers=RoughRavines, WormNestCaves, WaterLakes, WaterSprings, LavaLakes, LavaSprings, OreNests, Mineshafts, Trees, Villages, TallGrass, SprinkleFoliage, Ice, Snow, Lilypads, BottomLava, DeadBushes, NaturalPatches, PreSimulator, Animals
BiomeGenCacheSize=16
BiomeGenMultiCacheLength=128
SeaLevel=62
BiomalNoise3DFrequencyX=40.000000
BiomalNoise3DFrequencyY=40.000000
BiomalNoise3DFrequencyZ=40.000000
BiomalNoise3DBaseFrequencyX=40.000000
BiomalNoise3DBaseFrequencyZ=40.000000
BiomalNoise3DChoiceFrequencyX=40.000000
BiomalNoise3DChoiceFrequencyY=80.000000
BiomalNoise3DChoiceFrequencyZ=40.000000
BiomalNoise3DAirThreshold=0.000000
BiomalNoise3DNumChoiceOctaves=4
BiomalNoise3DNumDensityOctaves=6
BiomalNoise3DNumBaseOctaves=6
BiomalNoise3DBaseAmplitude=1.000000
CompositionGenCacheSize=64
RoughRavinesGridSize=256
RoughRavinesMaxOffset=128
RoughRavinesMaxSize=128
RoughRavinesMinSize=64
RoughRavinesMaxCenterWidth=8.000000
RoughRavinesMinCenterWidth=2.000000
RoughRavinesMaxRoughness=0.200000
RoughRavinesMinRoughness=0.050000
RoughRavinesMaxFloorHeightEdge=8.000000
RoughRavinesMinFloorHeightEdge=30.000000
RoughRavinesMaxFloorHeightCenter=20.000000
RoughRavinesMinFloorHeightCenter=6.000000
RoughRavinesMaxCeilingHeightEdge=56.000000
RoughRavinesMinCeilingHeightEdge=38.000000
RoughRavinesMaxCeilingHeightCenter=58.000000
RoughRavinesMinCeilingHeightCenter=36.000000
WormNestCavesSize=64
WormNestCavesGrid=96
WormNestMaxOffset=32
WaterLakesProbability=25
LavaLakesProbability=10
MineShaftsGridSize=512
MineShaftsMaxOffset=256
MineShaftsMaxSystemSize=160
MineShaftsChanceCorridor=600
MineShaftsChanceCrossing=200
MineShaftsChanceStaircase=200
VillageGridSize=384
VillageMaxOffset=128
VillageMaxDepth=2
VillageMaxSize=128
VillageMinDensity=50
VillageMaxDensity=80
VillagePrefabs=PlainsVillage, SandVillage
BottomLavaLevel=10
PreSimulatorFallingBlocks=1
PreSimulatorWater=1
PreSimulatorLava=1

[WaterSimulator]
Falloff=1
TickDelay=5
NumNeighborsForSource=2

[LavaSimulator]
Falloff=2
TickDelay=30
NumNeighborsForSource=-1

[FireSimulator]
BurnStepTimeFuel=500
BurnStepTimeNonfuel=100
Flammability=50
ReplaceFuelChance=50000

[Seed]
Seed=586392587

[WaterSprings]
HeightDistribution=0, 0; 10, 10; 11, 75; 16, 83; 20, 83; 24, 78; 32, 62; 40, 40; 44, 15; 48, 7; 56, 2; 64, 1; 255, 0
Chance=24

[LavaSprings]
HeightDistribution=0, 0; 10, 5; 11, 45; 48, 2; 64, 1; 255, 0
Chance=9

[Animals]
AnimalSpawnChunkPercentage=10

2 - SpawnPosition

Specifies the spawn point for new players. The coordinates are absolute, in blocks, and may be fractional. If any of the values are missing, Cuberite provides a default.

Available Options

Variable Meaning Default
X X coordinate of the spawn point 32
Y Y coordinate of the spawn point The height of the terrain at the point (X, Z)
Z Z coordinate of the spawn point 32

Default Configuration

[SpawnPosition]
MaxViewDistance=12
X=32.000000
Y=62.600000
Z=32.000000
PregenerateDistance=20

3 - GameMode

This section specifies if the world is a Survival, Creative, Adventure or Spectator mode world. An administrative in-game command may override this setting temporarily.

Available Options

Variable Meaning Default
GameMode 0 means Survival mode, 1 means Creative mode, 2 means Adventure mode, 3 means Spectator mode 1

Default Configuration

[GameMode]
GameMode=1

4 - Storage

This section specifies if Cuberite should save world chunks or not, as well as the compression level for world files.

Available Options

Variable Meaning Default
Schema Specifies if world chunks should be saved or not. May be one of "Default", "Anvil" and "Forgetful". See table below for their description. Default
CompressionFactor How much the world files should be compressed. Lower values mean much larger file sizes, but slighly increased performance, and higher values mean slightly smaller file sizes and much lower performance. It is recommended just to keep with the default. 6

Schema Options

Schema File Type Description
Default .mca This is just an alias for Anvil at the moment.
Anvil .mca Saves chunks. Storage is compatible with other Minecraft-related tools and programs. MCA files are stored in the "region" subfolder of the world folder, and a "level.dat" file is generated inside the world folder.
Forgetful N/A Doesn't save chunks. Changes to the world are lost as soon as the chunks are unloaded, making this useful for read-only public servers. Please note that Cuberite will still load chunks using other schemas.

Default Configuration

[Storage]
Schema=Default
CompressionFactor=6

4 - MultiWorlds

1 - Multiworlds Overview

Cuberite supports multiple worlds. Each world has its own world.ini file. Additional Worlds can be added by editing settings.ini. This is explained in the example below.

Adding Worlds

[Worlds]
DefaultWorld=world
World=world_nether
World=world_end
World=myNewWorld
World=HappyLand

In the example above, 2 extra worlds are added to the server. Note that this automatically creates 2 additional configuration files, namely myNewWorld/world.ini and HappyLand/world.ini.

Dimensions (World types)

To create a nether type world, you should append the _nether suffix to your world name, e.g. World=myHellishWorld_nether. This creates a world.ini preconfigured as a nether. For end worlds, the same rules apply, append the _end suffix to your world name. Once a default world.ini is created, you are free to tweak it to your liking.

The _nether and _end suffixes are only used when no world.ini exists, and guide the server in choosing the contents of the default world.ini it's about to create. When a world.ini is present, the suffixes do not matter any more and the dimension is dictated by the Dimension option inside each world.ini.

The rest of this section deals with linking worlds and travelling between them.

2 - Traveling by Command

If you have the core.portal permission, you may use the following command to travel between worlds: /portal Worldname. To list all available worlds, use /worlds.

3 - Linking Worlds Without Plugins

You can easily link worlds without resorting to plugins by modifying world.ini files. However, this method is limited: Each world can only be linked to 2 different worlds.

By default, the overworld is linked to two worlds: The Nether and The End. Stepping through any Nether Portal leads to the Nether, and stepping through any End Portal leads to the End. The behavior of Nether and End portals can be tweaked, and you can make each portal type teleport to a world of your choice. This is done by editing the [LinkedWorlds] section of each world's world.ini file. Note that with this method, you can't make two different portals of the same type teleport you to two different worlds. If you want such behavior, you should use a plugin. See the next subsection.

4 - Linking Worlds with a Plugin

The most configurable way to link worlds together is using a dedicated plugin, such as Portal V2. More plugins can be found at the respository.

5 - Bungeecord

Cuberite has experimental Bungeecord support.