36eab1b323
* Introduce recipe book functionality The recipe book helps especially new players. Missing it gives the impression that cuberite is not as advanced as it is. The handling of the recipe book uses the following functions: - Unlock Recipes (https://wiki.vg/index.php?title=Protocol&oldid=14204#Unlock_Recipes) to make recipes available and show the notification for new recipes. Initialization is done on player login for known ones, the update is done when new items are discovered. - Craft Recipe Request (https://wiki.vg/index.php?title=Protocol&oldid=14204#Craft_Recipe_Request) when the user selects a recipe from the recipe book to fill the slots. Known recipes are initialized on player login via `Unlock Recipes` with `Action` 0. As soon as a new recipe is discovered this is added via `Unlock Recipes` with `Action` 1. To be able to know and recognize new recipes the player class is extended with `KnownItems` and `KnownRecipes`. As soon as a player touches an item this is compared to the list of `KnownItems`, if the item is unknown the recipes are checked for this item and the other ingredients are checked with the list of `KnownItems`. If a full match is discovered the recipe is unlocked with the client and stored in the `KnownRecipes`. To unlock recipes the recipe ID is sent to the client. A mapping file (for protocol 1.12.2) translated the minecraft recipe names to ids. The crafting.txt is extended with and minecraft recipe names is possible. Limitations: Only a single recipe is added to the crafting area. Multiple clicks or shift click does not increase the number of builds. Co-authored-by: peterbell10 <peterbell10@live.co.uk> * Address first issues mentioned by @peterbell10 - Some linting - Extract loading of recipe specific protocol mapping into a function - Build `RecipeNameMap` only once - Use `std::optional` - Extract `LoadRecipe` from `Window` * Start to implement new suggestions * Update with suggestions from @peterbell10 * Some minor cleanup * Update protocol packet IDs * Remove unused include * Include header in cmake * Change a vector to integer counter * Change dromedaryCase method names to PascalCase * Address suggestions from @madmaxoft * Read Protocol subdirectories to load recipe books To load all recipebooks iterate over the `Protocol` subdirectories to find mapping files. Co-authored-by: peterbell10 <peterbell10@live.co.uk> |
||
---|---|---|
.circleci | ||
.github | ||
android | ||
CMake | ||
dev-docs | ||
lib | ||
Server | ||
src | ||
tests | ||
Tools | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
app.yml | ||
appveyor.yml | ||
BACKERS | ||
CheckLua.cmake | ||
clang-tidy.sh | ||
cloc-exclude.txt | ||
CMakeLists.txt | ||
compile.sh | ||
COMPILING.md | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
Doxyfile | ||
easyinstall.sh | ||
GETTING-STARTED.md | ||
jenkinsbuild.sh | ||
LICENSE | ||
README.md | ||
SetFlags.cmake | ||
stats.cmd | ||
TESTING.md | ||
travisbuild.sh |
Cuberite
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.
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 Us on Liberapay or Bountysource