summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_13.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-06-30Send metadata for item frames (#5568)mjagdis1-1/+5
Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
2023-09-26adding endermite (#5460)Debucquoy Anthony tonitch1-2/+1
* First Draft of adding endermite * Update src/Mobs/Endermite.h Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com> * Adding Protocols + SpawnEgg TODO: don't forget to put the endermite in core plugin for the summon command * Adding endermite to monster.ini * Adding 5% change of spawning endermite when throwing enderpearl * Spawn endermite at last position instead of Hit Position + .cache to .gitignore * fixup! Spawn endermite at last position instead of Hit Position + .cache to .gitignore * destroy endermite if 2 min, not if name is set * Syntax * Adding Enderman targeting endermite + fixing syntax * Fixing compile error + return error [but crash on enderman spawn] * Fix crash but enderman doesn't target * Enderman targeting endermite finished * checking style because i'm a noob at git... * fixup! checking style because i'm a noob at git... * Added endermite egg meta to docs * Final touches Removed unnecesary imports fixed callback to run only in sight distance and actually check sigtlines * Fixed error after not pulling branch --------- Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com> Co-authored-by: Debucquoy <debucqquoy.anthony@gmail.com>
2022-04-21Protocol sources fixes (#5411)Simon Pribylski1-30/+0
* Move HANDLE_READ to header * Fix compiler warnings * Removed unnecessary default statement
2022-04-20Improving 1.14 support (#5388)Simon Pribylski1-0/+3
* 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
2022-04-20Updated protocol functions to Vector3xx12xx12x1-2/+2
also added support in included functions
2021-12-31Handle name item packetPersson-dev1-0/+12
2021-12-29Add skeleton bow pulling animation (#5355)Persson-dev1-2/+12
* Added basic skeleton bow animation * Fixing style
2021-11-23Protocol: modernise plugin message handling (#5325)Tiger Wang1-9/+23
- Remove handling for garbage data in command block sets + Add correct boolean value read (#1692) * Make better use of namespaced-id and string_view
2021-06-28Protocol: use dedicated packet for 1 block changeTiger Wang1-1/+2
It's six bytes smaller.
2021-05-03Add player statistics to API (#5193)nshah251-26/+21
* Fixed issue #5166 Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2021-04-30Chest, weather, crash, and miscellaneous fixes (#5215)Tiger Wang1-2/+11
* Alpha-sort cChestEntity * Chests: use SendUpdateBlockEntity * Pathfinder: fix out of range Y * 1.13: correct weather packet ID * Chests: fix neighbour scanner + Add OnAddToWorld and overload to scan neighbours there, instead of in the constructor/OnUse. This fixes hoppers accessing newly loaded double chests and seeing a null m_Neighbour, thus thinking its a single chest. * Fix typo in cross coords computation. * Simplify hopper logic. * Block entities: ASSERT that type is correct If you match the block type first before calling DoWithBlockEntity, the corresponding block entity must either be empty or correspond to the block type. * Chunk: fix some forgotten PendingSendBE cleanup + Add cleanup in SetAllData, WriteBlockArea - Remove RemoveBlockEntity (used once), HasBlockEntity (not used) * Replace MakeIndex with MakeIndexNoCheck * Remove extraneous MarkDirty in hopper & chests
2021-04-22keeping the server from crashing (#5203)12xx121-3/+3
2021-04-12More cProtocol cleanupTiger Wang1-283/+283
* Alpha sort functions * Simplify hand handling * Fix left handed mode client-side display
2021-04-12Unify multiprotocol entity animationsTiger Wang1-0/+13
2021-04-12Streamline player abilities handlingTiger Wang1-2/+1
* 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-03-18Deduplicate WriteBlockEntityTiger Wang1-9/+15
2021-03-05Adding Boss bar (#5025)12xx121-1/+89
+ Add boss bar Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2021-02-20Mark UNREACHABLE with intrinsicsTiger Wang1-9/+1
2021-02-06Adds playerlist header and footer broadcasting (1.8-1.13)dImrich1-53/+54
2021-01-11zlib -> libdeflate (#5085)Tiger Wang1-7/+8
+ Use libdeflate + Use std::byte * Fix passing temporary to string_view + Emulate make_unique_for_overwrite
2020-12-21Prepare for 1.15+ (#4856)Tiger Wang1-4/+4
+ Add type-safe container for states * Split registry Blocks into BlockTypes, BlockStates so the block types enumeration can be #included without too much penalty * Ensure Registry uses type-safe container
2020-12-18Warnings improvementsTiger Wang1-3/+1
* Turn off global-constructors warning. These are needed to implement cRoot signal handler functionality * Add Clang flags based on version lookup instead of a compile test. The CMake config process is single threaded and slow enough already * Reduced GetStackValue verbosity + Clarify EnchantmentLevel, StayCount, AlwaysTicked, ViewDistance signedness + Give SettingsRepositoryInterface a move constructor to simplify main.cpp code - Remove do {} while (false) construction in redstone handler
2020-11-23Adding new monster types to enum and saving/loading for easier future implementation (#4941)12xx121-2/+84
* 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-2/+2
* 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/+15
* Fixes #4990 Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-10-05Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)peterbell101-3/+5
* 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-20Added end portal and enchanting table block entities12xx121-11/+15
2020-08-281.13+: Send length-prefixed server Brand stringTiger Wang1-17/+4
Ref: 5176c22656a8fb5485ab04100daa93bb761bb8f6
2020-08-21Made cProtocol::Version, EntityMetadata enums less verboseTiger Wang1-196/+196
2020-08-21Remove complex templated SendBlockChangeTiger Wang1-33/+32
If we're sending enough blocks to have virtual calls be an issue, we should resend the chunk instead.
2020-08-19Adding block entity transmission to 1.13 (#4829)12xx121-1/+37
+ Adding block entity transmission to 1.13 + Added HandlePacketSetBeaconEffect Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-08-19Add Statistics and Achievements for newer Network standards12xx121-1/+57
2020-08-05imprementing plugin message to send server brand (#4786)12xx121-2/+6
* fixed issue #4773 Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-07-261.14 connection supportTiger Wang1-24/+3
2020-07-20Remove some unused inclusionsTiger Wang1-11/+9
2020-07-19Use 1.13.1 block paletteTiger Wang1-17/+42
2020-07-191.13.1, 1.13.2 connection supportTiger Wang1-11/+133
2020-07-18Delete duplicated status request handlersTiger Wang1-44/+9
Here we go again...
2020-07-181.13 items supportTiger Wang1-43/+19
+ Add 1.16 block and item definitions
2020-07-17Initial work on 1.13 entity metadata (#4539)Mat1-160/+865
* Initial work on 1.13 entity metadata * Largely complete metadata Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-07-17cProtocolRecognizer goes on a diet (#4770)Tiger Wang1-1/+1
- Removed inheritance from cProtocol
2020-07-14Introduce recipe book functionality (#4493)Tobias Wilken1-0/+1
* 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-2/+2
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-04-10Use correct value for zombie villager in 1.13Mat1-1/+1
2020-04-10Fix compilation, for real this time.Alexander Harkness1-0/+1
I should go to sleep now...
2020-04-04Implement wither skeletons (#4563)Mat1-0/+1
2020-03-29Add protocol mob ID remapping (#4538)Mat1-0/+46
2020-03-23Enable functional packets in 1.13mathiascode1-27/+0
2020-01-07Added temporary block type mapping for 1.13+ protocols.Mattes D1-2/+33
2019-09-24Fix clang8.0 build (#4399)Bond-0091-9/+13
The protocol 13.0 PR broke clang 8.0 builds.
2019-09-16Initial support for 1.13 clientsTiger Wang1-0/+456
+ Can look at *shape* of world + Can look at *shape* of inventory