summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_11.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Prefer static_cast to reinterpret_cast (#4223)peterbell102018-05-021-38/+38
| | | | | | | * 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.
* Fix switch warnings (#4013)peterbell102017-09-141-33/+35
| | | | | | | | | | | | | | | * 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-4/+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
|
* Add cUUID class (#3871)peterbell102017-08-251-1/+1
|
* Minor changes (#3909)mathiascode2017-08-241-1/+1
|
* Tentative fix for player-limit race condition (#3862)Tiger Wang2017-07-281-4/+4
| | | | | | | | | | * 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
|
* Added bed entity (#3823)Lukas Pioch2017-07-071-0/+12
| | | | | | | | | | * 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 WriteBlockEntity to 1.10 and 1.11 and fixed mob spawnerLukas Pioch2017-06-091-0/+115
|
* Exported boatLukas Pioch2017-05-241-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
* VarInt metadata written correctly for boats (#3709)peterbell102017-05-151-3/+3
| | | | * Varint metadata written correctly for boats
* Add 1.11 entity metadata (#3601)Pokechu222017-03-031-2/+838
|
* Add 1.11.1/1.11.2 protocol (#3575)mathiascode2017-02-211-7/+58
|
* Initial support for the 1.11 protocol.Mattes D2016-12-161-0/+189