8584 Commits

Author SHA1 Message Date
Dylan K. Taylor
9d26a224a2 DoublePlant: add flammability info, closes #2465 2020-05-31 17:04:50 +01:00
Dylan K. Taylor
c4ad390463 pocketmine.yml: raise default population-queue-size to 32
the old limit was made in the php5 days when performance was far worse and it was much more costly to generate chunks that weren't needed. Now it's significantly less and having a higher limit allows terrain to be sent more quickly in new worlds and to fast-moving players.
This limit really ought to go away completely but considering the technical barriers in the way it'll have to stay for now.
2020-05-31 16:58:53 +01:00
Dylan K. Taylor
42e14f749e Do not blanket-ban all inventory transactions in spectator mode, fixes #2627
instead, we cancel the appropriate events before they are called, so that plugins can uncancel them if they choose.
2020-05-31 16:32:06 +01:00
Dylan K. Taylor
484557935e Level: remove dead block placement code (player movements are now always processed immediately, just not immediately broadcasted) 2020-05-31 16:06:48 +01:00
Dylan T
485f573955
Player: remove move buffering, implement simple rate limited movement… (#3167)
Introduction
This PR is a second attempt at improving movement processing to fix #1215 , #2730 and more.

This is significantly less complex than the previous attempt #2646 -- it gets rid of the movement buffering system entirely and instead relies on a simple rate limit counter to restrict on-the-fly movement processing.

Movement is rate limited to a max average of 2 per tick. It allows up to 5 seconds' backlog to accommodate network lag. The rate limit counter is increased by 2 per tick and decreased once for every movement processed. This prevents movement processing being abused for denial of service attacks.

Changes
API changes
This PR, while obviously highly beneficial for most current users, poses some BC-breaking issues because of changes to the internal Player API.

Player->processMovement() (protected) has been removed. This is a BC concern for custom player classes which overrode it and called it as a parent. In addition, child implementations won't be called every tick any more, which could break some custom movement processing systems.
Player->newPosition (protected) has been removed. This internal field may have been accessed by custom movement implementations.
Player->isTeleporting (protected) has been removed. BC concern is same as previous point.
Player->getNextPosition() (public) has been @deprecated.
Added the following protected Player class members:
int $moveRateLimit
?Vector3 $forceMoveSync
handleMovement()
processMostRecentMovements()
revertMovement()
Behavioural changes
Player movement is now subject to less rubberbanding and has more reliable behaviour.
2020-05-31 15:51:30 +01:00
Dylan K. Taylor
71e0521286 Merge branch 'stable' into next-minor
# Conflicts:
#	composer.lock
2020-05-31 14:43:53 +01:00
Govdim
c3a795e876
Fix walk sounds (#3492)
Co-authored-by: Govdim <govdim.govorek@gmail.com>
2020-05-24 14:03:14 +01:00
Muqsit Rayyan
4199c3796f
Water: Remove duplicate call to Entity->resetFallDistance() (#3524)
It's not clear what the intended goal of this code was, but the duplicate call is obviously useless.
2020-05-24 14:00:19 +01:00
Dylan K. Taylor
ecbf21acea Utils: added OS constants, remove hardcoded OS strings everywhere 2020-05-23 11:05:58 +01:00
XenialDan
45c89d084c TimeCommand: add time aliases "noon", "sunset", "midnight", "sunrise"
closes #3508
2020-05-20 20:42:21 +01:00
Dylan K. Taylor
56f90a2901 Merge branch 'stable' into next-minor 2020-05-20 20:05:00 +01:00
Dylan K. Taylor
bf6af269c8 StartGamePacket: use PUBLIC visibility by default 2020-05-20 20:04:39 +01:00
Dylan K. Taylor
73d1f84072 Merge branch 'stable' into next-minor 2020-05-20 19:36:20 +01:00
Dylan K. Taylor
a29424f5b3 UIProfile: name constants as they appear in the MC user-facing settings
I think these names are stupid, but it'll be easier for people to figure out what they refer to if they match the client-sided naming.
2020-05-20 15:06:50 +01:00
Dylan K. Taylor
ff3af492f8 Random: remove multiline formatting in nextSignedInt()
I'm sick to death of formatting tools messing with this...
2020-05-20 14:34:29 +01:00
Dylan K. Taylor
80b804f7aa automated imports cleanup 2020-05-20 14:31:31 +01:00
Dylan K. Taylor
3a78735982 added UIProfile protocol constants
these are only used in the LoginPacket, but plugin devs will probably find them useful anyway
2020-05-20 14:27:50 +01:00
Dylan K. Taylor
ab32784c74 UpdateBlockSyncedPacket: remove default values for fields 2020-05-20 13:58:36 +01:00
Dylan K. Taylor
816234a379 UpdateBlockSyncedPacket: populate missing information for second field 2020-05-20 13:57:08 +01:00
Dylan K. Taylor
b7bf92a5e9 SimpleEventPacket: added missing type constant 2020-05-20 13:50:43 +01:00
Dylan K. Taylor
dcca000ead PlayerActionPacket: added missing constant 2020-05-20 13:44:52 +01:00
Dylan K. Taylor
c4ea51f985 NpcRequestPacket: added request type constants 2020-05-20 13:42:40 +01:00
Dylan K. Taylor
8202bb1cd8 MoveActorAbsolutePacket: added missing flag 2020-05-20 13:39:56 +01:00
Dylan K. Taylor
b75758e35e MoveActorDeltaPacket: added missing flags 2020-05-20 13:39:37 +01:00
Dylan K. Taylor
38a06f76f8 LoginPacket: remove unused constant 2020-05-20 13:15:43 +01:00
Dylan K. Taylor
84f99ed418 CommandOriginData: Rename previously unknown field 2020-05-20 13:00:03 +01:00
Dylan K. Taylor
fd63f19199 make use of new GameRuleType constants 2020-05-20 12:35:29 +01:00
Dylan K. Taylor
66d44aa814 added GameRuleType protocol constants 2020-05-20 12:35:07 +01:00
Dylan K. Taylor
f3089f577e StartGamePacket: use new protocol constants for multiplayer visibility 2020-05-20 12:22:33 +01:00
Dylan K. Taylor
9516ef1632 added GamePublishSetting protocol constants 2020-05-20 12:22:12 +01:00
Dylan K. Taylor
e982a57cb5 StartGamePacket: use EducationEditionOffer constants 2020-05-20 12:08:56 +01:00
Dylan K. Taylor
f57fa2252b added EducationEditionOffer protocol constants 2020-05-20 12:08:36 +01:00
Dylan K. Taylor
02cc370855 StartGamePacket: use GeneratorType constants 2020-05-20 12:05:41 +01:00
Dylan K. Taylor
0a5d14a840 added GeneratorType protocol constants 2020-05-20 12:05:41 +01:00
Dylan K. Taylor
3ec2994d7f added protocol GameMode constants 2020-05-20 11:53:35 +01:00
Dylan K. Taylor
da4a2d8552 Fixed a bunch of missed Position->getLevel() usages
these were not in the usage search because PhpStorm decided to refer to ChunkLoader->getLevel() for any Player references, which caused them to only show when that was searched.

There's also an undetected LSP violation with ChunkLoader because it requires returning Level and Position->getLevel() returns Level|null. I don't know why PHPStan doesn't complain about that.
2020-05-19 21:01:18 +01:00
Dylan K. Taylor
dc9351b024 Merge remote-tracking branch 'origin/stable' into next-minor 2020-05-19 11:26:25 +01:00
SOFe
786f416f2e
Improved support for paths with backslashes on Unix filesystems (#3501)
Fixes #3497
2020-05-19 10:34:51 +01:00
Drew
a67d2ae978
parity: burning players no longer shoot burning arrows (#3509)
this behaviour doesn't exist in vanilla.
2020-05-19 10:31:39 +01:00
Drew
089180fef4
Players no longer burn when hit by other players, closes #3170 (#3470) 2020-05-18 21:13:56 +01:00
Dylan K. Taylor
22b5de09b4 added colours to EnchantParticle and InstantEnchantParticle, closes #3368 2020-05-18 20:00:51 +01:00
Dylan K. Taylor
a5edfa368e Merge branch 'stable' into next-minor 2020-05-18 10:25:25 +01:00
Dylan K. Taylor
27f55e4c96 3.12.3 is next 2020-05-18 10:17:08 +01:00
Dylan K. Taylor
9b6b3f50a1 Release 3.12.2 2020-05-18 10:17:02 +01:00
Dylan K. Taylor
9ebd6d6b0f Timezone: remove rogue newline 2020-05-17 14:03:22 +01:00
XenialDan
58e32086c0
Level: Updated TIME_* constants (#3385)
- Added Level::TIME_NOON
- Added Level::TIME_MIDNIGHT
- Changed values of Level::TIME_DAY and Level::TIME_NIGHT
2020-05-17 10:10:35 +01:00
Dylan K. Taylor
8c0d441a13 Merge branch 'stable' into next-minor 2020-05-17 10:03:17 +01:00
Wumpotamus
25fb5140a2 Merge #3456: Added protocol DeviceOS constants
close #3456

since this is a protocol addition and not API, this belongs on stable so
that protocol changes can consistently use it without worrying about
branch compatibility.
2020-05-17 09:57:39 +01:00
Dylan K. Taylor
f5a49b6d55 LightUpdate: improve quality of property type info 2020-05-17 09:33:18 +01:00
Muqsit Rayyan
189f12a644
PermissionManager: fix timings not being stopped for default calculation (#3502) 2020-05-17 08:55:11 +01:00