| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
+ Synchronously save chunks on server shutdown. Fixes #4884
|
|
|
|
|
| |
* Clean up cRoot & main
* Move some OS-specifics into OSSupport
|
| |
|
|
|
| |
* cWorld * -> cWorld
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
| |
The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change)
The BlockInfo.h file was removed from Globals.h (main change)
The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics)
The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor)
Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header.
That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified.
eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Start now does nothing more than launch the world's threads.
|
| |
|
| |
|
|
|
|
| |
This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Fixes #2563.
|
|
|
|
| |
It contains client code as well.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Restarts are now an actual, close-as-possible to application
exit+reopen.
|
| |
|
| |
|
|
|
|
| |
Fixes #2228.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Ref.: #1845
|
|
|
|
|
|
|
|
|
| |
Added "/service" switch, to prompt the binary to attempt starting as a service.
Added service* methods, to control service startup.
Split up main() into universalMain(), which contains the startup code for both service and normal start.
Added cRoot::m_RunningAsService bool,
Added cRoot::SetStopping(bool) to allow a stop request to be sent by the service controller.
Added cBlockIDMap::init() to avoid loading items.ini before the working directory has been set.
|
| |
|
|\
| |
| | |
Prevent multiple logins with same username, unless allowed in settings
|
| |
| |
| |
| |
| |
| | |
Added in indent to cPlayerListCallBack in cCallback class inside CheckMultiLogin().
Added doxy-comment for DoWithPlayer().
Changed comments on IsPlayerInQueue() and IsAllowMultiLogin() to doxy-comments.
|
| | |
|
| | |
|
|\| |
|
| | |
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
src/Noise/Noise.h
src/World.h
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\| |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
Also fixed the bindings, now all functions are static-like.
|
|\ |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/Chunk.cpp
src/Entities/Player.cpp
src/Root.cpp
src/World.cpp
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Fixes end portals' solidity
* Fixed crashes to do with multithreading and removing an entity from
the wrong world
* Fixed crashes due to bad merge
* Fixed crashes due to an object being deleted twice
* Simplified cWorld::Start() and added comments to configuration files
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/Blocks/WorldInterface.h
src/ClientHandle.cpp
src/ClientHandle.h
src/Entities/Player.cpp
src/Entities/Player.h
src/Generating/FinishGen.cpp
src/Protocol/Protocol.h
src/Protocol/Protocol125.cpp
src/Protocol/Protocol125.h
src/Protocol/Protocol16x.cpp
src/Protocol/Protocol16x.h
src/Protocol/Protocol17x.cpp
src/Protocol/Protocol17x.h
src/Protocol/ProtocolRecognizer.cpp
src/Protocol/ProtocolRecognizer.h
src/Root.h
src/World.cpp
|
| | | | |
|
| | | | |
|
| |_|/
|/| |
| | |
| | | |
The cache is persisted into a SQLite DB file on server shutdown.
|
| | | |
|
| |/
|/| |
|
| |
| |
| |
| | |
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
|
| | |
|
|/ |
|
|
|
|
| |
Code by Howaner. Fixes/Changes by me.
|
| |
|
|
|
|
|
| |
This allows plugins to send composite chat messages, containing URLs, commands to run and cmdline suggestions.
Fixes #678.
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/Root.cpp
src/Root.h
src/World.cpp
|
| |
| |
| |
| |
| |
| | |
Adds a function in cRoot that allows you to reload all the groups permissions.
Note: Players don't automatically load their new permissions.
You can use cPlayer::LoadPermissionsFromDisk for that.
|
| |
| |
| |
| |
| |
| |
| | |
* Moved string manipulation into cClientHandle and therefore...
+ Added configuration option for prefixes.
* Cleaned up code.
* Updated documentation for API.
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
Conflicts:
GNUmakefile
|
|
|