1
0
Fork 0
Commit Graph

23 Commits

Author SHA1 Message Date
peterbell10 e6634ed26c
Update submodules (#4727)
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-09 15:51:15 +01:00
Tiger Wang eb3ca16921 Fix one definition rule violations 2020-05-04 13:29:56 +01:00
Bond-009 8438def87e
Add Zombie Villagers 2020-04-10 00:50:45 +01:00
Mat 6a21bf979c
Initial resource pack support (#4622) 2020-04-07 21:23:54 +00:00
Mat 60bcc06f43
Implement wither skeletons (#4563) 2020-04-04 13:44:17 +02:00
Mat cff9f7571b
Use LastSentPos for mob spawn packet in 1.11+ (#4490) 2020-03-05 12:58:46 +02:00
Mattes D 2c804dd34a Protocol: Use logical outgoing packet types. 2019-09-10 09:45:28 +02:00
Bond-009 e0ca4d8399 Fix building with clang 8.0 (#4346) 2019-08-11 10:39:43 +01:00
peterbell10 a4dbb5c582
Prefer static_cast to reinterpret_cast (#4223)
* 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-05-02 08:50:36 +01:00
9caihezi 4242431407 Rewrite cClientHandle::HandleRightClick (#4089)
* 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.
2018-01-08 13:37:10 +00:00
peterbell10 e883aa828c Add support for release 1.12.2 (#4041) 2017-09-21 14:12:43 +01:00
peterbell10 307e7aaff5 Fix switch warnings (#4013)
* 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-14 09:48:57 +01:00
Lane Kolbly aebfbfb8c8 GetPacketID for protocol packet IDs (#3977)
* 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-09-02 17:46:57 +01:00
satoshinm 6bc5031517 Implement Forge protocol handshake support (#3869) 2017-08-27 23:10:20 +02:00
mathiascode 3ebcf0fd5c Leashes work in 1.12.1 2017-08-26 20:56:10 +02:00
Pablo Beltrán b18f6637b6 Fully implemented leashes (#3798) 2017-08-21 10:46:41 +02:00
Bond-009 238f5bb338 Add support for 1.12.1 (#3908) 2017-08-17 16:25:53 +02:00
Tiger Wang eb4432bb62 Tentative fix for player-limit race condition (#3862)
* Attempts to fix #2257

Derived from d233e9843148313c71fbaba96ccff660e47b07b1

* Changed player count type to int

* Clarified certain actions
2017-07-28 17:54:40 +01:00
Bond-009 6a19841121 Added basic ocelot behavior (#3829) 2017-07-12 12:42:02 +02:00
Lukas Pioch e38a2a1e8c Send player message when clicking on advancements or green book. (#3845) 2017-07-12 10:11:29 +02:00
Lukas Pioch 885d828712 Added bed entity (#3823)
* 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-07-07 09:31:45 +02:00
mathiascode 7fa5725f3b Added missing 1.12 packet changes 2017-06-14 21:57:59 +02:00
Lukas Pioch 5a228fbc16 Added support for protocol 1.12 (#3757) 2017-06-14 11:22:51 +02:00