Dylan T
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40:43 +01:00
Dylan K. Taylor
902ea515f7
Separate ID handling from GameMode
...
the aliases of 0,1,2,3 remain for user-interface level compatibility.
2021-06-27 20:32:35 +01:00
Dylan K. Taylor
b8ebf8936e
InventoryManager: fix container open callbacks not working
...
this was reported to me on socials by multiple different people, but nobody reported an issue so I almost forgot. >.<
2021-06-26 21:21:23 +01:00
Dylan K. Taylor
0910054c41
NetworkSession: Fixed InventoryManager nullability disaster
...
fixes #4277
fixes #4275
fixes #3139
2021-06-26 17:44:42 +01:00
Dylan K. Taylor
981b0285d1
Isolate config casting nastiness in one place
...
this doesn't solve the underlying problem, but it does reduce the amount of noise made by PHPStan about it, as well as avoiding code litter.
2021-06-19 19:14:02 +01:00
Dylan K. Taylor
61c59be299
Replace hardcoded block metadata shifts and masks with constants
...
we might want to make these bigger than 4 bits in the future.
2021-06-16 12:48:09 +01:00
Dylan K. Taylor
c22f793521
RakLibInterface: Log a message when a non-0xfe packet is received
2021-06-15 19:20:31 +01:00
Dylan K. Taylor
2ee86f0edf
Improved UPnP exception handling
2021-06-13 23:02:42 +01:00
Dylan K. Taylor
ec7ea98ead
UPnP: expose more functionality
2021-06-13 22:48:38 +01:00
Dylan K. Taylor
80bf948588
Separate UPnPNetworkInterface from UPnP implementation
2021-06-13 22:41:36 +01:00
Dylan K. Taylor
3d0b21f30c
Denoise NetworkSession with typed properties
2021-06-13 22:27:23 +01:00
Dylan K. Taylor
e5dd5a5745
NetworkSession: Fixed missing nullable declarations
...
phpstan doesn't report these because .. reasons .. @ondrejmirtes this is causing bugs to go unfound :(
I'm aware of the irony that I just silenced the bugs that were exposed by this commit .. that's an architectural problem for another day
2021-06-13 22:24:12 +01:00
Dylan K. Taylor
04a6e89d6f
Change encryption to use CTR instead of GCM
...
despite MCPE claiming to use GCM, it omits the auth tag, which defeats the whole point of using GCM.
CTR can be used instead, with the final 4 bytes of the IV being 0002.
2021-06-13 21:57:23 +01:00
Dylan K. Taylor
0df2677464
EncryptionContext: Allow passing encryption algo as a constructor parameter
2021-06-13 19:57:48 +01:00
Dylan K. Taylor
2bbb24fab7
Merge branch 'stable'
2021-06-08 20:00:08 +01:00
Dylan K. Taylor
2d686e6dc0
Merge remote-tracking branch 'origin/stable'
2021-06-04 18:03:32 +01:00
Dylan K. Taylor
7d99b0115c
Added a getName() override for RakLibServer
2021-05-29 23:51:46 +01:00
Dylan K. Taylor
4bcc7e09cb
PacketSerializer: fix unnecessary FQN
2021-05-29 14:24:48 +01:00
Dylan K. Taylor
8171b18002
Separate ItemTypeDictionary implementation from initialization
...
we're not going to want implementation details like how it's setup getting in the way when we separate protocol from the core.
2021-05-29 14:24:05 +01:00
Dylan K. Taylor
20197e6813
RakLibServer: clean up constructor parameters
2021-05-08 20:13:29 +01:00
Dylan K. Taylor
1003fde2fc
RakLibServer: make all parameters mandatory
2021-05-08 20:11:16 +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
4ca5558ec1
Merge remote-tracking branch 'origin/stable'
2021-05-05 11:14:01 +01:00
Dylan K. Taylor
593a8ac529
Added Loom blocks
...
these don't support doing patterns yet, but their inventories work.
2021-04-29 19:51:09 +01:00
Dylan K. Taylor
8364bc51ac
...
2021-04-27 14:47:11 +01:00
Dylan K. Taylor
7ce77713dd
InventoryManager: add a mechanism to allow plugins to inject their own container open packet creators
...
closes #4008
2021-04-27 14:40:43 +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
6845cbb2b3
Silence LevelSoundEventPacket noise
2021-04-19 01:02:22 +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
0251359179
ChunkCache: remove outdated TODO comment
...
we don't set the entire chunk during lighting updates anymore, so updating light doesn't trigger onChunkChanged().
2021-04-19 00:20:03 +01:00
Dylan K. Taylor
8d2ee516f0
Merge branch 'stable'
2021-04-16 18:26:33 +01:00
Dylan K. Taylor
99ed87bc29
NetworkSession: changed misleading debug message in beginSpawnSequence()
2021-04-15 19:27:51 +01:00
Dylan K. Taylor
66622defae
PacketSerializer: fix merge error
2021-04-11 16:49:57 +01:00
Dylan K. Taylor
74d103a56f
Merge remote-tracking branch 'origin/stable'
2021-04-11 16:36:39 +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
19f536d68a
...
2021-04-07 21:54:21 +01:00
Dylan K. Taylor
1e6d97a157
Merge branch 'stable'
2021-04-07 21:25:39 +01:00
Dylan K. Taylor
7578bca006
Merge tag '3.18.2'
2021-04-07 19:41:57 +01:00
Dylan K. Taylor
cd71fec53d
fucking phpstorm 2020.3 and its broken autocomplete
2021-03-31 21:41:50 +01:00
Dylan K. Taylor
5e8078f3dd
PacketSerializer: Improved performance of item serialize/deserialize
2021-03-31 21:39:55 +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
25998720ce
Fixed server crash on invalid gamemode in SetPlayerGameTypePacket
...
this really ought to be detected at the decode layer, but right now that's a bit difficult ...
2021-03-28 21:11:07 +01:00
Dylan K. Taylor
b032d49722
Merge branch 'stable'
2021-03-28 19:41:23 +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