Dylan K. Taylor
62b9d97060
Break circular dependency in Player->disconnect() usages
...
none of these usages require onPlayerDestroyed() to be fired since they are all being called during disconnects anyway.
2020-11-16 23:05:56 +00:00
Dylan K. Taylor
09b22c1e79
NetworkSession: drop @var doc comment referring to nonexisting variable
2020-11-16 22:51:03 +00:00
Dylan K. Taylor
c3c647d51e
NetworkSession: remove useless disconnect() call
...
this can't execute here because of the disconnectGuard, so this call always does nothing.
2020-11-16 22:13:48 +00:00
Dylan K. Taylor
37299ab804
ChunkCache: explicitly check for requesting of unloaded chunk
...
NetworkSession will never do this, but other things might.
2020-11-16 19:45:46 +00:00
Dylan K. Taylor
1d27225553
Relocate cache-related classes to mcpe\cache namespace
2020-11-16 19:39:30 +00:00
Dylan K. Taylor
869c9dabf1
SetCommandsEnabledPacket: added ::create()
2020-11-16 19:11:10 +00:00
Dylan K. Taylor
ca6a892834
[ci skip] NetworkSession: added some extra TODOs
2020-11-16 19:10:27 +00:00
Dylan K. Taylor
0d9561c93f
Removed crafting data cache from CraftingManager
2020-11-12 21:30:59 +00:00
Dylan K. Taylor
c4d35d52e8
Do not store a pre-compressed cache for crafting data
...
this reduces bandwidth efficiency because it can't be compressed with everything else this way. If we want to cache stuff sent during the login sequence, it's better to stuff a bunch of stuff into a batch (e.g. crafting, creative, actor ids, biome defs) and pre-compress that as one big package instead.
2020-11-11 18:20:03 +00:00
Dylan K. Taylor
75f2f12b99
NetworkSession: rename some badly-named hooks
2020-11-10 15:01:48 +00:00
Dylan K. Taylor
e23379c34b
EncryptionContext: provide the packet ID in the exception message
2020-11-10 14:45:19 +00:00
Dylan K. Taylor
6a266bcbd1
Separated XUID stuff from PlayerInfo into its own XboxLivePlayerInfo
2020-11-10 14:25:08 +00:00
Dylan K. Taylor
e573226025
ItemStack: fixed phpstan failure
2020-11-09 19:10:02 +00:00
Dylan K. Taylor
2bcb398db9
ItemStack: added jsonSerialize
2020-11-09 19:05:00 +00:00
Dylan K. Taylor
f43d20b47a
Move attribute net sync to NetworkSession
2020-11-08 14:15:11 +00:00
Dylan K. Taylor
64afb6f2e2
Move responsibility of firing chunk requests from World to NetworkSession
...
this is, after all, all about sending chunks ...
2020-11-08 14:14:43 +00:00
Dylan K. Taylor
ffff0a6244
NetworkSession: remove obsolete TODO
2020-11-08 14:03:30 +00:00
Dylan K. Taylor
72ace3951e
InGamePacketHandler: fixed crafting table breaking when clicked while sneaking
2020-11-03 22:56:20 +00:00
Dylan K. Taylor
1f2bc8cb69
World: remove rogue import
2020-11-01 17:05:57 +00:00
Dylan K. Taylor
4549522289
Rename Chunk::getSubChunkChecked() -> getSubChunk()
2020-10-31 23:12:03 +00:00
Dylan K. Taylor
01001dca74
Use Chunk::getSubChunkChecked() in places where we know that an invalid coordinate cannot be requested
2020-10-31 22:48:41 +00:00
Dylan K. Taylor
4c0c2ebd24
CS cleanup
2020-10-26 15:56:30 +00:00
Dylan K. Taylor
3f254bd49c
Separated effects' MCPE ID registration from VanillaEffects
2020-10-24 18:52:20 +01:00
Dylan K. Taylor
03837c1b71
ZlibCompressor: use libdeflate if available
...
I may make libdeflate mandatory later on, but right now we haven't been able to ship it on all platforms yet.
2020-10-13 17:30:27 +01:00
Dylan K. Taylor
eabfd2a37b
World: replace sendBlocks() with createBlockUpdatePackets()
...
this allows the caller to decide how the packets should be sent.
2020-10-11 16:30:54 +01:00
Dylan K. Taylor
2e3940e8f5
NetworkSession: remove circular dependency between queueCompressed() and flushSendBuffer()
...
this cycle makes the code fragile and prone to infinite looping bugs when modified, as well as making the code harder to follow.
2020-10-11 12:22:59 +01:00
Dylan K. Taylor
15a2fd6e4f
LegacySkinAdapter: check return value of json_encode() for resource patch
2020-10-08 21:42:07 +01:00
Dylan K. Taylor
b0b08d45d5
Entity: clean up sendData() handling, remove send-to-self hack
2020-10-08 21:35:36 +01:00
Dylan K. Taylor
01b44ab0bc
protocol: moved skin data types to their own namespace
2020-10-08 21:20:57 +01:00
Dylan K. Taylor
94c58c00b5
NetworkSession: Restore PM3 unexpected XUID handling behaviour (removes XUID instead of kicking the player)
...
close #3861 , close #3089
2020-10-08 14:36:07 +01:00
Dylan K. Taylor
d8ee657d20
MoveActorAbsolutePacket: added ::create() method
2020-10-06 18:34:38 +01:00
Dylan K. Taylor
69cad3e694
InGamePacketHandler: Ignore LevelSoundEventPacket completely
2020-10-06 18:26:57 +01:00
Dylan K. Taylor
d7f7e1c4ff
InventoryManager: remove useless repeated code
2020-10-06 18:14:46 +01:00
Dylan K. Taylor
15eac8a65a
NetworkSession: renamed some instructions to imperative instead of onWhatever()
...
these aren't listening to events, they are telling the client that an event has taken place.
2020-10-06 18:06:48 +01:00
Dylan K. Taylor
7ef794d725
imports cleanup
2020-10-04 18:22:07 +01:00
Dylan K. Taylor
d3a3a41d2b
Revert back to separated floor/wall sign
...
the conditionally useless properties are problematic.
2020-10-04 17:52:23 +01:00
Dylan K. Taylor
3b4e9eea96
RuntimeBlockMapping: drop useless doc comment
2020-09-25 17:43:00 +01:00
Dylan K. Taylor
7c192f85e2
protocol: remove final remaining Vector3 mutations
...
this really should be replaced with a network layer BlockPos structure in the absence of a general int-vector structure in math.
2020-09-25 17:41:12 +01:00
Dylan K. Taylor
716de4d9d6
ChunkCache: we have no business autoloading chunks during sending
...
if the chunk isn't loaded, this is a bug and it should crash.
2020-09-20 13:32:54 +01:00
Dylan K. Taylor
5096741b29
World::getChunk() behaviour now matches that of a regular ChunkManager
...
Various bugs existed for a while with stuff using chunk managers instead of worlds when interacting with terrain due to a behavioural inconsistency between World::getChunk() (return from cache or load from disk), and SimpleChunkManager::getChunk() (return from cache only). This change brings the two in line.
World::getOrLoadChunk() has been added as a replacement, which has the same behaviour as the old getChunk() and also makes it more obvious that there is an issue with code using it during refactoring.
2020-09-20 13:29:09 +01:00
Dylan K. Taylor
5661d0496f
RuntimeBlockMapping::toRuntimeId() now accepts a single integer instead of id/meta
...
the expectation is that eventually this will receive arbitrary internal runtime IDs instead of static id/meta, and RuntimeBlockMapping doesn't really care about this crap anyway.
2020-09-20 12:16:11 +01:00
Dylan K. Taylor
be0cec531a
ResourcePackInfoEntry: remove useless null coalesce operators
...
these fields are never null.
these errors aren't reported unless bleeding-edge is enabled.
2020-09-06 16:13:41 +01:00
Dylan K. Taylor
a35ca1fa71
Merge branch 'stable' into master
2020-08-15 20:32:14 +01:00
Dylan K. Taylor
98db4c5200
Merge branch 'stable' into master
...
# Conflicts:
# .gitmodules
# composer.lock
# resources/vanilla
# src/network/mcpe/protocol/PlayerAuthInputPacket.php
# src/pocketmine/Player.php
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
2020-08-10 17:55:49 +01:00
Jack Honour
ff2a3baa8e
Implemented Jukebox & Records ( #3742 )
...
Co-authored-by: Dylan K. Taylor <odigiman@gmail.com>
2020-08-07 21:07:58 +01:00
Dylan K. Taylor
e1d80f05b1
Merge branch 'stable' into master
2020-08-03 20:14:46 +01:00
Dylan K. Taylor
1525001565
protocol ItemStack: added equals() method to compare net itemstacks directly
...
this will be needed for more than just this little check once item NBT gets cleaned out properly, since we'll need to compare object equality by network layer stuff instead of internals (where different network objects might deserialize to the same internal items).
2020-08-02 23:22:39 +01:00
Dylan K. Taylor
1500668d4e
imports cleanup
2020-07-25 19:21:22 +01:00
Dylan K. Taylor
5910905e95
PacketBatch::getPackets() may throw PacketDecodeException
2020-07-22 15:38:24 +01:00
Dylan K. Taylor
8402465fd2
PacketBatch is now immutable
2020-07-22 15:37:06 +01:00