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
Dylan K. Taylor
da7ff9b1fe
Airgap Attribute, fix decoding of non-registered attributes for protocol debugging
2020-03-24 00:43:44 +00:00
Dylan K. Taylor
3e5d3a646b
Make use of BadPacketException::wrap()
2020-03-23 21:28:38 +00:00
Dylan K. Taylor
ce0af8b040
DataPacket now encapsulates NetworkBinaryStream instead of extending it
...
ultimately the goal is to remove the NetworkBinaryStream crap entirely, but this change has most of the same benefits and is less disruptive.
2020-02-24 18:59:54 +00:00
Dylan K. Taylor
d2aca6023b
add native return types to closures (for phpstan)
2020-02-07 22:05:15 +00:00
Dylan K. Taylor
aac7da6c96
eliminate remaining empty() usages
2020-02-07 21:51:50 +00:00
Dylan K. Taylor
ff63f6d055
fill in more iterable types (master)
2020-02-01 20:19:57 +00:00
Dylan K. Taylor
5c4487c980
added some callable prototypes for phpstan
2020-01-29 19:56:16 +00:00
Dylan K. Taylor
ded0f5c80e
network: added some missing native closure return types
2020-01-28 11:10:01 +00:00
Dylan K. Taylor
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
Dylan K. Taylor
df2551ed4d
NetworkSession: add missing return type for syncAttributes()
2020-01-18 20:00:05 +00:00
Dylan K. Taylor
c85c1c3c3f
Merge commit '82d9e481d2a0a389fbbc6dfd3672fc366127febc'
2019-12-11 23:06:35 +00:00
Encritary
7276eda0e5
Moved SetTitlePacket usage to NetworkSession ( #3186 )
2019-11-09 19:56:06 +00:00
Dylan K. Taylor
122238d57e
add NetworkSession->onEnterWorld() hook
2019-08-20 16:25:20 +01:00
Dylan K. Taylor
794c7b2469
clean up imports
2019-08-20 15:59:27 +01:00
Dylan K. Taylor
2d4a32fc77
first look at separating Entity and Location
2019-08-19 17:20:34 +01:00
Dylan K. Taylor
d1775030c3
Remove DataPacketBroadcastEvent, DataPacketSendEvent now supports multiple recipients & packets in one swoop
...
this makes it simpler to consistently process outbound packets from a plugin. Previously it was necessary to handle 2 events to do 1 job.
2019-08-10 17:59:02 +01:00
Dylan K. Taylor
7e4236a3ec
add a more flexible hook system to EffectManager
2019-08-01 19:36:13 +01:00
Dylan K. Taylor
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00