summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_12.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* zlib -> libdeflate (#5085)Tiger Wang2021-01-111-2/+2
| | | | | | + Use libdeflate + Use std::byte * Fix passing temporary to string_view + Emulate make_unique_for_overwrite
* Adding new monster types to enum and saving/loading for easier future implementation (#4941)12xx122020-11-231-6/+56
| | | | | | | | | | | * added new monster types to enum added string <-> enum conversion in namespace serializer added loading functions added to saving * renamed zombie pigman to zombified piglins in enum Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Ender Crytal Fix and report proper cmake file for luabindingscheck fail (#5017)12xx122020-11-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fixed network fixed explosion fixed ticking added network broadcast to Setter method added nullptr protection using macros in 1.10 Protocol_1_10.cpp revealed functions to LUA API small fixups, typos, less functions used fixed more doc readded info that saving is done only if the beam is displayed made the constructor transfer all needed members fixed wrong commit removed default parameters on SpawnEnderCrystal fixed wrong metadata moved call to destroy in the right place fixed some typos Fixed Ender Crystal * fixed documentation * fixed doc and added proper error message * Parameters, arrows * Parameters Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Add beam target, configurable base visibility to Ender Crystals (#5010)12xx122020-10-291-0/+17
| | | | | * Fixes #4990 Co-authored-by: 12xx12 <12xx12100@gmail.com>
* Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)peterbell102020-10-051-34/+0
| | | | | | | | | | | | | | | * Fix cmake not adding Werror on clang, and _lots_ of warnings * WIP: Build fixes * Cannot make intermediate blockhandler instance * Tiger's changes * Fix BitIndex check * Handle invalid NextState values in cMultiVersionProtocol Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Add State enum to protocolTiger Wang2020-09-181-16/+10
|
* Made cProtocol::Version, EntityMetadata enums less verboseTiger Wang2020-08-211-3/+3
|
* Revert "Hotpatch optional for macOSX builds on buildserver"Alexander Harkness2020-08-061-4/+4
| | | | This reverts commit 5e3f51f5ff39ac7219f1f0fcbc27340949f95ade.
* Hotpatch optional for macOSX builds on buildserverAlexander Harkness2020-08-051-4/+4
|
* 1.14 connection supportTiger Wang2020-07-261-0/+2
|
* Remove some unused inclusionsTiger Wang2020-07-201-1/+0
|
* Inherit constructors, remove duplicationTiger Wang2020-07-191-25/+4
|
* Delete duplicated status request handlersTiger Wang2020-07-181-124/+30
| | | | Here we go again...
* cProtocolRecognizer goes on a diet (#4770)Tiger Wang2020-07-171-3/+3
| | | - Removed inheritance from cProtocol
* Introduce recipe book functionality (#4493)Tobias Wilken2020-07-141-2/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Update submodules (#4727)peterbell102020-05-091-6/+4
| | | | | | | | | | | | | Closes #4708 This updates jsoncpp, mbedtls, TCLAP and SQLiteCpp to their latest stable release. A few additional changes were needed: * jsoncpp deprecated Reader, FastWriter and StyledWriter which I've replaced with some helper functions in JsonUtils.cpp * SQLiteCpp changed how it builds with external sqlite libraries, now expecting them to be installed. The simplest path was to remove sqlite from cuberite's submodule and just use SQLiteCpp's internal version.
* Fix one definition rule violationsTiger Wang2020-05-041-4/+4
|
* Add Zombie VillagersBond-0092020-04-101-3/+17
|
* Initial resource pack support (#4622)Mat2020-04-071-2/+4
|
* Implement wither skeletons (#4563)Mat2020-04-041-11/+2
|
* Use LastSentPos for mob spawn packet in 1.11+ (#4490)Mat2020-03-051-100/+0
|
* Protocol: Use logical outgoing packet types.Mattes D2019-09-101-11/+93
|
* Fix building with clang 8.0 (#4346)Bond-0092019-08-111-4/+6
|
* Prefer static_cast to reinterpret_cast (#4223)peterbell102018-05-021-32/+32
| | | | | | | * Change reinterpret_cast -> static_cast wherever possible * Remove more unnecessary `const_cast`s. reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
* Rewrite cClientHandle::HandleRightClick (#4089)9caihezi2018-01-081-1/+1
| | | | | | | | | | | | | * Add hand parameter to distinguish main hand/off hand. * Add a new function cClientHandle::HandleUseItem to separate the functionality of using an item without a target block. This matches the protocol with client version >= 1.9 * Always actively update the status of a block if the placement fails (by out of reach or rejected by plugin). * Do not call plugin callback CallHookPlayerRightClick(-1, 255, -1, -1, 0, 0, 0) when using item. The CallHookPlayerUsingItem will still be called. Now at most one of CallHookPlayerRightClick, CallHookPlayerUsingBlock, CallHookPlayerUsingItem and CallHookPlayerEating will be called based on the type of action (not including the used version of callbacks). * Do not count using item as BlockInteractionsRate check (Using item takes time). * Now we can open chests(etc.) when sneaking as long as the player's hand is empty. This is what vanilla server does.
* Add support for release 1.12.2 (#4041)peterbell102017-09-211-0/+76
|
* Fix switch warnings (#4013)peterbell102017-09-141-33/+65
| | | | | | | | | | | | | | | * Fix switch warnings * Fix a variety of -Wswitch and -Wswitch-enum warnings * Remove unneeded -Wno-error flags * Reorganise some eMonsterType switches * Alpha sort eMonsterType cases in WriteMobMetadata and in cNBTChunkSerializer::AddMonsterEntity * List all mob types in protocol 1.12 and NBTChunkSerializer * cStructGenTrees::GetNumTrees: remove switch default * cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type
* GetPacketID for protocol packet IDs (#3977)Lane Kolbly2017-09-021-1107/+4
| | | | | | | | | | | | | | | | | | | | | | | | * Added GetPacketId method to protocol, implemented for all protocols. * Moved GetPacketID methods into a single file, alpha-sorted. * Fixed 1.12.1 HandlePacket switch statement. * Added SendLogin to the GetPacketId framework. * Added SpawnObject to GetPacketId framework. * Added missing sendEntityEquipment packet ID update for 1.12.1 * Added LeashEntity packet ID change to 1.12.1 * Alphabetized packet enum, added SpawnGlobalEntity to GetPacketId framework * Fixed clang errors * Indented cases, expanded comment for GetPacketId * Changed dyslexic comment.
* Implement Forge protocol handshake support (#3869)satoshinm2017-08-271-0/+2
|
* Leashes work in 1.12.1mathiascode2017-08-261-24/+48
|
* Fully implemented leashes (#3798)Pablo Beltrán2017-08-211-0/+24
|
* Add support for 1.12.1 (#3908)Bond-0092017-08-171-3/+756
|
* Tentative fix for player-limit race condition (#3862)Tiger Wang2017-07-281-3/+3
| | | | | | | | | | * Attempts to fix #2257 Derived from d233e9843148313c71fbaba96ccff660e47b07b1 * Changed player count type to int * Clarified certain actions
* Added basic ocelot behavior (#3829)Bond-0092017-07-121-0/+18
|
* Send player message when clicking on advancements or green book. (#3845)Lukas Pioch2017-07-121-2/+22
|
* Added bed entity (#3823)Lukas Pioch2017-07-071-0/+27
| | | | | | | | | | * Added bed entity * Export cBedEntity to lua * Set color of bed through item damage value * Added bed entity to APIDoc * NBT: Added loading and saving * Crafting recipes for the colored beds
* Added missing 1.12 packet changesmathiascode2017-06-141-0/+28
|
* Added support for protocol 1.12 (#3757)Lukas Pioch2017-06-141-0/+1509