summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_8.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Protocol: Use correct calculation for delta movements (#5455)Tiger Wang2022-11-081-5/+0
| | | * Protocol: Use correct calculation for delta movements
* Implement relative SendPlayerMoveLook. Use it in TurnToDirt (#5413)DarkoGNU2022-04-261-0/+1
| | | | | | | | | | | | | | | | | * Implement relative SendPlayerMoveLook * Use relative teleport in cBlockFarmlandHandler::TurnToDirt * Static cast to UInt8. Explicit float values * Maybe explicit doubles, too * Fix TurnToDirt for some edge cases * Improve the height check in TurnToDirt * Const is good, right? * Const - the continuation
* Improving 1.14 support (#5388)Simon Pribylski2022-04-201-7/+7
| | | | | | | | | | | | | | | | | | | | | * Fixing login * Add basic 1.14 support * Adding pktHorseWindowOpen to PacketTypeToStr * Fixing build with clang * Fixing inventories * Add entities metadata * Add particles * Fixing style * Fixing build with clang-tidy * fixing build
* Updated protocol functions to Vector3xx12xx12x2022-04-201-9/+9
| | | | also added support in included functions
* Add player permission level (#5358)Simon Pribylski2022-01-241-0/+1
|
* Protocol: modernise plugin message handling (#5325)Tiger Wang2021-11-231-2/+2
| | | | | - Remove handling for garbage data in command block sets + Add correct boolean value read (#1692) * Make better use of namespaced-id and string_view
* Symmetry in MultiVersionProtocol to fix a crash (#5261)Tiger Wang2021-07-101-1/+1
| | | | | + Add HandleOutgoingData, which tests for m_Protocol before calling DataPrepared. * Change std::function to bool + if/else to handle incoming data; it's almost certainly faster. * Fixes #5260
* Protocol: call the encryptor once before sending dataTiger Wang2021-07-061-6/+2
|
* Rename files to match codeTiger Wang2021-05-041-1/+1
|
* Add player statistics to API (#5193)nshah252021-05-031-2/+2
| | | | | | * Fixed issue #5166 Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* More cProtocol cleanupTiger Wang2021-04-121-37/+37
| | | | | | * Alpha sort functions * Simplify hand handling * Fix left handed mode client-side display
* Unify multiprotocol entity animationsTiger Wang2021-04-121-9/+14
|
* Streamline player abilities handlingTiger Wang2021-04-121-1/+0
| | | | | | | * Update player list gamemode on world change * Fix invisibility for spectators, use entity metadata * Populate m_World for cPlayers on load - Remove SendPlayerMaxSpeed, a duplicate of SendEntityProperties
* Fix sending incorrect date values on world changeTiger Wang2021-04-121-1/+1
| | | | Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge.
* Change TimeOfDay to WorldDate (#5160)Tiger Wang2021-03-201-1/+1
| | | | | | | * Change TimeOfDay to WorldDate * Do not wrap at 20 minutes, continue incrementing * Fixes #4737 * Fixes #5159
* Don't send ping updates one packet at a timeTiger Wang2021-03-191-1/+1
| | | | | * Use the batch update feature of the packet. * Lengthen interval between time and ping update packets (ref. http://github.com/cuberite/cuberite/issues/4082#issuecomment-348675321).
* Deduplicate WriteBlockEntityTiger Wang2021-03-181-3/+3
|
* Do protocol decryption in-place (with CryptoAPI on Windows) (#5145)Tiger Wang2021-03-081-5/+6
|
* Adding Boss bar (#5025)12xx122021-03-051-1/+7
| | | | | + Add boss bar Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Adds playerlist header and footer broadcasting (1.8-1.13)dImrich2021-02-061-0/+1
|
* zlib -> libdeflate (#5085)Tiger Wang2021-01-111-7/+15
| | | | | | + Use libdeflate + Use std::byte * Fix passing temporary to string_view + Emulate make_unique_for_overwrite
* Remove SetProperty(...cPlayer)Tiger Wang2020-10-031-1/+1
| | | | Enchantment table, anvil windows are already opened one per-player.
* Remove unused ServerPort argumentTiger Wang2020-09-181-1/+1
|
* Add State enum to protocolTiger Wang2020-09-181-17/+16
|
* Remove unused ServerPort memberTiger Wang2020-09-181-2/+0
|
* Cleanup Protocol classesTiger Wang2020-09-181-18/+18
| | | | * Visibility, static, ordering changes
* Use tracing for explosions (#4845)Tiger Wang2020-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * TNT: Implement tracing algorithm + Add intensity tracing * Fix iterating over all players to SendExplosion, even those not in range * Implemented TNT entity interaction * Fixed misaligned destruction tracing * Finalise TNT algorithm - Remove BlockArea and just use chunks Using SetBlock makes it so that we can update everything properly, and does appear to be faster. * BlockInfo learns about explosion attentuation * Rename Explodinator parameters * TNT: pull block destruction into common function Co-authored-by: Alexander Harkness <me@bearbin.net>
* Unused/duplicate function cleanupTiger Wang2020-08-291-1/+1
| | | | | * FaceIntToBlockFace in 1.8/1.9 protocol merged - Removed undefined permissions stuff in Player header
* Add Statistics and Achievements for newer Network standards12xx122020-08-191-1/+7
|
* 1.14 connection supportTiger Wang2020-07-261-1/+1
|
* Remove some unused inclusionsTiger Wang2020-07-201-1/+0
|
* Implement "caching" in ChunkDataSerializerTiger Wang2020-07-191-1/+1
| | | | + When sending a chunk to multiple clients, group them by protocol version and send the same data
* Use cMultiVersionProtocol's bufferTiger Wang2020-07-181-5/+2
|
* Delete duplicated status request handlersTiger Wang2020-07-181-0/+3
| | | | Here we go again...
* Introduce recipe book functionality (#4493)Tobias Wilken2020-07-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Improve entity position updates (#4701)Tiger Wang2020-05-041-8/+11
| | | | | | | | | * Make puking pickups fly nicer * Improve entity position updates * Move determination of whether a delta is too big for a packet into the protocol handlers + Less jittery movement + Generalise CollectEntity to take any entity
* Unify entity spawn packet sendingTiger Wang2020-05-011-8/+11
|
* Unify 1.8 and 1.9Tiger Wang2020-04-221-43/+41
| | | | - Deleted ridiculous amount of duplicated code
* Delet SpawnObject paramsTiger Wang2020-04-201-1/+1
| | | | | | * Fix #4679 awkward...
* Using Super.Mattes D2020-04-161-2/+2
|
* Initial resource pack support (#4622)Mat2020-04-071-0/+2
|
* Add protocol mob ID remapping (#4538)Mat2020-03-291-0/+4
|
* Protocol: Use logical outgoing packet types.Mattes D2019-09-101-5/+1
|
* Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell102018-08-291-15/+2
| | | | | | | Closes #4236 CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/". #include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
* Store and pass entity effect duration as an int not a short. (#4293)Alexander Harkness2018-08-261-4/+1
| | | Fixes #4292.
* recover hotbar selected slot after reconnect (#4249)changyong guo2018-07-231-0/+1
| | | | | | | 1. implement protocol message SendHeldItemChange 2. add save / load inventory equipped item slot in JSON 3. send held item slot message after player connect to server Fixes #4189
* Added assert to cProtocolRecognizer::GetPacketId. (#4001)Lane Kolbly2017-09-041-3/+7
|
* GetPacketID for protocol packet IDs (#3977)Lane Kolbly2017-09-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Update mbedtls to 2.5.1 (#3964)peterbell102017-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | * Renaming changes: * macro prefix "POLARSSL" -> "MBEDTLS" * functions now prefixed with "mbedtls_" * rename PolarSSL++ -> mbedTLS++ * rename polarssl submodule * Use mbedtls' AES-CFB8 implementation. * Add cSslConfig to wrap mbedtls_ssl_config * Update cTCPLink and cBlockingSslClientSocket to use cSslConfig * Use cSslConfig in cHTTPServer * Use cSslConfig for cMojangAPI::SecureRequest * CI Fixes * Set -fomit-frame-pointer on the right target
* Fully implemented leashes (#3798)Pablo Beltrán2017-08-211-0/+2
|
* Removed unused forward declarations (#3888)Lukas Pioch2017-08-031-10/+0
|
* Initial support for the 1.11 protocol.Mattes D2016-12-161-0/+267