Dylan K. Taylor
f81d061ea9
Updated to newest RakLib
2020-12-12 19:06:45 +00:00
Dylan K. Taylor
197b1a8566
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/types/inventory/stackresponse/ItemStackResponseSlotInfo.php
# src/network/mcpe/raklib/FilterTextPacket.php
# src/pocketmine/VersionInfo.php
# src/pocketmine/network/mcpe/protocol/PacketPool.php
# src/pocketmine/network/mcpe/protocol/ResourcePacksInfoPacket.php
2020-12-08 21:34:06 +00:00
Dylan K. Taylor
a5315991d5
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/serializer/PacketSerializer.php
# src/world/biome/Biome.php
# tests/phpstan/configs/l8-baseline.neon
2020-12-05 01:30:39 +00:00
Dylan T
03b1ea766a
Added a DedicatedQueryNetworkInterface to ensure Query functionality when RakLibInterface is disabled ( #3942 )
2020-12-04 21:21:25 +00:00
Dylan K. Taylor
c808095978
Chunks no longer contain their own coordinates
2020-12-03 21:59:30 +00:00
Dylan K. Taylor
1f5998d24c
FastChunkSerializer no longer encodes chunk coordinates
...
in cases like PopulationTask it makes more sense to store the coordinates separately where they can be stored more efficiently (once instead of 9 times)
In addition, PopulationTask shouldn't need to serialize an empty chunk just to copy coordinates.
I've made changes like this in other areas already in preparation for the day when chunks no longer contain their coordinates, so this brings us one step closer to that goal.
2020-12-03 20:52:33 +00:00
Dylan K. Taylor
0574b59df9
Network: fixed interfaces registered after raw packet handlers not respecting raw packet handler filters
2020-12-02 17:11:15 +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
6001f69d52
Network->registerInterface() now returns whether the registration succeeded or not
2020-12-02 16:16:04 +00:00
Dylan K. Taylor
541cfee615
RakLibServer: do not try to export exceptions across threads (they might contain Threaded objects whose references get invalidated)
2020-12-01 22:31:55 +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
1eabc3fe75
NetworkStackLatencyPacket: added named constructors
2020-11-30 21:29:51 +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
bc208e11f4
phpstan 0.12.57
2020-11-21 18:07:14 +00:00
Dylan K. Taylor
f2bdbb0c35
TypeConverter: fix using singleton to get its own context
...
I guess this must have been refactored from some other class?...
2020-11-20 21:31:06 +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
37299ab804
ChunkCache: explicitly check for requesting of unloaded chunk
...
NetworkSession will never do this, but other things might.
2020-11-16 19:45:46 +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
869c9dabf1
SetCommandsEnabledPacket: added ::create()
2020-11-16 19:11:10 +00:00
Dylan K. Taylor
ca6a892834
[ci skip] NetworkSession: added some extra TODOs
2020-11-16 19:10:27 +00:00
Dylan K. Taylor
0d9561c93f
Removed crafting data cache from CraftingManager
2020-11-12 21:30:59 +00:00
Dylan K. Taylor
c4d35d52e8
Do not store a pre-compressed cache for crafting data
...
this reduces bandwidth efficiency because it can't be compressed with everything else this way. If we want to cache stuff sent during the login sequence, it's better to stuff a bunch of stuff into a batch (e.g. crafting, creative, actor ids, biome defs) and pre-compress that as one big package instead.
2020-11-11 18:20:03 +00:00
Dylan K. Taylor
75f2f12b99
NetworkSession: rename some badly-named hooks
2020-11-10 15:01:48 +00:00
Dylan K. Taylor
e23379c34b
EncryptionContext: provide the packet ID in the exception message
2020-11-10 14:45:19 +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
e573226025
ItemStack: fixed phpstan failure
2020-11-09 19:10:02 +00:00
Dylan K. Taylor
2bcb398db9
ItemStack: added jsonSerialize
2020-11-09 19:05:00 +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
72ace3951e
InGamePacketHandler: fixed crafting table breaking when clicked while sneaking
2020-11-03 22:56:20 +00:00
Dylan K. Taylor
1f2bc8cb69
World: remove rogue import
2020-11-01 17:05:57 +00:00
Dylan K. Taylor
4549522289
Rename Chunk::getSubChunkChecked() -> getSubChunk()
2020-10-31 23:12:03 +00:00
Dylan K. Taylor
01001dca74
Use Chunk::getSubChunkChecked() in places where we know that an invalid coordinate cannot be requested
2020-10-31 22:48:41 +00:00
Dylan K. Taylor
4c0c2ebd24
CS cleanup
2020-10-26 15:56: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
03837c1b71
ZlibCompressor: use libdeflate if available
...
I may make libdeflate mandatory later on, but right now we haven't been able to ship it on all platforms yet.
2020-10-13 17:30:27 +01:00
Dylan K. Taylor
eabfd2a37b
World: replace sendBlocks() with createBlockUpdatePackets()
...
this allows the caller to decide how the packets should be sent.
2020-10-11 16:30:54 +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
15a2fd6e4f
LegacySkinAdapter: check return value of json_encode() for resource patch
2020-10-08 21:42:07 +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
01b44ab0bc
protocol: moved skin data types to their own namespace
2020-10-08 21:20:57 +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
d8ee657d20
MoveActorAbsolutePacket: added ::create() method
2020-10-06 18:34:38 +01:00
Dylan K. Taylor
69cad3e694
InGamePacketHandler: Ignore LevelSoundEventPacket completely
2020-10-06 18:26:57 +01:00
Dylan K. Taylor
d7f7e1c4ff
InventoryManager: remove useless repeated code
2020-10-06 18:14:46 +01:00