Dylan K. Taylor
ffff0a6244
NetworkSession: remove obsolete TODO
2020-11-08 14:03: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
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
b0b08d45d5
Entity: clean up sendData() handling, remove send-to-self hack
2020-10-08 21:35:36 +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
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
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
2fcee432c1
NetworkSession: store Packet[] for buffering instead of PacketBatch
...
this reduces memory allocations for buffering (in theory).
2020-07-22 15:18:01 +01:00
Dylan K. Taylor
b22cc4875e
Player: Accept NBT data in constructor, instead of asking for it from the server directly
...
this allows custom implementations to provide custom data to the constructor (or none at all).
2020-07-09 13:09:46 +01:00
Dylan K. Taylor
30591d047c
PacketBatch: added a getPackets() method which encapsulates some logic
2020-07-01 13:38:06 +01:00
Dylan K. Taylor
670ad9eb9d
Position: rename getWorldNonNull() to getWorld(), remove original getWorld()
2020-06-29 21:19:46 +01:00
Dylan K. Taylor
0d13a3fbdb
NetworkSession: do not respond to death before player spawn, fixes #3513
...
there's a few changes that can be made to avoid this problem, the
primary one being to separate this API from NetworkSession and abstract
it away... but this is a reasonable, although not great, solution.
2020-06-28 17:35:12 +01:00
Dylan K. Taylor
7e6adc41f0
Merge 1.16 support into PM4 (with changes)
2020-06-26 22:21:09 +01:00
Dylan K. Taylor
52fd1a8c1d
CommandSender: export getLanguage()
...
this currently serves as a proxy to the server main language, but it can be used by third party implementations to choose a non-Server language.
2020-06-22 20:05:23 +01:00
Dylan K. Taylor
edc3156bea
Rename NetworkCipher -> EncryptionContext
2020-06-18 11:37:53 +01:00
Dylan K. Taylor
893f7cb6ef
fix crash whn player joins in spectator mode
2020-06-17 12:39:54 +01:00
Dylan K. Taylor
9c46a1f141
Rename Packet->getBinaryStream() -> Packet->getSerializer()
2020-06-17 11:33:59 +01:00
Dylan K. Taylor
f55a7f8b53
Merge commit 'd8d994351'
...
# Conflicts:
# composer.lock
# resources/vanilla
# tests/phpstan/configs/l7-baseline.neon
2020-06-14 19:47:21 +01:00
Dylan K. Taylor
9ce531fef4
(master) imports cleanup
2020-06-14 19:29:33 +01:00
Dylan K. Taylor
465285b3c2
do not rely on GameMode::getMagicNumber() to match protocol IDs
2020-06-13 12:26:17 +01:00
Dylan K. Taylor
70ca12bb90
Merge commit 'fcc9e62c6'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/types/command/CommandEnum.php
# src/pocketmine/Player.php
2020-06-13 11:49:52 +01:00
Dylan K. Taylor
6df43338df
Merge commit 'c3a795e87'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
# src/pocketmine/entity/Entity.php
2020-05-31 14:56:37 +01:00
Dylan K. Taylor
570a709059
Merge commit '3ec2994d7f05f30e2519430379ae0f3106be5074'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-05-20 19:52:03 +01:00
Dylan K. Taylor
3bb53658da
Do not allow remote clients to spawn themselves before we're ready
...
this would have allowed clients to send SetLocalPlayerAsInitializedPacket at any time during the spawn sequence, which would have caused undefined behaviour around spawning logic.
2020-05-20 11:09:27 +01:00
Dylan K. Taylor
3f1f135a59
remove a couple more Position->getWorld() usages
2020-05-19 21:38:51 +01:00
Dylan K. Taylor
3dafee6aa6
NetworkSession: explicitly unregister effect manager hooks on dispose,
...
close #3455
2020-05-14 10:59:10 +01:00
Dylan K. Taylor
bb11cbd89c
World: relocate packet stuff for time and difficulty behind NetworkSession API
2020-04-29 18:31:54 +01:00
Dylan K. Taylor
c8c0a1533c
NetworkSession: seal up actor removal behind API
2020-04-29 17:00:47 +01:00
Dylan K. Taylor
4ce6525065
NetworkSession: incomplete abstraction of SetActorDataPacket handling
...
this needs to have the metadata properties separated too, but that's a job that's going to get VERY messy.
2020-04-29 16:50:52 +01:00
Dylan K. Taylor
d1b28ce17a
NetworkSession: allow sending an arbitrary set of attributes for an entity
2020-04-29 16:45:09 +01:00
Dylan K. Taylor
f6f714c158
NetworkSession: do not mark shared attributes as synchronized, they don't necessarily belong to us
...
if we decided to start sending entity attribute changes to viewers too, this would have caused some unexpected behaviour.
2020-04-29 16:38:10 +01:00
Dylan K. Taylor
ad70a9e3dc
NetworkSession: allow provision of a custom list of players to syncPlayerList()
2020-04-29 16:27:34 +01:00
Dylan K. Taylor
d8968e9e40
box up TakeItemActorPacket sending behind NetworkSession API
...
we need to start thinking about moving this into interfaces.
2020-04-29 16:24:04 +01:00
Dylan K. Taylor
549940d8a7
remove NullPacketHandler
...
this is a waste of LOC
2020-04-29 13:14:23 +01:00
Dylan K. Taylor
b6214744d5
NetworkSession: inject PacketPool instead of hardcoding it
...
this will make it slightly easier for multi version implementations, but handlers are still quite a big problem.
2020-04-29 12:48:28 +01:00
Dylan K. Taylor
3be9548b1e
net: compressors are now fully dynamic (or at least the potential to be)
...
the compressor used by RakLibInterface when opening a session is still
hardcoded, but that's because we have no way to select the correct
compressor at that point in the login sequence, since we aren't
propagating the protocol information up from RakLib right now.
2020-04-28 16:21:18 +01:00
Dylan K. Taylor
d9e4783b24
start making network compressors dynamic
...
this will facilitate future multi version support where compression types are different between versions
2020-04-28 14:47:01 +01:00
Dylan K. Taylor
a97cafd4f6
moving serializers into protocol namespace
2020-04-27 13:54:39 +01:00
Dylan K. Taylor
15c744b0d7
protocol: specialize exception used for bad packets
2020-04-27 12:55:00 +01:00
Dylan K. Taylor
1f7f33d35d
NetworkSession: privatise setAuthenticationStatus()
...
this is accessed via a closure proxy, so it doesn't need to be exported anymore.
2020-04-25 03:33:44 +01:00
Dylan K. Taylor
80680f15f4
seal up resource pack completion callback visibility
2020-04-25 03:31:13 +01:00
Dylan K. Taylor
c869a7f099
HandshakePacketHandler no longer depends on NetworkSession
2020-04-24 23:18:29 +01:00
Dylan K. Taylor
f3d7c320a1
move SkinAdapter stuff to convert package
2020-04-23 15:46:37 +01:00
Dylan K. Taylor
18d48869a0
the great airgapping of recipes and itemstacks
2020-04-23 14:11:48 +01:00
Dylan K. Taylor
843993f02b
Throw a specific exception for zlib decompression failure
2020-04-22 13:45:29 +01:00
Dylan K. Taylor
35d656c6e5
ProcessLoginTask no longer depends on NetworkSession
2020-04-22 13:30:37 +01:00
Dylan K. Taylor
dd37d286f0
use a dedicated exception class for throwing exceptions on decrypt failure
2020-04-22 09:40:26 +01:00
Dylan K. Taylor
3d3a487422
PrepareEncryptionTask: remove cyclic dependency on NetworkSession
2020-04-18 11:25:29 +01:00
Dylan K. Taylor
e86c243db5
NetworkSession: do not expose setPlayerInfo()
2020-04-16 01:55:52 +01:00
Dylan K. Taylor
d3a6da1b3a
NetworkSession->getPing() now returns null when no measurement of ping has yet been completed
2020-04-04 23:33:30 +01:00