summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_12.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-12-29Add skeleton bow pulling animation (#5355)Persson-dev1-1/+13
* Added basic skeleton bow animation * Fixing style
2021-04-12More cProtocol cleanupTiger Wang1-17/+17
* Alpha sort functions * Simplify hand handling * Fix left handed mode client-side display
2021-04-12Unify multiprotocol entity animationsTiger Wang1-0/+14
2021-04-12Streamline player abilities handlingTiger Wang1-2/+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
2021-04-03Basic elytra flight (#5124)Damián Imrich1-0/+4
* Basic elytra flight Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2021-02-20Mark UNREACHABLE with intrinsicsTiger Wang1-5/+1
2021-02-06Adds playerlist header and footer broadcasting (1.8-1.13)dImrich1-30/+31
2021-01-11zlib -> libdeflate (#5085)Tiger Wang1-2/+2
+ Use libdeflate + Use std::byte * Fix passing temporary to string_view + Emulate make_unique_for_overwrite
2020-11-23Adding new monster types to enum and saving/loading for easier future implementation (#4941)12xx121-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>
2020-11-06Ender Crytal Fix and report proper cmake file for luabindingscheck fail (#5017)12xx121-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>
2020-10-29Add beam target, configurable base visibility to Ender Crystals (#5010)12xx121-0/+17
* Fixes #4990 Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-10-05Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)peterbell101-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>
2020-09-18Add State enum to protocolTiger Wang1-16/+10
2020-08-21Made cProtocol::Version, EntityMetadata enums less verboseTiger Wang1-3/+3
2020-08-06Revert "Hotpatch optional for macOSX builds on buildserver"Alexander Harkness1-4/+4
This reverts commit 5e3f51f5ff39ac7219f1f0fcbc27340949f95ade.
2020-08-05Hotpatch optional for macOSX builds on buildserverAlexander Harkness1-4/+4
2020-07-261.14 connection supportTiger Wang1-0/+2
2020-07-20Remove some unused inclusionsTiger Wang1-1/+0
2020-07-19Inherit constructors, remove duplicationTiger Wang1-25/+4
2020-07-18Delete duplicated status request handlersTiger Wang1-124/+30
Here we go again...
2020-07-17cProtocolRecognizer goes on a diet (#4770)Tiger Wang1-3/+3
- Removed inheritance from cProtocol
2020-07-14Introduce recipe book functionality (#4493)Tobias Wilken1-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>
2020-05-09Update submodules (#4727)peterbell101-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.
2020-05-04Fix one definition rule violationsTiger Wang1-4/+4
2020-04-10Add Zombie VillagersBond-0091-3/+17
2020-04-07Initial resource pack support (#4622)Mat1-2/+4
2020-04-04Implement wither skeletons (#4563)Mat1-11/+2
2020-03-05Use LastSentPos for mob spawn packet in 1.11+ (#4490)Mat1-100/+0
2019-09-10Protocol: Use logical outgoing packet types.Mattes D1-11/+93
2019-08-11Fix building with clang 8.0 (#4346)Bond-0091-4/+6
2018-05-02Prefer static_cast to reinterpret_cast (#4223)peterbell101-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.
2018-01-08Rewrite cClientHandle::HandleRightClick (#4089)9caihezi1-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.
2017-09-21Add support for release 1.12.2 (#4041)peterbell101-0/+76
2017-09-14Fix switch warnings (#4013)peterbell101-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
2017-09-02GetPacketID for protocol packet IDs (#3977)Lane Kolbly1-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.
2017-08-27Implement Forge protocol handshake support (#3869)satoshinm1-0/+2
2017-08-26Leashes work in 1.12.1mathiascode1-24/+48
2017-08-21Fully implemented leashes (#3798)Pablo Beltrán1-0/+24
2017-08-17Add support for 1.12.1 (#3908)Bond-0091-3/+756
2017-07-28Tentative fix for player-limit race condition (#3862)Tiger Wang1-3/+3
* Attempts to fix #2257 Derived from d233e9843148313c71fbaba96ccff660e47b07b1 * Changed player count type to int * Clarified certain actions
2017-07-12Added basic ocelot behavior (#3829)Bond-0091-0/+18
2017-07-12Send player message when clicking on advancements or green book. (#3845)Lukas Pioch1-2/+22
2017-07-07Added bed entity (#3823)Lukas Pioch1-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
2017-06-14Added missing 1.12 packet changesmathiascode1-0/+28
2017-06-14Added support for protocol 1.12 (#3757)Lukas Pioch1-222/+540
2017-06-09Added WriteBlockEntity to 1.10 and 1.11 and fixed mob spawnerLukas Pioch1-0/+115
2017-05-24Exported boatLukas Pioch1-1/+1
- NBT: Added saving / loading of material - Added the material in the item handler of the boat - Drop the correct boat if destroyed - APIDoc: Added desc and functions
2017-05-15VarInt metadata written correctly for boats (#3709)peterbell101-3/+3
* Varint metadata written correctly for boats
2017-03-03Add 1.11 entity metadata (#3601)Pokechu221-2/+838
2017-02-21Add 1.11.1/1.11.2 protocol (#3575)mathiascode1-7/+58
2016-12-16Initial support for the 1.11 protocol.Mattes D1-0/+189