A lightweight, fast and extensible game server for Minecraft
Go to file
Ash d82a6afd9e
Overhaul endian handling in ByteBuffer and FastNBT (#5543)
* Overhaul endian handling in ByteBuffer and FastNBT

Rather than juggling "swapped" and "unswapped" versions of integers, different library functions, #defines, etc., simply always read everything byte-by-byte.

This works regardless of host CPU endian, got optimised down to either a normal load or a byteswap on every compiler I tested - only 1 instruction on most CPU architectures.

This commit introduces a "Bytes" array type to keep endian-sensitive data seperate from host data, alongside the needed C++ template machinery for it to work seamlessly. This approach is a little bit safer as well since you get length- and type-checking for most callsites.

* Remove remaining references to old-style endianness conversion, remove functions themselves.

---------

Co-authored-by: Alexander Harkness <me@bearbin.net>
2024-11-03 16:33:40 +01:00
.github Update issue templates (#4960) 2020-10-01 23:20:10 +00:00
android Fix Android builds (#4998) 2020-10-15 09:35:44 +00:00
CMake Rename files to match code 2021-05-04 16:11:56 +01:00
dev-docs Update Minecraft Wiki links to new domain (#5532) 2023-09-27 20:07:42 +02:00
lib Reverted moving Lua to C++. 2024-03-15 00:24:05 +01:00
Server Fixed dumpinfo plugin not finding Info.lua file if the plugin folder and name don't match (#5563) 2024-05-27 10:42:07 +02:00
src Overhaul endian handling in ByteBuffer and FastNBT (#5543) 2024-11-03 16:33:40 +01:00
tests Update Cuberite Root CA Cert - ISRG X1 Root now used. 2024-11-01 23:23:52 +00:00
Tools Overhaul endian handling in ByteBuffer and FastNBT (#5543) 2024-11-03 16:33:40 +01:00
.clang-format Enable some more clang-tidy linter checks (#4738) 2020-05-14 22:15:35 +00:00
.clang-tidy Enable some more clang-tidy linter checks (#4738) 2020-05-14 22:15:35 +00:00
.editorconfig
.gitattributes
.gitignore adding endermite (#5460) 2023-09-26 21:54:37 +00:00
.gitmodules Update the minimodules 2021-04-12 14:09:18 +01:00
app.yml
appveyor.yml Fix AppVeyor IA32 builds (#5096) 2020-12-31 19:43:02 +00:00
BACKERS Remove BountySource from funding sources 2020-08-10 20:16:02 +01:00
CheckLua.cmake
cibuild.sh cibuild.sh: enable verbose ccache output 2024-05-13 00:14:53 +03:00
clang-tidy.sh Update clang-tidy.sh (#5477) 2023-06-05 20:37:47 +00:00
cloc-exclude.txt
CMakeLists.txt Updated LTO Check to new standard. (#5476) 2023-05-19 16:52:35 +02:00
compile.sh Fixed windows hack in Compile.sh (#4834) 2020-08-26 10:42:51 +00:00
COMPILING.md Changed Windows instructions to build out-of-source. 2022-12-26 16:54:25 +01:00
CONTRIBUTING.md Rename files to match code 2021-05-04 16:11:56 +01:00
CONTRIBUTORS Overhaul endian handling in ByteBuffer and FastNBT (#5543) 2024-11-03 16:33:40 +01:00
Doxyfile
easyinstall.sh Add aarch64 to easyinstall. Fixes #5386 2022-01-22 01:08:51 +00:00
GETTING-STARTED.md Update Minecraft Wiki links to new domain (#5532) 2023-09-27 20:07:42 +02:00
Jenkinsfile Try a timeout for jobs. 2023-04-17 20:35:53 +00:00
LICENSE Changing Copyright Years (happy 11) 2022-04-14 22:53:03 +00:00
nightlybuild.sh Update build script names to be more intuitive. 2021-07-10 21:59:18 +01:00
README.md Added small embedded devices to README 2023-03-08 09:23:42 +01:00
SetFlags.cmake Enable build under newer clang versions. 2024-03-14 08:47:20 +01:00
stats.cmd
TESTING.md fix(docs): Correction of typos in project documentation (#5206) 2021-04-22 20:58:57 +00:00

Cuberite

Jenkins Build Status AppVeyor Build Status

Cuberite is a Minecraft-compatible multiplayer game server that is written in C++ and designed to be efficient with memory and CPU, as well as having a flexible Lua Plugin API. Cuberite is compatible with the Java Edition Minecraft client.

Cuberite runs on Windows, *nix and Android operating systems. This includes Android phones and tablets as well as Raspberry Pis; support for small embedded devices is experimental.

Currently we support Release 1.8 - 1.12.2 Minecraft protocol versions.

Subscribe to the newsletter for important updates and project news.

Installation

There are several ways to obtain Cuberite.

Binaries

  • The easiest method is downloading for Windows or Linux from the website.
  • You can use the EasyInstall script for Linux and macOS, which automatically downloads the correct binary. The script is described below.

The EasyInstall script

This script will download the correct binary from the project site.

curl -sSfL https://download.cuberite.org | sh

Compiling

  • You can compile automatically for Linux, macOS and FreeBSD with the compile.sh script. The script is described below.
  • You can also compile manually. See COMPILING.md.

Compiling may provide better performance (1.5-3x as fast) and it supports more operating systems.

The compile.sh script

This script downloads the source code and compiles it. The script is smart enough to notify you of missing dependencies and instructing you on how to install them. The script doesn't work for Windows.

Using curl:

sh -c "$(curl -sSfL -o - https://compile.cuberite.org)"

Or using wget:

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

Hosted services

  • Hosted Cuberite is available via Gamocosm.

Contributing

Cuberite is licensed under the Apache License V2, and we welcome anybody to fork and submit a Pull Request back with their changes, and if you want to join as a permanent member we can add you to the team.

Cuberite is developed in C++ and Lua. To contribute code, please check out GETTING-STARTED.md and CONTRIBUTING.md for more details.

Plugins are written in Lua. You can contribute by developing plugins and submitting them to the plugin repository or the forum. Please check out our plugin introduction guide for more info.

If you are not a programmer, you can help by testing Cuberite and reporting bugs. See TESTING.md for details.

You can also help with documentation by contributing to the User's Manual.

Other Stuff

For other stuff, check out the homepage, the Users' Manual, the forums, and the Plugin API.

Support the Cuberite development team on Liberapay