14567 Commits

Author SHA1 Message Date
Dylan K. Taylor
08420c2556
Added new dynamic StringToEnchantmentParser
this should be used instead of VanillaEnchantments::fromString(), because it allows registering custom aliases.
2021-11-08 18:44:15 +00:00
Dylan K. Taylor
18f5fb66bb
Abstract the base functionality of StringToItemParser 2021-11-08 18:37:05 +00:00
Dylan K. Taylor
a6f6b60bed
fix CS again 2021-11-08 18:02:24 +00:00
Dylan K. Taylor
c6c992a1f0
Preparations for negative Y support 2021-11-08 17:28:22 +00:00
Dylan K. Taylor
df39a1ca07
TeleportCommand: do not hardcode world bounds 2021-11-08 17:22:01 +00:00
Dylan K. Taylor
be6d1843de
Merge branch 'master' of github.com:pmmp/PocketMine-MP 2021-11-08 17:17:20 +00:00
Dylan K. Taylor
2b0b9bd8ed
Update composer dependencies 2021-11-08 17:16:57 +00:00
dependabot[bot]
76dad46e13
Bump phpstan/phpstan from 1.0.2 to 1.1.1 (#4560)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.0.2 to 1.1.1.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Commits](https://github.com/phpstan/phpstan/compare/1.0.2...1.1.1)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-08 13:36:06 +00:00
Dylan K. Taylor
eb3530b6e6
Use pmmp/setup-php-action to compile PHP 2021-11-07 23:13:56 +00:00
DataLion
4131bcef08
Changed "Level" string to "World" in Position::__toString() method. (#4559) 2021-11-07 21:11:55 +00:00
Dylan K. Taylor
b84f7c18ec
Install ext/crypto from PECL 2021-11-07 19:18:09 +00:00
Dylan K. Taylor
45edb94607
Crafting tables now work the same way as anvils and enchanting tables
Removing almost all special-case logic for crafting tables.
2021-11-07 16:20:07 +00:00
Dylan K. Taylor
6b316dc29a
PluginManager: Make declaration of duplicate permissions a load error 2021-11-06 17:05:37 +00:00
Dylan K. Taylor
d9d37f7fa6
ResourcePacksPacketHandler: fixed a mistake from c773e43eda0da159b181ef1c79f29a6c8986e697
fixes #4557

Note: you may need to clear your local pack cache in order to get it working again.
2021-11-06 16:45:14 +00:00
Dylan K. Taylor
4cb6c7dc1e
PluginManager: fixed plugins being able to alter groups of other plugins' permissions
this could happen if a plugin declared a permission already declared by another plugin, and then declared a different default for it (e.g. true instead of op).
2021-11-06 16:32:19 +00:00
Dylan K. Taylor
b392651354
pocketmine.yml: always refer to worlds as worlds in config comments, not levels 2021-11-06 02:22:14 +00:00
Dylan K. Taylor
f81c55ce6c
4.0.0-BETA12 is next 2021-11-06 01:17:03 +00:00
Dylan K. Taylor
002feacf8e
Release 4.0.0-BETA11 4.0.0-BETA11 2021-11-06 01:16:58 +00:00
Dylan K. Taylor
b8523f7a18
Player: fix the fix which just degraded performance
if a chunk was requested for generation, count++ and count(activeRequests)++, which means that we would only get to submit half as many generation requests as we're allowed to.
Calculate the limit at the start and remember it instead.
2021-11-06 01:00:35 +00:00
Dylan K. Taylor
640e88009b
Player: fixed a mistake in generation rate limit
we don't want to allow sending further chunks when we haven't generated near ones, because we won't be able to see them anyway, and we might end up not needing them.
This now fully matches the results of PM3.
2021-11-06 00:57:37 +00:00
Dylan K. Taylor
6cd272c9e1
Update transient composer dependencies 2021-11-06 00:55:13 +00:00
Dylan K. Taylor
566c57bcd3
we no longer need submodules for these jobs 2021-11-06 00:35:39 +00:00
Dylan K. Taylor
3c754b079c
Move resources/locale to Composer dependency
all remaining submodules are now non-essential to running a server.
They are also versioned and updates can be done automatically using 'composer update'.

Finally, we can also put an end to the issue of translations being rendered incorrectly or being missing due to outdated submodules.
2021-11-06 00:32:58 +00:00
Dylan K. Taylor
dbf9a33160
ChunkSelector: Improve algorithm to send chunks in proper circles, instead of squares
this ensures that the edge of loaded terain is always the same distance
away in any direction. This also means that when flying parallel to X or
Z axes, you now have about 12% more chunks directly in front of you,
instead of to your left and right, which gives the impression that
chunks are loading faster (they aren't, they are just being ordered in a
more sensible way).
2021-11-06 00:15:04 +00:00
Colin
07b1cff306
Bonemeal is no longer consumed when cancelling plant growth events (#4551) 2021-11-05 16:15:55 +00:00
Dylan K. Taylor
0989c77037
Player: check that horizontal distance travelled is > 0 before adding exhaustion, or triggering a new chunk order
closes #4548
2021-11-05 15:46:55 +00:00
Dylan K. Taylor
5107d0df4e
Player: cap maximum number of active generation requests
this fixes the horrible spotty chunk loading seen in https://twitter.com/dktapps/status/1456397007946461190?s=20.
In practice, this made chunks invisible on teleport for several tens of seconds after teleporting. Having a larger chunks-per-tick with large render distance compounded to worsen the problem.
It wasn't really noticeable on small render distances, but very obvious on large ones with fast chunk sending and slow generation.

This also fixes #4187 (at least to the extent that it works on PM3, anyway).
2021-11-05 15:09:42 +00:00
Dylan K. Taylor
579ef63663
EntityDataHelper: accept FloatTag for vector3 as well as Double
MCPE uses Float for entity positions.
2021-11-04 20:46:34 +00:00
Dylan K. Taylor
8abc952c74
simulate-chunk-selector: do not reallocate colours on every frame 2021-11-04 19:38:40 +00:00
Dylan K. Taylor
4c3a5fdd73
Clean PHPStan baselines from 1.0.2 2021-11-04 19:28:52 +00:00
Dylan K. Taylor
54f287feb6
Merge branch 'stable' 2021-11-04 19:27:41 +00:00
Dylan K. Taylor
84f8b3eb2d
Move CrashDump to pocketmine\crash namespace 2021-11-04 19:23:45 +00:00
Dylan K. Taylor
15fca84f3b
remove some PHPStan error patterns 2021-11-04 19:22:49 +00:00
Dylan K. Taylor
c60144210f
Regenerate PHPStan bugs baseline 2021-11-04 19:18:29 +00:00
Dylan K. Taylor
8ac999cbd4
Use object models for crashdump generation 2021-11-04 16:55:04 +00:00
Dylan K. Taylor
4f8501ff34
Added a tool to visualise behaviour of ChunkSelector
I actually intended to write a tool for debugging generation, but it turns out this, as an intermediary step, is also useful and a whole bunch of fun to play with.
2021-11-04 14:14:55 +00:00
Dylan K. Taylor
2405e45b35
Player: mark as not using item when held item slot is changed
closes #4538
2021-11-03 21:26:20 +00:00
Dylan K. Taylor
e0b07ff308
Human: do not add more XP if totalXp limit was already reached
this matches the vanilla behaviour. For some reason it doesn't consider levels (so you can have a level higher or lower than this without actually having that amount of XP), but this matches Java behaviour as of 1.10.

fixes #4543
2021-11-03 20:45:55 +00:00
Dylan K. Taylor
729f831b8f
PHPStan 1.0.2 2021-11-03 20:26:32 +00:00
Dylan K. Taylor
0356716e8e
PopulationTask: do not expose internal fields as public
this code dates back to pthreads v2, when visibility on Threaded object fields meant different things (wtf, krakjoe??)
2021-11-03 15:23:43 +00:00
Dylan K. Taylor
5c81b04813
PopulationTask: use typed properties 2021-11-03 15:22:49 +00:00
Dylan K. Taylor
1ebb206762
World: fixed yet another edge case in drainPopulationRequestQueue() leading to assertion failure
really had to go fucking nuclear on it :(
2021-11-03 14:58:58 +00:00
dependabot[bot]
29e2d92098
Bump phpstan/phpstan from 1.0.0 to 1.0.1 (#4541)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Commits](https://github.com/phpstan/phpstan/compare/1.0.0...1.0.1)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-03 11:27:42 +00:00
Dylan K. Taylor
ef82a2cd79
Fixed PlayerEmoteEvent::setEmoteId() being useless 2021-11-02 23:10:26 +00:00
Dylan K. Taylor
87031627bf
Do not call PlayerEmoteEvent if rate limit was reached 2021-11-02 23:09:43 +00:00
Hashim
f066199971
Implement emote support (#4523) 2021-11-02 23:04:55 +00:00
Dylan K. Taylor
a0e9eec652
4.0.0-BETA11 is next 2021-11-02 19:18:20 +00:00
Dylan K. Taylor
fa6a432d58
Release 4.0.0-BETA10 4.0.0-BETA10 2021-11-02 19:18:19 +00:00
Dylan K. Taylor
102277c636
draft-release: fixed BedrockData JSON minification 2021-11-02 19:16:36 +00:00
Dylan K. Taylor
f50f26d52e
4.0.0-BETA10 is next 2021-11-02 19:14:15 +00:00