12469 Commits

Author SHA1 Message Date
Dylan K. Taylor
e11dbf03e2 Process: apply native typehint to kill() 2020-10-09 18:06:33 +01:00
Dylan K. Taylor
40fca0936f Internet: make getURL() and postURL() return InternetRequestResult objects
this reduces the amount of reference parameters, and generally reduces the number of parameters, while guaranteeing consistency of the APIs.
2020-10-09 18:03:20 +01:00
Dylan K. Taylor
15cd354b98 fixed phpstan run again 2020-10-08 21:58:22 +01:00
Dylan K. Taylor
a91710b199 Fixed player knockback not working since 531c6344fe6bd920ef2b6639b7ff649cfe8bf11c
player knockback silently depended on the chunk packet broadcast system sending the player's motion back to itself, which broadcasting to hasSpawned will not do.
2020-10-08 21:56:08 +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
df7bafe2bc TileFactory: fixed missing Beacon tile registration
I had this locally but forgot to commit it ...
2020-10-07 15:16:27 +01:00
Dylan K. Taylor
cbc6ebebad Entity: make use of MoveActorAbsolutePacket::create() 2020-10-06 18:35:02 +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
531c6344fe Entity: stop using broadcastPacketToViewers for movement / motion
this is now effectively identical to sending packets to each of hasSpawned, with the exception that it won't send packets to itself if it's a player.
2020-10-06 18:22:46 +01:00
Dylan K. Taylor
d7f7e1c4ff InventoryManager: remove useless repeated code 2020-10-06 18:14:46 +01:00
Dylan K. Taylor
cc3947058a updated phpstan baseline 2020-10-06 18:11:13 +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
Dylan K. Taylor
945a2598b7 Player: fix documented type of kick $quitMessage 2020-10-06 17:55:32 +01:00
Dylan K. Taylor
49d611168f Player: fix documented type of disconnect $quitMessage 2020-10-06 17:54:44 +01:00
Dylan K. Taylor
b172c93e45 World: do not group broadcasted packets by chunk, broadcast directly instead
Grouping packets to batch by chunk instead of by player reduces bandwidth efficiency, because the number of active chunks is almost always larger than the number of active players.
With the old mechanism, a batch of packets for each active chunk (which could be dozens, or hundreds... or thousands) would be created once, and then sent to many players. This makes the compression load factor O(nActiveChunks). Broadcasting directly is simpler and changes the load factor to O(nActivePlayers), which usually means a smaller number of larger batches are created, achieving better compression ratios for approximately the same cost (the same amount of data is being compressed, just in a different way).
2020-10-06 17:27:17 +01:00
Dylan K. Taylor
78bddac823 Player: remove removeFormat, chat formatting is now unconditionally available
This change was made after exploring turning this into a permission. It occurred to me that this feature is entirely superfluous because it's non-vanilla, can be done by plugins, and is usually considered as a bug. In addition, disabling this behaviour required third party code just for this one thing because it was not able to be managed by a permissions plugin.
Instead, it's better to produce a plugin which implements this behaviour if it's desired, by making use of SignChangeEvent and PlayerChatEvent/PlayerCommandPreprocessEvent.

close #3856, close #2288
2020-10-06 14:00:23 +01:00
Dylan K. Taylor
e39d2c4621 Beacon: fixed crash in PC worlds 2020-10-06 13:40:49 +01:00
Dylan K. Taylor
dfee8b7fa5 Added SignLikeRotationTrait 2020-10-04 21:09:45 +01:00
Dylan K. Taylor
fc1084d65c Sponge: fixed wet/dry state not persisting in inventory 2020-10-04 19:42:29 +01:00
Dylan K. Taylor
309d23acfb regenerated blockfactory consistency check 2020-10-04 19:12:36 +01:00
Dylan K. Taylor
6fb45de405 fixed phpstan baseline 2020-10-04 19:12:04 +01:00
Dylan K. Taylor
7f9c4355f0 Revert back to floor/wall banner variants
this code largely duplicates the same code in FloorSign/WallSign and needs to be de-duplicated.
2020-10-04 19:05:43 +01:00
Dylan K. Taylor
505d4e402f ItemFactory: do not reuse the same itemstack instance for air()
this is mutable, so it's possible for plugins to mess with it and break everything that references it.
2020-10-04 18:36:46 +01:00
Dylan K. Taylor
c42a6d7552 ItemBlock no longer depends on legacy ID/metadata 2020-10-04 18:27:20 +01:00
Dylan K. Taylor
7ef794d725 imports cleanup 2020-10-04 18:22:07 +01:00
Dylan K. Taylor
d3a3a41d2b Revert back to separated floor/wall sign
the conditionally useless properties are problematic.
2020-10-04 17:52:23 +01:00
Dylan K. Taylor
e6bf7278fc Sign: remove obsolete clone hook
this is no longer required because SignText is not mutable anymore.
2020-10-04 17:24:40 +01:00
Dylan K. Taylor
388a19ef5d Persistent block metadata may now have mutable parts
Not allowing this makes stuff like anvil damage, colour, wood type, live/dead bit, wet/dry etc all too much hassle to deal with.
Naturally I want to get rid of this shit altogether, but first it's necessary to construct a new system that we can shift into before all this bullshit can be addressed fully, so for now we have to work within the bounds of the old system.
This change will permit dynamic colours for concrete/concrete powder etc, dynamic wood types where the wood type isn't embedded in the legacy ID, and so forth. Allowing full flexibility requires either more old system hacks or completing the migration to a new system which doesn't have these limitations. I prefer to do the latter, but this change will make it somewhat easier to do.
2020-10-04 11:40:05 +01:00
Dylan K. Taylor
9191e75392 LevelDB: quick and dirty hack for air with bad metadata
this needs a proper solution, but this is a pressing issue that can't wait.
2020-10-03 16:41:26 +01:00
Dylan T
d0213f99ac
MountainsBiome: fix error from stale PR merge 2020-10-02 12:24:18 +01:00
IceCruelStuff
a77970448e
Emerald ore in Mountains biome (#3750) 2020-10-02 12:07:49 +01:00
Dylan K. Taylor
e17629244c Merge branch 'master' of https://github.com/pmmp/pocketmine-mp into master 2020-10-02 01:00:21 +01:00
Dylan K. Taylor
5807a385cc Added stub classes for Beacon
this doesn't do anything yet, it's intended solely to prevent further loss of data.
2020-10-02 00:59:53 +01:00
Tayyab R
6734dcc79f
Introduce PlayerDisplayNameChangeEvent (listen only) (#3847) 2020-10-01 22:23:02 +01:00
Dylan K. Taylor
7a436dc47c updated blockfactory consistency check 2020-10-01 22:10:02 +01:00
Dylan K. Taylor
4492c80af1 Merge remote-tracking branch 'origin/stable' into master
# Conflicts:
#	composer.lock
#	resources/vanilla
2020-10-01 22:08:27 +01:00
Dylan K. Taylor
201bdc069c phpstan 0.12.47 2020-10-01 22:07:43 +01:00
Dylan T
8db7867881
travis: notify about build results 2020-10-01 22:05:12 +01:00
Dylan K. Taylor
84feec954f BlockLegacyMetadata: Added constants for mushroom block variants 2020-10-01 21:41:46 +01:00
Dylan K. Taylor
14c156b162 Added ChemicalHeat block stub 2020-10-01 14:46:14 +01:00
dependabot-preview[bot]
d8f8afe531
Bump phpstan/phpstan from 0.12.46 to 0.12.47 (#3844) 2020-09-30 10:51:33 +00:00
dependabot-preview[bot]
7dabf305f8
Bump phpstan/phpstan from 0.12.44 to 0.12.46 (#3841) 2020-09-29 07:01:51 +00:00
Dylan K. Taylor
12087c9850 Wall: use facing as value as well as key in connections 2020-09-26 17:41:00 +01:00
Dylan K. Taylor
9e3ff21aea Wall: remove unused import 2020-09-26 17:26:54 +01:00
Dylan K. Taylor
ec7c5fd669 Added a BrewingStandSlot enum 2020-09-26 17:20:02 +01:00
Dylan K. Taylor
e192c75019 MemoryManager: Analyze contents of function/method static variables
it's possible for stuff to hide inside these things that would cause leaks.
2020-09-26 15:18:34 +01:00