Commit Graph

1061 Commits

Author SHA1 Message Date
b18bd4f33c rename SessionHandler -> PacketHandler 2019-06-18 16:02:46 +01:00
87c3636d44 ResourcePacksSessionHandler: moar debug 2019-06-18 15:10:58 +01:00
94299534b3 NetworkSession: fix some blind spots on logging 2019-06-18 15:01:44 +01:00
9df2ca3655 fixup some formatting issues 2019-06-18 14:12:37 +01:00
7b049b6db1 NetworkSession: use a better check for timeout 2019-06-17 17:30:42 +01:00
92e81e3298 Player: move some respawn net sync logic to NetworkSession 2019-06-17 16:27:04 +01:00
c45c1c930e SetEntityMotionPacket: Mark as garbage serverbound 2019-06-17 14:22:08 +01:00
b344427a30 Added a hack to allow dropping garbage serverbound packets sent by a buggy client 2019-06-17 14:20:29 +01:00
4e734989bc fixing add/remove items from anvil & enchanting table
the functionality of these don't work yet, but the inventories work more correctly now.
2019-06-15 18:56:42 +01:00
93b83b4189 Player: Window system now only allows 1 window at a time 2019-06-15 18:19:09 +01:00
a94541c531 Split CreativeInventoryAction into two new action types 2019-06-15 14:40:15 +01:00
4bbf1d56dc NetworkInventoryAction: shorten exception message
This is logged with the network session's logger, which provides context information already.
2019-06-15 14:27:11 +01:00
2cb6fda286 Moved network chunk serializing code to network\mcpe namespace 2019-06-14 18:25:06 +01:00
9e9de1e8ba Log a debug message when receiving a mismatch transaction 2019-06-13 19:52:53 +01:00
8551d1e282 Remove Inventory->sendSlot() and Inventory->sendContents()
the plan is to remove this from inventory entirely and use listeners for this.
2019-06-13 18:14:11 +01:00
8afea36919 Clean up some internal commands protocol handling 2019-06-12 19:35:14 +01:00
4364d2a942 AvailableCommandsPacket: Clean up internals
this is still disgusting, but it's a little more bearable now.
2019-06-12 16:54:30 +01:00
1c69226187 NetworkSession: add an extra debug 2019-06-11 09:55:32 +01:00
8e6f21afad clean up gamemode net sync 2019-06-10 19:58:14 +01:00
f0d56f25b6 Moved creative inventory sync to NetworkSession 2019-06-10 19:54:24 +01:00
dd45753fa9 NetworkSession: add some more debug 2019-06-10 19:47:02 +01:00
3ac0c98199 De-spaghettify spawn notification handling 2019-06-10 19:31:54 +01:00
ad1b9e5cdd fix item pickup animation 2019-06-08 17:35:56 +01:00
cc6296b019 Furnace: give some properties clearer names 2019-06-07 15:41:32 +01:00
e07f3e8e65 fine, variadics are annoying and this is easy to break ... 2019-06-06 15:12:46 +01:00
5c5fbf9b78 fixed oopses in 287c8c2dd4 2019-06-06 15:09:35 +01:00
32c832c87e Merge branch 'stable'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Server.php
#	src/pocketmine/item/Item.php
#	src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter.php
#	src/pocketmine/network/mcpe/RakLibInterface.php
#	src/pocketmine/network/query/QueryHandler.php
#	src/pocketmine/utils/Utils.php
2019-06-06 15:04:05 +01:00
eb161f8e1c Use base64 instead of hex to display binary in some places
base64 takes less space than hex, which is beneficial for logging larger payloads.
2019-06-06 14:43:20 +01:00
61afc7b62c NetworkSession: report the zlib error that happened 2019-06-06 14:16:04 +01:00
9f0a184a5d Packet: Remove mayHaveUnreadBytes()
this was an old hack to prevent debug spam being emitted when we halted decoding of logins over breaking protocol changes. Since then, we've gone back to trying to decode the packet regardless, so this property is useless.
2019-06-05 15:37:35 +01:00
3b5df90b0b BossEventPacket: add some functions to ease creation 2019-06-05 15:14:37 +01:00
287c8c2dd4 Added static create() functions for many packets
There are a few motivations here:
1) Less boilerplate code (this can be written inline)
2) It's possible to provide multiple constructors for different packet variations to reduce the chance of errors.
3) It makes things catch fire on updates in ways that static analysers can understand.
2019-06-05 15:00:08 +01:00
cda565ba8c Merge branch 'stable'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/inventory/ArmorInventory.php
2019-06-04 18:19:47 +01:00
80f8a27094 Fixed implicit dependency on MobArmorEquipmentPacket field ordering
the order of the slots is entirely dependent on Mojang whims, so we shouldn't let our internals rely on it.
2019-06-04 18:16:56 +01:00
6f29fe063f move PlayerListPacket sending responsibility to NetworkSession 2019-06-04 18:02:36 +01:00
89d4f596bd World: add and use a prefixed logger in some places 2019-06-04 14:23:40 +01:00
0ae3c734ea RakLibInterface: remove unused variable 2019-06-04 14:00:01 +01:00
f5b149a022 RakLibInterface: Use the session's own logger to report handling errors 2019-06-04 13:56:52 +01:00
3569f8dfbe QueryHandler: move to a prefixed logger 2019-06-04 13:44:35 +01:00
7a05c46ff6 Merge branch 'stable'
# Conflicts:
#	resources/vanilla
2019-06-03 18:21:49 +01:00
341c480e13 ContainerSetDataPacket: added missing furnace property ID 2019-06-03 18:21:29 +01:00
efe30ffb07 Merge branch 'stable'
# Conflicts:
#	resources/vanilla
2019-05-31 15:31:32 +01:00
cf538afb84 LevelEventPacket: added two extra IDs 2019-05-31 15:31:03 +01:00
77ace57985 BlockEventPacket: added a ::create() method 2019-05-30 19:44:29 +01:00
ece4d99c1e fix crash on invalid NBT during itemstack decoding 2019-05-30 09:53:20 +01:00
7eb8d8e366 Require Closures in more places instead of callable
Non-closure callables have strange context-dependent behaviour and are slower to call than a closure. It's possible to use Closure::fromCallable() in the origin scope, which guarantees that the callable will remain callable no matter where it's used.
2019-05-27 17:11:35 +01:00
89242543b9 Clean up Skin error handling, close #2926
Skin->__construct() now does all the validation.
2019-05-27 16:20:46 +01:00
0a891f5408 Move some things out of LoginPacket and into the handler 2019-05-27 16:06:53 +01:00
33d1203bfd Player: move sendAllInventories() to network layer 2019-05-26 15:58:03 +01:00
85718e2750 Clean up a bunch of garbage in Furnace 2019-05-26 15:43:46 +01:00