Dylan K. Taylor
0df2677464
EncryptionContext: Allow passing encryption algo as a constructor parameter
2021-06-13 19:57:48 +01:00
Dylan K. Taylor
f9bfc0df73
NetworkSession: don't crash on teleporting to other world during PlayerLoginEvent
2021-05-07 22:47:06 +01:00
Dylan K. Taylor
652de2632a
Rough OffHand implementation
...
this doesn't do stuff like taking arrows from offhand yet.
2021-05-05 14:46:51 +01:00
Dylan K. Taylor
66fdf526d4
Remove GarbageServerboundPacket
...
it's not the protocol implementation's job to decide what's garbage. It should only indicate that a packet MAY be sent by the client. It should then be up to the handler to decide what to do with it.
2021-04-19 01:07:21 +01:00
Dylan K. Taylor
09a2402f01
Fixed precondition on double chunk send being useless
...
this is messy, but necessary for now.
2021-04-19 00:50:43 +01:00
Dylan K. Taylor
6d38922af0
Undo my -100IQ fuckup with chunk sending precondition
...
the commit I reverted put the preconditions in the completion handler,
which is executed AFTER THE CHUNK IS SENT.
Revert "NetworkSession: allow Player to handle its own business in chunk sending"
This reverts commit a223d1cbf3e8a9143383b6497f4d2d5d7ab3202a.
2021-04-19 00:36:13 +01:00
Dylan K. Taylor
99ed87bc29
NetworkSession: changed misleading debug message in beginSpawnSequence()
2021-04-15 19:27:51 +01:00
Dylan K. Taylor
0312b62c8a
DataPacket no longer keeps its own serializer
...
since a while ago, we're anyway just discarding the internal buffer anyway when the packet is repeatedly encoded, so this doesn't serve any advantage anymore.
We do need a system to be able to reuse encoded packet buffers, but right now we're not reusing them anyway.
2021-04-09 15:37:58 +01:00
Dylan K. Taylor
1e6d97a157
Merge branch 'stable'
2021-04-07 21:25:39 +01:00
Dylan K. Taylor
b7a6c9dc17
Renamed BadPacketException -> PacketHandlingException
...
this better describes the intent, instead of just vaguely describing a packet as 'bad'.
2021-03-30 01:15:28 +01:00
Dylan K. Taylor
d5549b72de
...
2021-03-27 00:08:23 +00:00
Dylan K. Taylor
9137666952
Fixed build
2021-03-26 22:57:21 +00:00
Dylan K. Taylor
de49a361c0
NetworkSession: Remove parameters from startUsingChunk() callback
...
these can easily be use()d into the closure (which also has slightly better performance, because no type checks - not that anyone will notice).
2021-03-26 22:45:36 +00:00
Dylan K. Taylor
49cf009017
Remove unused variable
2021-03-26 22:43:21 +00:00
Dylan K. Taylor
a223d1cbf3
NetworkSession: allow Player to handle its own business in chunk sending
...
these checks should appear consistently in all of these async callbacks.
2021-03-26 22:00:42 +00:00
Dylan T
f047ecfd2d
Fixed player spawning in ungenerated terrain ( #4087 )
...
fixes #4044
fixes #2724
this is significantly more complex than I hoped for, but it's a start... and it works.
2021-03-26 21:36:27 +00:00
Dylan K. Taylor
c1e5dd2a4e
Merge branch 'stable'
2021-03-07 20:15:11 +00:00
Dylan K. Taylor
c61f66d973
Removed ext-ds dependency
2021-02-11 15:40:37 +00:00
Dylan K. Taylor
edfe9ae745
Merge branch 'stable'
2021-02-07 21:11:24 +00:00
Dylan K. Taylor
8d5cc9adc3
Merge branch 'stable'
2021-02-07 20:57:19 +00:00
Dylan K. Taylor
c05779314d
Allow offline player data to be provided from a custom source
2021-02-07 20:29:37 +00:00
Dylan K. Taylor
82c8fa696a
Relocate teleport ACK checks to InGamePacketHandler
2021-01-07 20:43:31 +00:00
Dylan K. Taylor
bcc3e87730
Timings: rename core timers to remove 'timer' from the names
...
this makes them shorter and more consistent.
2020-12-23 17:52:25 +00:00
Dylan K. Taylor
c0438f1ddb
Move player creation out of NetworkSession
2020-12-13 21:20:37 +00:00
Dylan K. Taylor
687ad28fa6
Added a PacketBroadcaster interface
...
this gives a bit more control over how packets are broadcasted, which might be useful if the batch format changes (e.g. adding a length prefix) for multi version.
This really ought to be unique to a protocol context instead of a network interface, but for now this is the best we can do.
2020-12-02 16:34:14 +00:00
Dylan K. Taylor
8fb74258f4
Implemented a better method for detecting permission recalculation
...
this allows anyone to listen to permissions being recalculated, which is useful for stuff like broadcast channel subscriptions.
2020-12-01 18:23:42 +00:00
Dylan T
6d8833ccd3
Removal of permission defaults (in favour of permission cascading) ( #3937 )
2020-12-01 17:13:54 +00:00
Dylan K. Taylor
0be60fe1eb
NetworkSession: Force use of async compression during the login sequence when latency doesn't matter
...
closes #3907
this reduces the impact of compression on the login sequence by about 90%; however, since compression only accounted for about 30% of said overhead at most, it's not really a massive difference.
2020-11-26 23:39:19 +00:00
Dylan K. Taylor
af1fe7c293
Merge branch 'stable'
2020-11-21 21:13:48 +00:00
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
1d27225553
Relocate cache-related classes to mcpe\cache namespace
2020-11-16 19:39:30 +00:00
Dylan K. Taylor
ca6a892834
[ci skip] NetworkSession: added some extra TODOs
2020-11-16 19:10:27 +00:00
Dylan K. Taylor
75f2f12b99
NetworkSession: rename some badly-named hooks
2020-11-10 15:01:48 +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
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
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