summaryrefslogtreecommitdiffstats
path: root/src/Root.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Synchronously save chunks on server shutdown (#4900)Alexander Harkness2020-09-211-0/+3
| | | + Synchronously save chunks on server shutdown. Fixes #4884
* Streamline startup sequenceTiger Wang2020-09-051-31/+24
| | | | | * Clean up cRoot & main * Move some OS-specifics into OSSupport
* Remove ProtocolPalettesTiger Wang2020-07-191-16/+0
|
* cWorld * -> cWorld (#4771)Tiger Wang2020-07-141-12/+6
| | | * cWorld * -> cWorld
* Introduce recipe book functionality (#4493)Tobias Wilken2020-07-141-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D2020-04-031-0/+1
| | | | | | | | | 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
* Added temporary block type mapping for 1.13+ protocols.Mattes D2020-01-071-0/+11
|
* Root: Load the UpgradeBlockTypePalette on startup.Mattes D2020-01-071-0/+7
|
* Register vanilla blocks in BlockTypeRegistry.Mattes D2019-08-051-0/+7
|
* Broadcast playerlist removal in every world (#4201)mathiascode2018-04-021-1/+4
|
* cWorld: Move Initialization from Start to the constructor.peterbell102017-10-211-1/+1
| | | | Start now does nothing more than launch the world's threads.
* Replace ItemCallbacks with lambdas (#3993)peterbell102017-09-111-7/+8
|
* Made world data paths adjustable, and added API to temporarily disable saving chunks to disk. (#3912)Lane Kolbly2017-09-071-0/+3
|
* Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot2017-09-021-9/+8
| | | | This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
* Replace ItemCallbacks with lambdas (#3948)peterbell102017-09-011-8/+9
|
* Add cUUID class (#3871)peterbell102017-08-251-2/+3
|
* Remove double includes part 2 (#3890)peterbell102017-08-031-2/+0
|
* Removed unused forward declarations (#3888)Lukas Pioch2017-08-031-1/+0
|
* Add support for alternate config file locations (#3578)Gareth Nelson2017-02-221-0/+2
|
* DeadlockDetect now lists some tracked CS's stats.Mattes D2017-01-181-2/+3
|
* Tab completion across worlds (#3270)Alexander Harkness2016-07-211-0/+4
| | | Fixes #2563.
* Renamed HTTPServer folder to HTTP.Mattes D2016-03-011-1/+1
| | | | It contains client code as well.
* remove cWorld::createAndInitializeWorldLogicParrot2016-02-081-11/+2
|
* Prevent server from starting if there's bad world linkageLogicParrot2016-02-051-0/+4
|
* Fix pre - #2815 default world linkage configsSafwat Halaby2015-12-251-1/+1
|
* Nether and End in settings.ini by default, and created at startupSafwat Halaby2015-12-251-1/+1
|
* Implemented brewingLukas Pioch2015-11-031-0/+3
|
* Fixed and improved restartingTiger Wang2015-08-201-5/+5
| | | | | Restarts are now an actual, close-as-possible to application exit+reopen.
* Unified the doxy-comment format.Mattes D2015-07-311-20/+20
|
* Work on NetherPortalScanner. Setup portal scanner to reset PortalCooldown. Changed where player is spawned. Added a_InitSpawn flag to CreateAndInitializeWorld.Lane Kolbly2015-06-131-1/+1
|
* SelfTests are registered and executed after logging framework init.Mattes D2015-06-111-1/+7
| | | | Fixes #2228.
* Fix for the way connecting clients receive player lists and broadcast chatb33duck2015-05-291-0/+6
|
* Added method to get the uptime of the server in seconds. Implements #1650.Lukas Pioch2015-05-261-32/+37
|
* Initial implementation of IniFile overloadingtycho2015-05-161-2/+3
|
* CheckBasicStyle: checks spaces around * and &.Mattes D2015-05-091-1/+1
|
* Fixed crash on exit introduced with Windows Service capability.Mattes D2015-04-051-4/+1
| | | | Ref.: #1845
* Working as a Windows service. Starts and stops correctly.Anthony Birkett2015-04-011-0/+4
| | | | | | | | | 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.
* Fixed crash on restartTiger Wang2014-12-211-2/+2
|
* Merge pull request #1623 from p-mcgowan/issue_1253Mattes D2014-12-101-1/+4
|\ | | | | Prevent multiple logins with same username, unless allowed in settings
| * Changed CheckMultiLogin() to not have main body wrapped in an if statement.Vincent2014-12-081-0/+1
| | | | | | | | | | | | Added in indent to cPlayerListCallBack in cCallback class inside CheckMultiLogin(). Added doxy-comment for DoWithPlayer(). Changed comments on IsPlayerInQueue() and IsAllowMultiLogin() to doxy-comments.
| * Fixed compile errorsVincent2014-12-081-1/+1
| |
| * Moved the check into a new function and just calls that function and a blank FindAndDoWithPlayer added.Vincent2014-12-081-1/+3
| |
* | Merged branch 'origin/master' into c++11.Mattes D2014-12-041-2/+4
|\|
| * cRoot: Fixed a memory leak with cRankManager.Mattes D2014-11-261-2/+4
| |
* | Merge remote-tracking branch 'origin/master' into c++11Tiger Wang2014-11-231-0/+3
|\| | | | | | | | | | | Conflicts: src/Noise/Noise.h src/World.h
| * Fixed trailing whitespace.Mattes D2014-11-121-1/+1
| |
| * renamed FindAndDoWithUUID to DoWithPlayerByUUID, fixed style and comments, added description to APIDumpLukas Pioch2014-11-051-2/+2
| |
| * Simplified FindAndDoWithUUID, formatted lineLukas Pioch2014-11-021-1/+1
| |
| * Added FindAndDoWithUUIDLukas Pioch2014-11-021-0/+3
| |
* | SuggestionsTiger Wang2014-10-241-0/+1
| |
* | Migrated random generators to std::randomTiger Wang2014-10-191-1/+1
| |
* | Merge branch 'master' of https://github.com/mc-server/MCServerTiger Wang2014-10-191-2/+2
|\|
| * Fixed failure for cRankManager to restartTiger Wang2014-10-181-2/+2
| |
* | Use std::threadTiger Wang2014-10-191-3/+3
|/
* cRoot: Removed useless variable from Lua API.madmaxoft2014-10-011-2/+3
|
* Unified cRoot broadcast chat documentation.madmaxoft2014-10-011-5/+5
|
* Dropped support for <1.7.xTiger Wang2014-09-271-6/+0
|
* Merge remote-tracking branch 'origin/master' into RanksMattes D2014-08-221-2/+0
|\
| * First Implementatation of new Loggin frameworkTycho2014-08-101-2/+0
| |
* | Removed cGroup and cGroupManager.Mattes D2014-08-211-6/+0
| |
* | Exported cRankManager to LuaAPI.madmaxoft2014-08-081-0/+3
|/
* cMojangAPI: Added UUID-to-Name lookup.madmaxoft2014-08-031-1/+1
| | | | Also fixed the bindings, now all functions are static-like.
* Merged branch 'master' into NameToUUID.madmaxoft2014-07-311-2/+11
|\
| * Merge remote-tracking branch 'origin/master' into portalsTiger Wang2014-07-221-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/Chunk.cpp src/Entities/Player.cpp src/Root.cpp src/World.cpp
| * | Bug and crash fixesTiger Wang2014-07-201-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | Merge branch 'master' into portalsTiger Wang2014-07-181-13/+22
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Portal improvements and suggestionsTiger Wang2014-06-101-1/+1
| | | |
* | | | Exported cMojangAPI to Lua.madmaxoft2014-07-301-1/+1
| | | |
* | | | Added a cMojangAPI class for PlayerName -> UUID lookups, with cache.madmaxoft2014-07-301-0/+3
| |_|/ |/| | | | | | | | The cache is persisted into a SQLite DB file on server shutdown.
* | | main.cpp: field style fixesarchshift2014-07-201-1/+1
| | |
* | | main.cpp: Fixed warnings with g_TERMINATE_EVENT_RAISED and g_SERVER_TERMINATEDarchshift2014-07-191-0/+2
| |/ |/|
* | Fixed basic whitespace problems.madmaxoft2014-07-171-12/+16
| | | | | | | | Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
* | Store properties as Json::ValueTiger Wang2014-07-161-1/+6
| |
* | Player properties are now retrievedTiger Wang2014-07-141-1/+1
|/
* Added Yggdrasil Authentication Systemdaniel09162014-04-131-2/+2
| | | | Code by Howaner. Fixes/Changes by me.
* Removed the unnecessary LoopPlayersAndBroadcastChat() functions.madmaxoft2014-02-151-11/+9
|
* Implemented cCompositeChat.madmaxoft2014-02-151-2/+4
| | | | | This allows plugins to send composite chat messages, containing URLs, commands to run and cmdline suggestions. Fixes #678.
* Merge remote-tracking branch 'origin/master' into playerimprovementsTiger Wang2014-02-091-0/+3
|\ | | | | | | | | | | | | Conflicts: src/Root.cpp src/Root.h src/World.cpp
| * Improvements:STRWarrior2014-02-051-0/+3
| | | | | | | | | | | | 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.
* | Improved chat messaging functionsTiger Wang2014-02-071-9/+10
| | | | | | | | | | | | | | * Moved string manipulation into cClientHandle and therefore... + Added configuration option for prefixes. * Cleaned up code. * Updated documentation for API.
* | Added more chat functionsTiger Wang2014-02-061-1/+3
| |
* | Added more SendMessageXXX() functionsTiger Wang2014-02-041-3/+11
|/
* Added a HOOK_WORLD_STARTED hook and a cRoot::CreateAndInitializeWorld function for plugins.STRWarrior2013-12-111-0/+1
|
* Merge remote-tracking branch 'origin/master' into foldermove2Alexander Harkness2013-11-241-1/+5
| | | | | Conflicts: GNUmakefile
* Moved source to srcAlexander Harkness2013-11-241-0/+186