Dylan K. Taylor
3f1f135a59
remove a couple more Position->getWorld() usages
2020-05-19 21:38:51 +01:00
Dylan K. Taylor
07f979fbde
RuntimeBlockMapping: bedrockKnownStates is never null
2020-05-18 17:54:27 +01:00
Dylan K. Taylor
486ce140d8
PacketBatch no longer extends NetworkBinaryStream
...
this removes a whole bunch of crap from its API that shouldn't have been exposed. In the future we should look at splitting this into reader/writer halves, but for now this is a step in the right direction.
2020-05-18 17:35:30 +01:00
Dylan K. Taylor
0e7a822553
Merge commit '25fb5140a2dba99c5e076849ac11e051a2970807'
2020-05-18 10:40:07 +01:00
Dylan K. Taylor
129a7c1b3e
LoginPacketHandler: avoid trashing variables in foreach
2020-05-15 11:19:14 +01:00
Dylan K. Taylor
31e4fc6fcb
fixing incompatible protocol handling, do not explode immediately on bad clientdata, login encode/decode is now symmetrical
2020-05-15 10:55:29 +01:00
Dylan K. Taylor
86db3af896
remove utils\Color, use new pocketmine/color class
...
we're so close to separating protocol from core !!!
2020-05-14 20:38:08 +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
36c5d9117d
LoginPacketHandler: properly handle failure to base64_decode stuff from JWT
...
previously this might just return false and blow up in your face.
I considered fixing this on stable too, but it's less useful there because so much stuff on stable just explodes at the first wrong thing anyway.
2020-05-14 09:46:44 +01:00
Dylan K. Taylor
955b23cc8e
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
2020-05-14 00:23:36 +01:00
Dylan K. Taylor
e9ecb9a9fd
fixed build failure
2020-05-13 22:54:24 +01:00
Dylan K. Taylor
84291e7980
Throw a more specific exception for JWT handling errors
2020-05-13 21:23:04 +01:00
Dylan K. Taylor
486e0e710b
JwtUtils: fix minor formatting issue
2020-05-13 20:51:24 +01:00
Dylan K. Taylor
44a7829536
VerifyLoginException: fixed rogue usage in JwtUtils
2020-05-13 20:50:41 +01:00
Dylan K. Taylor
d7eb4f9651
Extract more general-purpose logic to JwtUtils
...
this code could now be reused for creating custom login packets.
2020-05-13 20:46:01 +01:00
Dylan K. Taylor
161ac468f3
ProcessLoginTask: properly cater for key parsing errors
2020-05-13 19:23:12 +01:00
Dylan K. Taylor
934f85841c
asserts 👏 are 👏 not 👏 error 👏 checking
2020-05-13 13:37:49 +01:00
Dylan K. Taylor
8c2878fe5b
Added JwtUtils::parse(), make ProcessLoginTask more robust
2020-05-13 13:36:42 +01:00
Dylan K. Taylor
144a66c110
cumulative imports cleanup (again)
2020-05-12 22:38:59 +01:00
Dylan K. Taylor
6b037d6a4c
RuntimeBlockMapping: these IDs are not static any more
2020-05-11 12:40:55 +01:00
Dylan K. Taylor
b7cf4f01f9
remove utils\UUID, switch to pocketmine/uuid package
2020-05-11 10:46:48 +01:00
Dylan K. Taylor
a6c35cab9a
JwtUtils: fix phpstan failure
2020-05-06 22:00:11 +01:00
Dylan K. Taylor
0b6d6306cf
LoginPacket: fixed error handling edge case with malformed chain data JSON
2020-05-06 21:46:35 +01:00
Dylan K. Taylor
ed757c7207
consolidate some JWT handling into one class
2020-05-06 21:32:22 +01:00
Dylan K. Taylor
5d154e43a9
LoginPacket: removed an old hack that's no longer used
2020-05-06 21:18:05 +01:00
Dylan K. Taylor
a92580b993
StartGamePacket: remove unused imports
2020-05-06 21:14:57 +01:00
Dylan K. Taylor
acd37b95b8
Merge branch 'next-minor'
2020-05-06 20:41:48 +01:00
Dylan K. Taylor
88c6dcf46d
ChunkCache: clean up handling of cache cleanup on world unload
2020-05-06 13:41:36 +01:00
Dylan K. Taylor
e392a6a807
PrepareEncryptionTask: do not store onCompletion as a field
...
pthreads will screw around with it and make it do things it's not supposed to, which is the exact reason why we have thread-local storage to begin with.
2020-05-06 13:32:18 +01:00
Dylan K. Taylor
ff53ddd3ad
PrepareEncryptionTask: fix wrongly-specified nullability of serverPrivateKey
2020-05-06 13:29:58 +01:00
Dylan K. Taylor
b4606a4cd0
remove PM resource interaction from StartGamePacket
...
also lose the cache, because it's not very useful ...
2020-05-06 13:17:16 +01:00
Dylan K. Taylor
dbd51610c3
TypeConverter: use SingletonTrait
2020-05-05 19:22:20 +01:00
Dylan K. Taylor
81f982a8d9
remove hardcoded legacy entity type ID mapping, load from resources instead
2020-05-04 13:47:39 +01:00
Dylan K. Taylor
fcd6a69000
cleaning up NBT handling on packet decode/encode
...
now we always decode, because it's not safe to assume that we can just grab the rest of the bytes in the packet.
2020-05-04 13:23:29 +01:00
Dylan K. Taylor
a73c54bdd0
making tile spawn compound cache use CacheableNbt instead of strings
2020-05-04 12:35:13 +01:00
Dylan K. Taylor
c2857a91bd
[Network]ChunkSerializer: allow injecting RuntimeBlockMapping
...
this will allow the same serializer to be reused with different mapping tables (will be needed for multi version).
2020-05-04 12:14:27 +01:00
Dylan K. Taylor
d3dcb8a4e3
moving entity attack sounds to server-side
2020-05-04 11:50:42 +01:00
Dylan K. Taylor
8682ea35f7
Introduce some (not great) API for entity animations
...
while this API is a bit yucky, it's a step forward for protocol isolation and offers the possibility of controlling animations by adding events.
2020-05-01 13:57:26 +01:00
Dylan K. Taylor
2964a4be35
making BlockPunchSound server-controlled
2020-05-01 12:23:00 +01:00
Dylan K. Taylor
1969766b70
Nix some client-sided sounds, control them from the server
...
this is a necessary step to knock out the implicit assumption that every player is using the same protocol.
2020-05-01 11:52:32 +01:00
Dylan K. Taylor
b74f177958
ChunkCache: destroy cache when world is unloaded
2020-04-29 18:50:33 +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
adadd5423d
move force-close crafting grid hack to InGamePacketHandler
...
the crafting transaction implementation has no business caring about this
2020-04-29 16:54:23 +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
f35b7bf80b
NetworkBinaryStream: remove stale @throws from getAttributeList()
2020-04-29 16:32:56 +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