58ba4f680f
Release 4.0.7
2022-01-21 19:39:30 +00:00
8c5cc67e07
Updated baseline
2022-01-21 19:38:59 +00:00
ab8b24bcd2
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into stable
2022-01-21 19:15:59 +00:00
94c4f58667
Fixed bogus test
2022-01-21 19:13:36 +00:00
c10eda5eae
InGamePacketHandler: limit depth of form responses to 2
...
form responses should only contain string|int|float|bool|null. Arrays or objects appearing in here are likely malicious.
2022-01-21 19:11:58 +00:00
ed312863a7
ignore phpstan bug
2022-01-21 18:43:53 +00:00
387c13beff
InGamePacketHandler: fixed invalid JSON being treated as form close
2022-01-21 18:32:58 +00:00
56fe71d939
InGamePacketHandler: fixed crash in form handling when invalid JSON is given
2022-01-21 17:34:13 +00:00
73d8c87b76
Bump phpunit/phpunit from 9.5.11 to 9.5.12 ( #4748 )
...
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit ) from 9.5.11 to 9.5.12.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases )
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md )
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.11...9.5.12 )
---
updated-dependencies:
- dependency-name: phpunit/phpunit
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>
2022-01-21 14:53:03 +00:00
061d851fbd
World: do not update entities which have been flagged for despawn
...
fixes #4718
2022-01-20 16:27:21 +00:00
a67aef0477
PlayerInteractEvent: updated documentation
2022-01-20 16:10:37 +00:00
858024afb7
Remove useless docs noticed by php-cs-fixer 3.5
2022-01-18 00:24:12 +00:00
eaaf00ca2b
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into stable
2022-01-18 00:23:39 +00:00
f1723acfd3
UnsafeForeachArrayOfStringRule: use statically analysable function reference
...
this will ensure that it get automatically updated during refactors.
2022-01-18 00:23:29 +00:00
8da27ea0aa
UnsafeForeachArrayOfStringRule: fixed outdated function name
2022-01-18 00:15:44 +00:00
388622d55d
Bump pocketmine/locale-data from 2.3.0 to 2.3.33 ( #4735 )
...
Bumps [pocketmine/locale-data](https://github.com/pmmp/Language ) from 2.3.0 to 2.3.33.
- [Release notes](https://github.com/pmmp/Language/releases )
- [Commits](https://github.com/pmmp/Language/compare/2.3.0...2.3.33 )
---
updated-dependencies:
- dependency-name: pocketmine/locale-data
dependency-type: direct:production
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>
2022-01-17 20:46:38 +00:00
9f4fcfafdb
Fixed some incorrect block breaking times ( #4723 )
2022-01-16 20:57:16 +00:00
6679c53e56
BrewingStand: fixed collision box
2022-01-15 16:41:27 +00:00
9d061e86af
4.0.7 is next
2022-01-13 21:46:30 +00:00
f7d25f251e
Release 4.0.6
2022-01-13 21:46:30 +00:00
0ccb47fb07
make-release: trap more errors
2022-01-13 21:46:06 +00:00
0973472842
actions: bump to 8.0.14
2022-01-13 21:23:23 +00:00
f126479c37
InGamePacketHandler: check the validity of facing values given by the client
2022-01-13 21:21:15 +00:00
d34f4b28b3
Bump pocketmine/binaryutils from 0.2.3 to 0.2.4 ( #4726 )
...
Bumps [pocketmine/binaryutils](https://github.com/pmmp/BinaryUtils ) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/pmmp/BinaryUtils/releases )
- [Commits](https://github.com/pmmp/BinaryUtils/compare/0.2.3...0.2.4 )
---
updated-dependencies:
- dependency-name: pocketmine/binaryutils
dependency-type: direct:production
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>
2022-01-13 14:21:32 +00:00
8a65fd273a
Updated RakLib to 0.14.3
2022-01-10 22:29:38 +00:00
248cc0ef49
actions: colorize diff output on CS failure
2022-01-10 22:06:07 +00:00
d1726aa20c
CS: use fully_qualified_strict_types
2022-01-10 21:41:56 +00:00
58e1e7bd6f
Worker: fixed missing AsyncTask import for documentation ( #4719 )
...
OCD from f5c9c02e09
2022-01-10 15:12:37 +00:00
0a5b146189
substr() returns an empty string instead of false in 8.0
...
an empty string will pass through preg_match_all() without any harmful effects, so we don't need to check for it.
2022-01-07 22:38:00 +00:00
b4e1871899
Updated PHPStan baseline
2022-01-07 21:49:49 +00:00
78eaa0993d
Merge branch 'legacy/pm3' into stable
2022-01-07 21:48:28 +00:00
bee2aba813
Updated PHPStan baseline
2022-01-07 21:46:35 +00:00
af81f80cf3
Updated PHPStan
2022-01-07 21:45:35 +00:00
43c5d08042
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into stable
2022-01-07 20:15:30 +00:00
6d249026cc
Merge branch 'legacy/pm3' into stable
2022-01-07 20:15:15 +00:00
ed2145b6a4
php-cs-fixer: enforce EOF newlines
2022-01-07 20:12:21 +00:00
3e6c157217
Bump phpstan/phpstan from 1.3.1 to 1.3.3 ( #4712 )
...
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan ) from 1.3.1 to 1.3.3.
- [Release notes](https://github.com/phpstan/phpstan/releases )
- [Changelog](https://github.com/phpstan/phpstan/blob/master/CHANGELOG.md )
- [Commits](https://github.com/phpstan/phpstan/compare/1.3.1...1.3.3 )
---
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>
2022-01-07 15:20:33 +00:00
86beeb8255
readme: update badge links
...
[ci skip]
2022-01-06 17:11:03 +00:00
230a3c9839
Bump phpstan/phpstan from 1.2.0 to 1.3.1 ( #4702 )
...
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan ) from 1.2.0 to 1.3.1.
- [Release notes](https://github.com/phpstan/phpstan/releases )
- [Changelog](https://github.com/phpstan/phpstan/blob/master/CHANGELOG.md )
- [Commits](https://github.com/phpstan/phpstan/compare/1.2.0...1.3.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>
2022-01-05 13:49:29 +00:00
35f205b476
4.0.6 is next
2022-01-04 20:51:37 +00:00
e7d17eb4d3
Release 4.0.5
2022-01-04 20:51:36 +00:00
73168a0e39
Merge branch 'legacy/pm3' into stable
2022-01-04 20:49:32 +00:00
e8893dd91f
3.26.6 is next
2022-01-04 20:47:31 +00:00
a4af1609ea
Release 3.26.5
2022-01-04 20:47:31 +00:00
8c4b8a9042
CS
2022-01-04 20:44:10 +00:00
6492cac5c1
Merge pull request from GHSA-c6fg-99pr-25m9
2022-01-04 20:40:55 +00:00
958a9dbf0f
Merge pull request from GHSA-c6fg-99pr-25m9
...
* Skin: impose length limits on skinID, geometryName and geometryData fields
* Skin: remove extra newline
2022-01-04 20:40:55 +00:00
3ed57ce49a
Merge pull request from GHSA-p62j-hrxm-xcxf
...
This checks the following things:
- Validity of UTF-8 encoding of title, author, and page content
- Maximum soft and hard lengths of title, author, and page content (soft
limits may be bypassed by uncancelling PlayerEditBookEvent; hard
limits may not be bypassed)
- Maximum number of pages. Books with more than 50 pages may still be
edited, but may not have new pages added.
2022-01-04 20:39:02 +00:00
68f3399cfd
Merge pull request from GHSA-p62j-hrxm-xcxf
...
This checks the following things:
- Validity of UTF-8 encoding of title, author, and page content
- Maximum soft and hard lengths of title, author, and page content (soft
limits may be bypassed by uncancelling PlayerEditBookEvent; hard
limits may not be bypassed)
- Maximum number of pages. Books with more than 50 pages may still be
edited, but may not have new pages added.
2022-01-04 20:39:02 +00:00
aeab19a616
Fixed world spawn point not updating to players ( #4699 )
...
closes #4383
2022-01-04 20:31:27 +00:00
7bee72ef2d
Use ~ instead of ^ for constraints on BedrockData and BedrockProtocol
...
I got these two mixed up - they are exactly the opposite of what I thought. ~ is the stricter operator.
2022-01-04 00:54:09 +00:00
0d595e4324
Update Language dependency
2022-01-04 00:47:04 +00:00
e43e0189df
InGamePacketHandler: do not pass bare integers from BookEditPacket directly into event
...
while these currently happen to be identical, they may not be in the future.
Really this should be represented by an enum.
2022-01-03 20:20:32 +00:00
decd1da2d0
BaseSign: remove dead TODO comment
2022-01-03 19:33:03 +00:00
bcc0f1e733
Fixed desynchronization of hunger when cancelling food-related events ( #4691 )
2022-01-03 19:11:32 +00:00
f62cfe8ae3
4.0.5 is next
2022-01-01 16:50:03 +00:00
b903e90dc2
Release 4.0.4
2022-01-01 16:50:02 +00:00
c8247786d7
Player: check chat length check with strlen() before mb_strlen()
...
mb_strlen() is O(n), whereas strlen() is O(1). If we receive very large chat messages (e.g. 2 MB), mb_strlen() will take a very long time to return a result (around 8ms on my machine).
Since the max size of a UTF-8 character is 4 bytes (according to standard), we can use strlen() with 4x the char limit to gate it and prevent this from happening.
2022-01-01 16:46:00 +00:00
f486b5f4a7
Player: fixed fall damage when sprinting down stairs ( #4685 )
...
Due to the way positions are updated over the network, we only see the end result of a movement and not its preceding actions. In addition, we don't know for sure whether the MCPE collision checks work the same exact way as PM.
TL;DR: It's possible for the client to capture and send a movement frame after they collided with a step and then already moved forward from it some distance, resulting in a weird arc pattern.
This PR checks the range between the old and new positions for collision boxes to ensure that all possible areas are checked for detecting fall damage.
This has been tested and successfully resolves various issues involving running down stairs:
- missing sounds
- random fall damage
2022-01-01 15:41:19 +00:00
54d6b83fc2
Entity: pass the appropriate value for AFFECTED_BY_GRAVITY
2022-01-01 15:39:46 +00:00
eedea38669
Improve performance of loading player inventories
2022-01-01 15:26:42 +00:00
3c6146b5e0
ContainerTrait: avoid absurdly inefficient use of setItem()
...
this substantially improves the performance of loading containers such as chests.
2022-01-01 15:05:32 +00:00
72f2c794ab
SimpleInventory: improved performance of setContents()
...
avoid the overhead incurred by clear() and setItem(), because in internalSetContents(), we already have no listeners or viewers to talk to anyway, so this is just spamming shit into /dev/null.
2021-12-31 18:32:19 +00:00
38b6b39cb3
Filesystem: workaround a stupid Windows issue in safeFilePutContents()
...
occasionally Windows will randomly decide to deny us access to rename the file for no reason whatsoever. If this happens, we attempt an old-style copy and delete.
If the rename failed for a legit reason, the copy and delete should also fail and generate an error message. If it was Windows being a spaz, it should work normally without errors.
2021-12-29 15:26:34 +00:00
fcc4757209
Merge branch 'legacy/pm3' into stable
2021-12-27 21:54:56 +00:00
d9c70cb176
start.cmd: prevent idiotic behaviour when paths contain characters such as brackets
...
god I hate this shit so much
2021-12-27 21:54:32 +00:00
4aab0565c0
ChunkCache: fixed corner case in cache restart on AsyncTask error
...
the cache may have been destroyed since the task inception, leading to an exception being thrown.
2021-12-27 18:11:55 +00:00
8943d8a2a7
Player: fixed maximum message size limits to match vanilla bugrock
2021-12-27 16:51:47 +00:00
0da29beb1d
Bump pocketmine/locale-data from 2.2.0 to 2.2.1 ( #4667 )
...
Bumps [pocketmine/locale-data](https://github.com/pmmp/Language ) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/pmmp/Language/releases )
- [Commits](https://github.com/pmmp/Language/compare/2.2.0...2.2.1 )
---
updated-dependencies:
- dependency-name: pocketmine/locale-data
dependency-type: direct:production
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-12-27 16:43:32 +00:00
157048264c
Bump phpunit/phpunit from 9.5.10 to 9.5.11 ( #4675 )
...
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit ) from 9.5.10 to 9.5.11.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases )
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md )
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.10...9.5.11 )
---
updated-dependencies:
- dependency-name: phpunit/phpunit
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-12-27 16:43:19 +00:00
b55aa78aec
Changelog: Replaced non-existent method ( #4676 )
2021-12-27 15:33:02 +00:00
091673d8f1
Fixed "You can only sleep at night" message ( #4671 )
2021-12-23 23:52:07 +00:00
e3614d1a82
Entity: fixed game performance issue with large scale entities
...
this->size refers to the scaled height, but the client wants the base (unscaled) size in these properties.
This caused immense lag when, for example, setting the scale of a player to 10, because their collision box would become 180 by 60, instead of the expected 18 by 6.
2021-12-18 22:38:45 +00:00
93caf72f34
KickCommand: Add missing space
...
closes #4660
closes #4661
2021-12-17 21:09:14 +00:00
e6e1bca676
4.0.4 is next
2021-12-16 01:35:43 +00:00
795ebd1824
Release 4.0.3
2021-12-16 01:35:42 +00:00
5f03887b47
Merge branch 'legacy/pm3' into stable
2021-12-16 01:34:10 +00:00
9979a64ad2
3.26.5 is next
2021-12-16 01:23:22 +00:00
75a72786f9
Release 3.26.4
2021-12-16 01:23:21 +00:00
3d205c6e5f
Updated transient dependency junk
2021-12-16 01:20:05 +00:00
2955a92837
Updated pocketmine/nbt to 0.2.19
2021-12-16 01:19:30 +00:00
e70f81a111
Updated pocketmine/nbt to 0.3.2
2021-12-16 01:08:23 +00:00
57e1509c3a
Updated translation APIs
2021-12-15 03:24:13 +00:00
0da1810aaa
Updated composer dependencies
2021-12-15 03:12:26 +00:00
4d37b79ff7
Server: fixed not being able to deop players whose names were added to ops.txt with uppercase letters in them
...
same as iTXTech/Genisys#1204
why didn't anyone report this???
2021-12-15 01:08:59 +00:00
ea1fceece2
Merge branch 'legacy/pm3' into stable
2021-12-14 23:15:53 +00:00
7fb1669c6d
php-cs-fixer: added binary_operator_spaces and unary_operator_spaces rules
2021-12-14 23:14:39 +00:00
929abb04be
Merge branch 'legacy/pm3' into stable
2021-12-14 22:54:17 +00:00
a09817864b
php-cs-fixer: add return_type_declaration space_before
2021-12-14 22:50:43 +00:00
45c4a9673d
Player: fixed arm swing animation not showing during attack cooldown of victim
...
closes #4650
2021-12-14 19:03:42 +00:00
4ad8cb02a5
BlockIdentifier: ensure that the tile class given is valid
2021-12-14 17:36:25 +00:00
7e6bbcc393
Sync composer deps
2021-12-14 01:27:11 +00:00
c334e6dec7
Updated locale-data dependency
2021-12-14 00:31:44 +00:00
89a766b799
Bump fgrosse/phpasn1 from 2.3.1 to 2.4.0 ( #4644 )
...
Bumps [fgrosse/phpasn1](https://github.com/fgrosse/PHPASN1 ) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/fgrosse/PHPASN1/releases )
- [Changelog](https://github.com/fgrosse/PHPASN1/blob/master/CHANGELOG.md )
- [Commits](https://github.com/fgrosse/PHPASN1/compare/v2.3.1...v2.4.0 )
---
updated-dependencies:
- dependency-name: fgrosse/phpasn1
dependency-type: direct:production
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-12-13 21:39:44 +00:00
7e99e5167c
Merge branch 'legacy/pm3' into stable
2021-12-13 12:36:26 +00:00
f5bbd30dbb
Fixed skins appearing black when using RTX resource packs, closes #4537
2021-12-13 12:35:55 +00:00
3be8472ae2
MemoryManager: fixed dumping of uninitialized properties
...
closes #4643
2021-12-13 12:11:49 +00:00
22bb1ce8e0
4.0.3 is next
2021-12-12 23:27:54 +00:00
178dcb71a9
Release 4.0.2
2021-12-12 23:27:50 +00:00
0a58fd5472
GeneratorManager: fixed addGenerator() being case-sensitive when overwrite=true
...
this was caused by 083a1e1ff6 .
This was discovered by a new PHPStan rule I'm working on, which disallows overwriting the values of parameter variables. During the refactor of this function to correct the error, another error appeared: Variable might not be defined.
This is yet another excellent example of why mutability is bad.
2021-12-12 21:58:07 +00:00
e06eefeab0
build/generate-known-translation-apis: fixed incorrect positional parameter order
...
closes #4639
2021-12-11 21:28:52 +00:00
ede07c4314
Mark KnownTranslationKeys and KnownTranslationFactory as @internal
2021-12-11 21:24:18 +00:00
cba00bf1e2
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into stable
2021-12-10 23:24:38 +00:00
e81bee3866
ConsoleReaderThread: disable opcache for console reader subprocess
2021-12-10 23:24:18 +00:00
e6b85988b2
Bump fgrosse/phpasn1 from 2.3.0 to 2.3.1 ( #4636 )
...
Bumps [fgrosse/phpasn1](https://github.com/fgrosse/PHPASN1 ) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/fgrosse/PHPASN1/releases )
- [Changelog](https://github.com/fgrosse/PHPASN1/blob/master/CHANGELOG.md )
- [Commits](https://github.com/fgrosse/PHPASN1/compare/v2.3.0...v2.3.1 )
---
updated-dependencies:
- dependency-name: fgrosse/phpasn1
dependency-type: direct:production
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-12-10 22:37:28 +00:00
b50591303b
README: make shield show download count for 4.0.1, not 3.26.3
2021-12-10 20:23:48 +00:00
448f26cefc
SimpleCommandMap: do not strip backslashes from unquoted command arguments
2021-12-10 18:27:49 +00:00
fa48100da5
PluginDescription: ensure base type of decoded document is actually an array
...
fixes #4628
2021-12-10 18:08:50 +00:00
bcf8a3424c
Merge branch 'legacy/pm3' into stable
2021-12-10 18:02:06 +00:00
69d5bfa0d4
3.26.4 is next
2021-12-10 17:55:11 +00:00
549fb923bf
Release 3.26.3
2021-12-10 17:55:07 +00:00
6d5c463bdd
PlayerExperienceChangeEvent: added range checks to setNewProgress()
...
WE FINALLY FUCKING FOUND IT
This took several years to identify because PHP's exception stack traces don't show the actual values of parameters, but rather the values of the variables they were assigned to.
This means that if the parameter variable is mutated, the exception trace will show the value of the variable inside the function, not the value that was actually passed.
2021-12-10 17:29:57 +00:00
911ad344c9
Human: do not mutate parameter variables in setXpAndProgress()
...
this caused a mystery that took 3 entire years to debug.
2021-12-10 17:27:28 +00:00
3b77462935
WritableBookBase: fixed crash when finding pages containing corrupted UTF-8 characters
...
maybe we should treat this as corrupted? but for now, it's consistent with how we deal with signs.
2021-12-10 16:39:13 +00:00
6b40ed7bf8
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into stable
2021-12-10 16:32:32 +00:00
1ed9302f5a
ItemEntity: clone items given to the constructor directly
...
this fixes some bizarre mutability issues that occurred when using World->dropItem() with the same object multiple times.
2021-12-10 16:31:56 +00:00
b3dab0beef
readme: added total downloads & latest downloads badges
...
[ci skip]
2021-12-10 00:40:29 +00:00
6ddaed97fa
4.0.2 is next
2021-12-09 00:48:45 +00:00
036b90d247
Release 4.0.1
2021-12-09 00:48:42 +00:00
d909cd8a91
Merge branch 'legacy/pm3' into stable
2021-12-09 00:33:05 +00:00
06eaf9f273
3.26.3 is next
2021-12-09 00:27:03 +00:00
1e56ed2ea3
Release 3.26.2
2021-12-09 00:26:59 +00:00
dccb8a3595
Merge branch 'legacy/pm3' into stable
2021-12-09 00:00:11 +00:00
0ace807756
Merge commit 'b081394125f90c14d6894b24e2edb32f3284b3a0' into stable
2021-12-08 23:59:51 +00:00
40895a86e5
draft-release: stick a banner on the release notes to declare obsolescence
2021-12-08 23:55:43 +00:00
b081394125
Do not restrict the allowed update channels client-side
...
we really should have an endpoint on the server that deals with this.
2021-12-08 21:57:16 +00:00
f48cf68cac
updater: log a message when an update was found, but it's an older version
2021-12-08 21:55:44 +00:00
264cff70ec
Release new PM3 builds onto pm3 channel
2021-12-08 21:55:12 +00:00
3aabfa4ab0
bootstrap: display value of PHPRC when PHP binary is borked
...
PHPRC overrides the search path for php.ini, which might break the php.ini locating.
2021-12-08 20:48:44 +00:00
0793e7e094
PluginLoadabilityChecker: fixed logic of extension compatibility check
...
if the extension doesn't specify any version, we can't do any constraint other than *.
2021-12-08 20:08:53 +00:00
3d9e19546f
EntityShootBowEvent: fixed incorrect field type
2021-12-07 23:35:45 +00:00
e0eeb87ea0
World: simplify tile position checking code
2021-12-07 16:45:20 +00:00
78ffad5ffc
World: add checks for tile position outside of world bounds, closes #4622
2021-12-07 16:41:52 +00:00
5a351d3b17
StringToItemParser: fixed not recognizing slime or slime_block
2021-12-06 23:51:30 +00:00
0c012ca5d9
Replace usages of ItemFactory in tests with VanillaItems
2021-12-06 23:45:36 +00:00
0530cb72df
StringToItemParser: fixed some bogus aliases inherited from Item::fromString()
2021-12-06 23:44:41 +00:00
ee060f3e02
Update PHPUnit dependency junk
2021-12-06 16:42:40 +00:00
e7deffa9af
Update in-house dependency versions
2021-12-06 16:41:43 +00:00
6e4b73c183
FallingBlock: fixed crash when block is unable to be determined
2021-12-06 16:40:47 +00:00
62f150586f
Bump pocketmine/locale-data from 2.0.20 to 2.0.22 ( #4621 )
...
Bumps [pocketmine/locale-data](https://github.com/pmmp/Language ) from 2.0.20 to 2.0.22.
- [Release notes](https://github.com/pmmp/Language/releases )
- [Commits](https://github.com/pmmp/Language/compare/2.0.20...2.0.22 )
---
updated-dependencies:
- dependency-name: pocketmine/locale-data
dependency-type: direct:production
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-12-06 15:01:12 +00:00
8ed9551ac9
Bump pocketmine/binaryutils from 0.2.2 to 0.2.3 ( #4620 )
...
Bumps [pocketmine/binaryutils](https://github.com/pmmp/BinaryUtils ) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/pmmp/BinaryUtils/releases )
- [Commits](https://github.com/pmmp/BinaryUtils/compare/0.2.2...0.2.3 )
---
updated-dependencies:
- dependency-name: pocketmine/binaryutils
dependency-type: direct:production
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-12-06 14:59:42 +00:00
4d2d0f1d35
changelog: mention removal of Player->getLowerCaseName()
...
closes #4618
2021-12-06 00:58:21 +00:00
cac9db9bcc
changelog: fixed mistake in CreativeInventory documentation, closes #4616
2021-12-05 15:01:45 +00:00
300d194185
CS again
2021-12-05 01:09:03 +00:00
13340a21d3
fix CS
2021-12-05 01:01:16 +00:00
27f599793a
tools: added old-but-gold server-ping.php
2021-12-05 01:00:24 +00:00
527e975fa9
shut
2021-12-05 00:45:23 +00:00
8e37f86480
Avoid file_put_contents() when overwriting files
...
this fixes many cases of corruption during disk-full situations - file_put_contents() would write an empty file, destroying the original data.
fixes #3152
2021-12-05 00:26:48 +00:00
8e8cee45b8
Config: use JSON_THROW_ON_ERROR for encoding
2021-12-04 21:44:12 +00:00
1a046c6cd5
LevelDB: fixed server crash when corrupted / invalid blockstate NBT is encountered
2021-12-04 18:17:17 +00:00
e61aaaccca
LevelDB: removed hack for problem fixed by 1f9400f901
2021-12-04 16:20:57 +00:00
1b86355c40
Server: Suppress "Minecraft network interface running" messages if RakLibInterface registration is cancelled ( #4603 )
2021-12-02 20:29:01 +00:00
1669d33f7e
Updated DevTools submodule to pmmp/DevTools@39510af5bc
2021-12-02 00:58:15 +00:00
2da65c5a6e
4.0.1 is next
2021-12-01 22:33:58 +00:00
468faa464b
Release 4.0.0
2021-12-01 22:33:52 +00:00
59de045ecb
PM4 LET'S GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
...
Merge branch 'master' into stable
2021-12-01 22:19:37 +00:00
bd8308cc6f
changelog: mention pocketmine subdirectory removal
2021-12-01 22:15:38 +00:00
edc3bae172
Merge branch 'stable'
2021-12-01 22:11:44 +00:00
06e7030817
Prepare changelog for 4.0.0
2021-12-01 22:09:34 +00:00
cb0af44ccb
start.sh: improve errors when PHP isn't found
2021-11-30 23:51:35 +00:00
d535f02096
Make nicer errors for PHP binary not being found
2021-11-30 23:45:25 +00:00
7665f4f443
start.sh: remove 7
2021-11-30 23:43:17 +00:00
20d6b69813
3.26.2 is next
2021-11-30 22:27:42 +00:00
6b7d0307af
Release 3.26.1
2021-11-30 22:27:42 +00:00
baeac2eb07
Fixed tiles not being sent with chunks
2021-11-30 22:19:28 +00:00
2850ea1e89
4.0.0-BETA16 is next
2021-11-30 19:27:05 +00:00
d560cf17fc
Release 4.0.0-BETA15
2021-11-30 19:27:04 +00:00
3f6efd0018
Merge branch 'stable'
2021-11-30 19:20:40 +00:00
aea124af74
Fix inconsistent class name
2021-11-30 19:17:26 +00:00
8620e67d88
Protocol changes for 1.18.0
2021-11-30 19:16:38 +00:00
d5f81fe261
3.26.1 is next
2021-11-30 18:53:36 +00:00
0aeac3af7d
Release 3.26.0
2021-11-30 18:53:36 +00:00
9931c1d50a
Protocol changes for 1.18.0
2021-11-30 18:46:29 +00:00
d21a3d8750
4.0.0-BETA15 is next
2021-11-30 01:26:07 +00:00
6d62b06ce6
Release 4.0.0-BETA14
2021-11-30 01:26:07 +00:00
8be92d16fe
Merge branch 'stable'
2021-11-30 01:19:54 +00:00
8079ae341a
Updated build/php submodule to pmmp/php-build-scripts@bd329dba08
2021-11-30 01:19:14 +00:00
ba295dc7dc
Always use LF in .neon files
2021-11-30 01:16:28 +00:00
38325c8573
Updated translations
2021-11-30 01:14:21 +00:00
f239b077b9
Fixed PHPStan complaints
2021-11-30 00:36:38 +00:00
6f8f460a6c
Partially revert "ConsoleReaderChildProcess: Commit suicide in more cases"
...
This reverts commit cbe0f44c4f .
This achieves the same result as the reverted commit wrt. process in the
same manner (writing a keepalive into the socket and checking if it
failed to send). However, it does _not_ allow the process to die on
reaching pipe EOF, since this can cause many spams of subprocesses when
stdin is actually not a tty (e.g. in a Docker container).
2021-11-30 00:27:52 +00:00
882df94bcb
ConsoleReaderThread: fixed zombie process leak
2021-11-29 23:45:10 +00:00
4a8ca603a1
Log a message when forceShutdown() is called for anything other than a graceful shutdown
2021-11-28 18:53:34 +00:00
52f0c4f3ed
Removed dodgy test using invalid block metadata
2021-11-27 22:51:14 +00:00
e2815eed60
BlockFactory: remap a bunch more invalid states
2021-11-27 20:07:58 +00:00
932a88764c
composer commands suck
2021-11-27 04:07:25 +00:00
9540193766
Fixed everything lighting on fire
2021-11-27 03:54:30 +00:00
cc23e0b7a1
Updated DevTools submodule to pmmp/DevTools@6af57741e6
2021-11-27 03:52:32 +00:00
1f9400f901
World: automatically remap invalid blockstates on chunk load
...
this fixes a wide range of blocks with invalid blockstates becoming update! blocks on the client.
The most common occurrence of this was air with nonzero metadata left behind by world editors which set blockIDs but not block metadata. This caused large ghost structures of update! blocks to appear from nowhere.
The performance impact of this is very minimal (20 microseconds per chunk load in timings, compared to average 660 microseconds to load tiles).
2021-11-27 01:12:30 +00:00
e5149756a8
WorldTimings: fixed merge error introduced by 3bf87378ef
2021-11-27 00:06:09 +00:00
bc18969a09
Merge branch 'stable'
2021-11-26 23:45:09 +00:00
c19174a174
3.25.7 is next
2021-11-26 23:37:47 +00:00
f95142f6b6
Release 3.25.6
2021-11-26 23:37:46 +00:00
7ace24caab
Fixed borked build number
...
this was a problem before the recent clean-up; the only reason it just decided to show now is because 2000+25 is valid PHP code, so PHP saved our asses.
2021-11-26 23:36:19 +00:00
32f619ac49
3.25.6 is next
2021-11-26 23:20:48 +00:00
1bb6ac4fb6
Release 3.25.5
2021-11-26 23:20:40 +00:00
533d3aae8b
Merge branch 'stable'
2021-11-26 22:41:18 +00:00
52a891ba73
shut
2021-11-26 22:32:25 +00:00
71b813d4f9
Define pocketmine\BUILD_NUMBER from phar metadata
...
this way we don't have to patch the code (no idea why we were doing that anyway).
2021-11-26 22:27:58 +00:00
f2540a72ad
Backport improved make-release.php from PM4
2021-11-26 22:10:46 +00:00
03f13495b7
Merge branch 'stable'
2021-11-26 21:59:55 +00:00
7e0f6c02a1
Updated build/php submodule to pmmp/php-build-scripts@a59722c676
2021-11-26 21:59:39 +00:00
1bc7869f6e
Added remapping for almost 4000 invalid blockstates
...
when a block has sole ownership of an ID, the state bitmask can be ignored and we can just claim the whole metadata range for that single block.
This fixes a large number of issues with unknown blocks on older worlds where world editors did not remove the metadata, although update blocks will currently still appear on initial chunk send due to lack of AOT conversion (TODO).
2021-11-26 01:58:52 +00:00
5556861000
ItemFactory: move SweetBerries registration to the correct place
2021-11-26 00:46:35 +00:00
7dd5d0b593
4.0.0-BETA14 is next
2021-11-25 00:40:43 +00:00
9338d42742
Release 4.0.0-BETA13
2021-11-25 00:40:40 +00:00
9346ecdc39
Merge branch 'stable'
2021-11-25 00:01:48 +00:00
c023c02b6c
MemoryManager: Removed obsolete workaround for $GLOBALS not being defined on threads
...
this was long since fixed, and everyone has since been forced to upgrade to pthreads 4.0.0, which definitely has the fix.
2021-11-24 23:57:55 +00:00
bb7683158f
Remove dead ignoreErrors patterns
2021-11-24 23:52:51 +00:00
fad96b77ce
stfu
2021-11-24 23:49:56 +00:00
40575a6dcf
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-11-24 23:43:03 +00:00
40f8f042da
Merge branch 'stable'
2021-11-24 23:42:53 +00:00
0fe6038c41
Merge branch 'stable'
2021-11-24 23:41:40 +00:00
adff561483
phpstan: go nuclear on OPcache
...
when using dynamic reflection (which is the default), any time static reflection comes into play, bad shit starts to happen because of FileReadTrapStreamWrapper.
I attempted to fix these issues (phpstan/phpstan-src#801 ) and failed miserably.
So, to save the hassle, it's time to just remove OPcache from the picture (which, unfortunately, also means that PHPStan will not benefit from JIT).
2021-11-24 23:40:54 +00:00
ad56392d95
Skull: fixed calculation of collision boxes ( #4591 )
2021-11-24 21:42:51 +00:00
472ffb28ff
ScriptPluginLoader: use parseDocComment() instead of reinventing the wheel
2021-11-24 17:22:49 +00:00
726c5652f7
ScriptPluginLoader: fixed reading @tags from non-docblock lines preceding the first docblock
2021-11-24 17:07:34 +00:00
b784a04e08
Utils: fixed parseDocComment() ignoring tags containing hyphens
2021-11-24 16:38:37 +00:00
5c7125f190
Improved error handling for loading broken entity / tile data
2021-11-23 17:41:26 +00:00
eb0cf52d81
Remove useless code ( #4590 )
2021-11-23 17:09:33 +00:00
d8f0fd0a7e
McRegion: skip chunks with TerrainGenerated=false
...
legacy PM used to save even ungenerated chunks, and omitted some tags when doing so which we expect to always be present.
2021-11-23 01:49:48 +00:00
fb0eebc0dc
RegionWorldProvider: Show a more specific message on missing required ByteArrayTags
2021-11-23 01:39:35 +00:00
020cd7b966
CrashDump: fixed encodedData being uninitialized before getEncodedData() is called
2021-11-22 22:31:07 +00:00
c37c261c0f
Separate crashdump file generation from crashdump data collection
...
this allows CrashDump to be used just to generate data, which will come in useful for non-crash error reporting in the future (e.g. packet decoding errors).
2021-11-22 22:19:40 +00:00
2bb97d8904
Be quiet CS
2021-11-22 15:40:47 +00:00
d3878b2d57
fixed spam
2021-11-22 15:37:33 +00:00
cbe0f44c4f
ConsoleReaderChildProcess: Commit suicide in more cases
...
this makes it slightly less annoying to get rid of as an orphan process, though it still won't immediately die.
2021-11-22 14:58:45 +00:00
37622e02b8
Updated translations
2021-11-21 21:11:39 +00:00
ed8b4950a3
Updated BedrockProtocol
2021-11-21 21:10:58 +00:00
fc7d297f60
Added missing fields of StructureSettings
2021-11-21 20:51:35 +00:00
7b4ef293bd
NetworkBinaryStream: fixed incorrect field types for StructureSettings
2021-11-21 20:49:00 +00:00
c72d66f370
Merge branch 'stable'
2021-11-20 18:28:55 +00:00
3683884b9c
Updated build/php submodule to pmmp/php-build-scripts@7a2ab5b922
2021-11-20 18:27:43 +00:00
37e8b1ee8c
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-11-20 18:25:45 +00:00
046dafc34f
Merge branch 'stable'
2021-11-20 18:25:30 +00:00
db135788b9
Updated transient dependencies
2021-11-20 18:19:27 +00:00
b34e6f53eb
Changed visibility of Projectile->move to Protected. ( #4585 )
2021-11-19 23:21:10 +00:00
b4b954cc5f
build/generate-registry-annotations: accommodate code with CRLF
2021-11-19 21:38:43 +00:00
7210db25b0
Bump phpstan/phpstan from 1.1.2 to 1.2.0 ( #4583 )
...
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan ) from 1.1.2 to 1.2.0.
- [Release notes](https://github.com/phpstan/phpstan/releases )
- [Changelog](https://github.com/phpstan/phpstan/blob/master/CHANGELOG.md )
- [Commits](https://github.com/phpstan/phpstan/compare/1.1.2...1.2.0 )
---
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-19 14:42:01 +00:00
4599913034
Separate crashdump rendering from crashdump data collection
...
this allows this code to be reused for reproducing crashdumps based on the original data.
2021-11-18 00:58:20 +00:00
c48aa274e7
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-11-15 22:52:47 +00:00
269231c228
Ban foreach(arrayWithStringKeys as k => v)
...
this is not as good as phpstan/phpstan-src#769 (e.g. array_key_first()/array_key_last() aren't covered by this, nor is array_rand()) but it does eliminate the most infuriating cases where this usually crops up.
2021-11-15 22:52:05 +00:00
4cad552909
Allow input of relative coordinates to setworldspawn command ( #4575 )
2021-11-14 20:07:37 +00:00
f2d5455c5e
changelog: mention that armor right-click equipping is now supported
...
[ci skip]
closes #4570
2021-11-14 16:42:35 +00:00
65247b7248
changelog: add notes about ender inventory
...
closes #4569
2021-11-14 16:41:57 +00:00
2f408708f0
Explosion: fixed blocks with tiles not using said tiles for drop info
...
closes #4571
2021-11-14 16:27:47 +00:00
3dd03075cb
StringToItemParser: added some quality-of-life aliases
2021-11-14 15:52:50 +00:00
82b5bca83e
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-11-14 15:52:05 +00:00
639867a640
Added missing aliases for wooden items
2021-11-14 15:51:41 +00:00
d4a382d568
Fix position of setworldspawn command ( #4574 )
...
* The world spawn position is no longer rounded
* Remove round() since the position is always int
2021-11-14 15:40:20 +00:00
399824c31c
Add correct drop for Podzol ( #4573 )
2021-11-14 14:15:36 +00:00
ada469bc45
README: do not show beta releases on badge
...
[ci skip]
2021-11-12 01:35:39 +00:00
dc8243f88b
Bump phpstan/phpstan from 1.1.1 to 1.1.2 ( #4564 )
...
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan ) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/phpstan/phpstan/releases )
- [Commits](https://github.com/phpstan/phpstan/compare/1.1.1...1.1.2 )
---
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-12 00:24:23 +00:00
7668171c56
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-11-12 00:17:07 +00:00
e4754ab029
PluginBase: Improved error messages for commands containing illegal characters
2021-11-12 00:16:53 +00:00
3276047497
Updated composer dependencies
2021-11-12 00:13:22 +00:00
49a8eff11e
BUILDING: submodules are no longer required
...
submodules are useful (e.g. devtools, build/php) but they are not required to build a server phar.
2021-11-11 14:29:56 +00:00
73592349cd
4.0.0-BETA13 is next
2021-11-09 16:50:46 +00:00
635a9143de
Release 4.0.0-BETA12
2021-11-09 16:50:42 +00:00
c3ec9c0948
Effect default duration is once again NOT hardcoded, like PM3
...
I have no fucking idea why I hardcoded this to begin with. Not one of my better ideas ...
2021-11-09 01:52:47 +00:00
09a2e006a8
CS AGAIN
2021-11-09 00:20:06 +00:00
fed59d3ebe
added missing file
2021-11-09 00:11:39 +00:00
c7beb0a702
Clean up inventory auto close mess from PM3
...
on PM3 there was no concept of 'current window', we had no idea which window the player was actually looking at.
2021-11-08 23:51:25 +00:00
5be429a8c4
Ensure inventories get evacuated on server-side window close
2021-11-08 23:48:05 +00:00
ab002ca06d
Improved handling of temporary inventory windows
...
evacuation behaviour is now consistent regardless of who is doing it
2021-11-08 23:36:58 +00:00
6efb1db107
Fixed inventories not working after dying with inventory open
...
closes #4185
closes #4177
2021-11-08 23:04:00 +00:00
6fdcfb01c8
Seal up main inventory open/close logic inside InventoryManager where it belongs
2021-11-08 22:58:06 +00:00
1beec348f9
3.25.5 is next
2021-11-08 22:33:09 +00:00
7306a2d939
Release 3.25.4
2021-11-08 22:33:08 +00:00
4bf338f783
Player: fixed removeWindow() causing all other inventories to be unopenable
2021-11-08 22:29:14 +00:00
255ff63fda
3.25.4 is next
2021-11-08 20:35:15 +00:00
d72f6a3ac6
Release 3.25.3
2021-11-08 20:35:14 +00:00
93a1e84ad9
TypeConverter: further simplification
2021-11-08 20:27:53 +00:00
c33f97ae41
TypeConverter: clean up absurdly overcomplicated bullshit in createInventoryAction()
2021-11-08 20:18:19 +00:00
cc4bb91fcb
Implemented IPv6 support ( #4554 )
2021-11-08 20:03:28 +00:00
eb9012401b
Merge branch 'stable'
2021-11-08 19:53:56 +00:00
3b34268ed6
Human: try to trap this stupid float cast bug in the wild
2021-11-08 19:48:39 +00:00
4c07078586
Merge branch 'stable'
2021-11-08 19:01:08 +00:00
19a3efe893
.......
2021-11-08 18:57:14 +00:00
a1ecdc27e5
Removed Vanilla*::fromString()
...
these were misbegotten and should never have existed.
If someone really needs these for some reason, they can use getAll()[name].
2021-11-08 18:52:14 +00:00
f93b5be789
Added new dynamic StringToEffectParser
2021-11-08 18:49:28 +00:00
1fb60b5b3a
CS fix again
2021-11-08 18:45:05 +00:00
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
18f5fb66bb
Abstract the base functionality of StringToItemParser
2021-11-08 18:37:05 +00:00
a6f6b60bed
fix CS again
2021-11-08 18:02:24 +00:00
c6c992a1f0
Preparations for negative Y support
2021-11-08 17:28:22 +00:00
df39a1ca07
TeleportCommand: do not hardcode world bounds
2021-11-08 17:22:01 +00:00
be6d1843de
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-11-08 17:17:20 +00:00
2b0b9bd8ed
Update composer dependencies
2021-11-08 17:16:57 +00:00
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
eb3530b6e6
Use pmmp/setup-php-action to compile PHP
2021-11-07 23:13:56 +00:00
4131bcef08
Changed "Level" string to "World" in Position::__toString() method. ( #4559 )
2021-11-07 21:11:55 +00:00
b84f7c18ec
Install ext/crypto from PECL
2021-11-07 19:18:09 +00:00
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
6b316dc29a
PluginManager: Make declaration of duplicate permissions a load error
2021-11-06 17:05:37 +00:00
d9d37f7fa6
ResourcePacksPacketHandler: fixed a mistake from c773e43eda
...
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
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
b392651354
pocketmine.yml: always refer to worlds as worlds in config comments, not levels
2021-11-06 02:22:14 +00:00
f81c55ce6c
4.0.0-BETA12 is next
2021-11-06 01:17:03 +00:00
002feacf8e
Release 4.0.0-BETA11
2021-11-06 01:16:58 +00:00
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
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
6cd272c9e1
Update transient composer dependencies
2021-11-06 00:55:13 +00:00
566c57bcd3
we no longer need submodules for these jobs
2021-11-06 00:35:39 +00:00
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
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
07b1cff306
Bonemeal is no longer consumed when cancelling plant growth events ( #4551 )
2021-11-05 16:15:55 +00:00
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
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
579ef63663
EntityDataHelper: accept FloatTag for vector3 as well as Double
...
MCPE uses Float for entity positions.
2021-11-04 20:46:34 +00:00
8abc952c74
simulate-chunk-selector: do not reallocate colours on every frame
2021-11-04 19:38:40 +00:00
4c3a5fdd73
Clean PHPStan baselines from 1.0.2
2021-11-04 19:28:52 +00:00
54f287feb6
Merge branch 'stable'
2021-11-04 19:27:41 +00:00
84f8b3eb2d
Move CrashDump to pocketmine\crash namespace
2021-11-04 19:23:45 +00:00
15fca84f3b
remove some PHPStan error patterns
2021-11-04 19:22:49 +00:00
c60144210f
Regenerate PHPStan bugs baseline
2021-11-04 19:18:29 +00:00
8ac999cbd4
Use object models for crashdump generation
2021-11-04 16:55:04 +00:00
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
2405e45b35
Player: mark as not using item when held item slot is changed
...
closes #4538
2021-11-03 21:26:20 +00:00
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
729f831b8f
PHPStan 1.0.2
2021-11-03 20:26:32 +00:00
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
5c81b04813
PopulationTask: use typed properties
2021-11-03 15:22:49 +00:00
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
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
ef82a2cd79
Fixed PlayerEmoteEvent::setEmoteId() being useless
2021-11-02 23:10:26 +00:00
87031627bf
Do not call PlayerEmoteEvent if rate limit was reached
2021-11-02 23:09:43 +00:00
f066199971
Implement emote support ( #4523 )
2021-11-02 23:04:55 +00:00
a0e9eec652
4.0.0-BETA11 is next
2021-11-02 19:18:20 +00:00
fa6a432d58
Release 4.0.0-BETA10
2021-11-02 19:18:19 +00:00
102277c636
draft-release: fixed BedrockData JSON minification
2021-11-02 19:16:36 +00:00
f50f26d52e
4.0.0-BETA10 is next
2021-11-02 19:14:15 +00:00
4ca7c29cde
Release 4.0.0-BETA9
2021-11-02 19:14:12 +00:00
9f64bc8180
Merge branch 'stable'
2021-11-02 17:30:36 +00:00
f75a05d7fa
3.25.3 is next
2021-11-02 17:21:49 +00:00
3dae873731
Release 3.25.2
2021-11-02 17:21:44 +00:00
aa0dc60c32
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-11-02 17:10:19 +00:00
d184838ba0
Move Promise classes to their own namespace
2021-11-02 17:10:07 +00:00
ead8ccf08d
CocoaBlock: call BlockGrowEvent when growing for any reason ( #4536 )
2021-11-02 17:05:07 +00:00
38f97bed52
World: fixed PopulationTask failed assumption that generator is always registered
...
if the worker selected previously had a generator registered, but has since been shutdown, the workerStartHook that cleans up generatorRegisteredWorkers won't yet have been called.
This results in the worker being started by the submission of PopulationTask, and the generator doesn't get preemptively registered.
2021-11-02 16:58:14 +00:00
275f145418
BedrockData is now a Composer dependency
...
this should put a stop to people nagging me about incorrect blocks (we have a check to make sure composer dependencies are up to date).
2021-11-02 16:45:45 +00:00
6b07f7a5ec
pmmp/BedrockProtocol@5.0.0+bedrock-1.17.40
2021-11-02 16:22:56 +00:00
e131c2cefa
Drop pocketmine/spl
2021-11-02 16:08:29 +00:00
e34364412b
Replace InvalidStateException usages with InvalidArgument or LogicException
2021-11-02 16:05:54 +00:00
4eef458d29
Config: throw AssumptionFailedError if config type is invalid or DETECT during save()
...
this should never happen ... it was already checked in load()
2021-11-02 16:03:43 +00:00
8b3565b75d
PopulationTask no longer depends on a World object
...
this means it's now possible to test generation offline without too much hassle.
World::generateChunkCallback() has been removed from public API.
2021-11-02 15:40:51 +00:00
facfd7c04a
sanity check
2021-11-02 15:26:54 +00:00
65ef9f786a
Use standard chunkHash() to index population chunks
2021-11-02 15:25:03 +00:00
4dc13ab3da
ConsoleReaderThread: strip control characters
...
this fixes a bug I encountered when accidentally pressing ctrl+a+d (which inserts a chr(1) character), because it made the server unable to find the command - but still reported an error containing what looked like a valid command (character isn't printable).
2021-11-02 15:11:23 +00:00
ede4157814
Check to see if the player can start using the Releasable item. ( #4532 )
2021-11-02 14:36:16 +00:00
34ea199fb0
World: fixed additional edge case - population promise rejected before task completion
...
if this happened, the index would stay set in activeChunkPopulationTasks, eventually causing the generation queue to jam up completely and non-forced generation to come to a standstill.
2021-11-02 14:30:23 +00:00
1775699f05
World: make sure that chunks locked by PopulationTask always get unlocked, no matter what
...
fixes #4527
2021-11-02 14:20:42 +00:00
32a857b8b4
fix CS
2021-11-02 14:09:16 +00:00
7e4be29fc4
Gracefully force-shutdown on failure to start RakLib
...
this now won't generate a crashdump.
2021-11-02 13:51:01 +00:00
c17587d436
World: use new Vector3() instead of Block->getPosition()
...
When profiling this, I noticed that we spend a stupidly large amount of time creating useless Position objects in the case of update=true, because Vector3->sides() calls Position->getSide(), which calls Position::fromObject(parent::getSide()). This is stupid because the update logic doesn't require Positions anywhere (as evidenced by this change needing no other alterations.
A rough profile shows that this improves setBlock() performance by about 25% in the update=true case, which is a pretty big margin.
As an added bonus, it gets rid of some unrealized cyclic dependencies in World->changedBlocks.
2021-11-02 03:00:00 +00:00
0f6b7e48cb
Updated BedrockProtocol:
...
it's weirdly satisfying that LevelChunkPacket::create() with the extra parameter turns out to be exactly the same length as the old way.
2021-11-02 01:37:56 +00:00
f2912fcdd8
Updated pocketmine/log and pocketmine/log-pthreads (BC breaks included)
...
AttachableLogger deals with Closures now instead of LoggerAttachment objects
ThreadedLoggerAttachment no longer implements LoggerAttachment
2021-11-01 22:22:22 +00:00
f6cb4f9597
Updated BedrockProtocol
2021-11-01 21:32:02 +00:00
54442f7e4b
Merge branch 'stable'
2021-11-01 21:18:35 +00:00
5257755dc5
shut
2021-11-01 21:15:58 +00:00
8c16ecaa5b
Merge branch 'stable'
2021-11-01 21:08:32 +00:00
3214da8642
pthreads 4.0.0
2021-11-01 21:01:59 +00:00
f827a555d5
Merge branch 'stable'
2021-11-01 18:13:24 +00:00
61145baded
Merge commit 27ae959e8
2021-11-01 17:42:31 +00:00
4d54d6c552
Merge commit f8f39687e2
2021-11-01 17:41:47 +00:00
485bc2c565
Merge commit 94737934de
2021-11-01 17:41:10 +00:00
07b4f844a9
Merge commit debb469de1
2021-11-01 17:40:40 +00:00
19e5775f6b
Merge commit 73dc0598e4
2021-11-01 17:40:06 +00:00
804fb3f603
Merge commit 141fbde660
2021-11-01 17:39:40 +00:00
6175b03433
Merge commit 69952ae2af
2021-11-01 17:36:34 +00:00
a78248a19c
Merge commit '71f2a34616961d6328f06fd911b6d4450a61643e'
2021-11-01 17:33:02 +00:00
414ccb9f10
Merge commit 'd17cd658030e66009c0bb32941387c7444d3ffe0'
2021-11-01 17:31:05 +00:00
794142fe49
Merge l7/l8/l9 baselines into actual-problems
...
it doesn't serve any practical purpose to keep these separated, particularly since it's getting so difficult to figure out which errors are coming from which levels (since we always use 9, it doesn't really make any difference).
2021-11-01 17:27:31 +00:00
ff27c5f7db
PHPStan 1.0.0
2021-11-01 17:24:20 +00:00
4d4362801f
AvailableCommandsPacket: remove dead code
2021-11-01 17:01:26 +00:00
0babe0a1ab
LevelDB: remove unused private method
2021-11-01 16:55:05 +00:00
d696ebcda3
Level: do not use static:: to access levelIdCounter
...
the field is private.
2021-11-01 16:52:27 +00:00
c3768b997a
Updated to pmmp/BedrockProtocol@146498c279
2021-11-01 16:13:33 +00:00
f6480017ce
Update PHPUnit dependency junk
2021-11-01 16:12:37 +00:00
9f5c16bc46
Projectile: use closure instead of do/while for reading id/data of block
...
not ideal, but whatever I guess... this at least provides scope isolation
2021-11-01 15:56:28 +00:00
8865bb73ba
BanEntry: remove useless do/while
2021-11-01 15:52:55 +00:00
2dee1dbc28
Remove ridiculous code in ResourcePackManager
2021-11-01 15:41:21 +00:00
0f0b6f0efa
Utils: eliminate usages of backtick operator
2021-11-01 15:25:56 +00:00
d5f13d8be2
Timezone: make PHPStan 1.0 happy
2021-11-01 15:24:16 +00:00
27ae959e89
Terminal: backport shell_exec() code from PM4 to make PHPStan 1.0 happy
2021-11-01 15:23:36 +00:00
f8f39687e2
Achievement: declare proper type for $list static property
2021-11-01 15:22:33 +00:00
94737934de
PlayerDeathEvent: fixed LSP violation reported by PHPStan 1.0
2021-11-01 14:17:54 +00:00
debb469de1
Updated PHPUnit dependency junk
2021-11-01 13:54:04 +00:00
616eb0050d
World: remove premature optimisation of setBlockAt() introduced by ece28e5d7b
...
closes #4531
it turns out that letting the light updates themselves handle this is faster than trying to get in the way.
2021-11-01 02:34:44 +00:00
9d30bc8b95
World: fixed assertion failure when requesting, cancelling, and then re-requesting chunks via requestChunkPopulation()
...
if the request/cancel/re-request happens all in the time before the queue gets drained, chunk hashes may appear multiple times in the queue. We don't want to process them twice if this happens (although it's mostly harmless anyway).
2021-11-01 02:17:11 +00:00
46b7d35cd3
Player: return from callback if used chunk status is not REQUESTED_GENERATION()
...
this can happen especially on large render distances when flying fast and changing direction - we decide we don't want the chunk, then, after changing direction and re-ordering chunks, we decide we do want it again, and end up registering a second callback. In this case, we need to ensure that only one of the callbacks gets executed (it doesn't matter which one).
2021-11-01 01:45:49 +00:00
c781efcf90
World: avoid calling the same logic twice in requestChunkPopulation()
...
orderChunkPopulation() checks the preconditions too. Have them both call an internal function that doesn't.
2021-11-01 00:36:57 +00:00
e4a54f5b6a
World: deduplicate code in request/orderChunkPopulation
2021-11-01 00:33:18 +00:00
afb54f1ae4
World: flip orderChunkPopulation() condition around
...
this makes it more obvious that the code is similar to requestChunkPopulation() barring one distinct difference.
2021-11-01 00:25:30 +00:00
8f803df511
World: check population locks _after_ checking if the chunk is already populated, not before
...
this led to another case where a population request would be queued up for an already-populated chunk for no reason.
2021-10-31 23:54:27 +00:00
f4a3c40b5c
World: use better variable names in orderChunkPopulation()
2021-10-31 23:48:00 +00:00
9dec82cdbc
World: fixed requestChunkPopulation() queuing requests for chunks which are already populated
...
this led to chunk sending getting bogged down if there were more than population-queue-size chunks waiting to be generated.
2021-10-31 23:40:34 +00:00
74031d2fbe
World: remove the fulfilled promise from the population request map
...
fixes crash when unregistering chunk loaders
2021-10-31 23:05:12 +00:00
bd60e41268
Revert "Revert "Player: do not re-request the same ungenerated chunks multiple times""
...
This reverts commit 3265d3f6b4 .
2021-10-31 22:57:56 +00:00
96cfdc79b8
World: fixed original promise not getting fulfilled if the chunk became populated=true after a promise was already made (but not fulfilled) to populate it
...
this could happen if a plugin calls setPopulated(true) on a chunk after a request for its population landed in the queue, but before it actually got processed. In that case, the promise would never get fulfilled.
2021-10-31 22:54:37 +00:00
2fa0a914ff
World::orderChunkPopulation() may return a pre-resolved promise
...
this does not indicate a failure; it indicates that the chunk has already been successfully populated.
In this case, we shouldn't be putting the task back on the queue.
This is skirting around the real bug, which is that requestChunkPopulation() doesn't check if the target chunk is already populated before it creates a new promise that it will be.
2021-10-31 22:51:37 +00:00
08636d079d
Promise: expose isResolved()
2021-10-31 22:48:52 +00:00
3265d3f6b4
Revert "Player: do not re-request the same ungenerated chunks multiple times"
...
This reverts commit 866020dfdb .
For some fucking reason this broke resending chunks in some cases (and
sending chunks at all in others). I don't have time to debug this right
now, so it's going to have to remain broken, infuriatingly enough.
2021-10-31 21:25:21 +00:00
0f78a2b5ef
Advisory chunk locking for chunk population ( #4513 )
...
this allows chunks locked for population to be modified. If the PopulationTask detects that the chunk was modified during the onCompletion(), the result of the population will be discarded and rescheduled, so that it includes user modifications.
2021-10-31 21:11:20 +00:00
f1a791ef75
Improved Promise API - separate resolver and consumer APIs
...
this makes creating a promise slightly more cumbersome, but I'm more concerned about people who might try to call 'new Promise' directly.
2021-10-31 19:49:57 +00:00
866020dfdb
Player: do not re-request the same ungenerated chunks multiple times
...
this doesn't affect chunk resends, since they'll be kicked back to NEEDED, which is detected by orderChunks().
2021-10-31 18:52:37 +00:00
c580bb2434
InGamePacketHandler: mark player as not using item in more cases
...
fixes #4355
2021-10-31 14:41:31 +00:00
4fe3f69702
World: eliminate final remaining 'no loaders attached' debug message on player creation
2021-10-31 14:33:27 +00:00
018006541e
changelog: mention block-picking changes
...
[ci skip]
2021-10-31 14:12:12 +00:00
fbb91d123d
World::unregisterChunkListenerFromAll(): go through unregisterChunkListener()
...
this ensures that everything gets cleaned up properly (e.g. player chunk listeners).
2021-10-31 14:03:40 +00:00
3dc75644d9
World: avoid duplicated logger code in initChunk()
2021-10-31 14:02:25 +00:00
1cabe4baf3
World: do not crash on duplicate tiles loaded from disk
...
closes #4049
2021-10-31 13:58:32 +00:00
73dc0598e4
CrashDump: remove derp space
2021-10-30 23:22:37 +01:00
faad2365e2
World: Register a temporary chunk loader on chunks used by PopulationTask
...
fixes #3839
2021-10-30 22:17:06 +01:00
4f816d03a7
SurvivalBlockBreakHandler: remove useless code
2021-10-30 21:35:58 +01:00
1d22761d27
Remove useless newline
2021-10-30 21:25:47 +01:00
5b8ce7e3e2
Cake: fixed desync on cancellation of eating
...
closes #3591
we don't support eating in creative right now, but the cake shouldn't appear to be eaten when it's not.
2021-10-30 21:02:24 +01:00
08f3c18de9
Arrow: do not add pickups to creative players' inventories
...
closes #2932
2021-10-30 17:16:46 +01:00
141fbde660
Player: fixed getting re-banned on rejoin after unban from hardcore death
...
closes #2175
2021-10-30 16:58:03 +01:00
465a509858
World: remove spammy debug message
2021-10-30 16:13:01 +01:00
69952ae2af
Human: limit lifetime total XP range to INT32_MAX
...
closes #4484
2021-10-30 16:05:10 +01:00
71f2a34616
Entity: spawnTo() must silently swallow errors
...
Player->showPlayer() assumes that spawnTo() will take care of all the checks necessary to ensure we don't actually spawn a player to someone it shouldn't be able to see. In PM3, there's nothing we can do about that.
This could be a problem if anything decides to override spawnTo() to do additional stuff and assumes that the function will always succeed; however, there's not much reason to do that (plugins sending packets should override sendSpawnPacket() instead).
2021-10-30 15:38:27 +01:00
63dfcc60c3
4.0.0-BETA9 is next
2021-10-29 22:35:23 +01:00
428bd5ae91
Release 4.0.0-BETA8
2021-10-29 22:35:15 +01:00
d17cd65803
3.25.2 is next
2021-10-29 22:23:28 +01:00
a8d5e8c5f6
Release 3.25.1
2021-10-29 22:23:22 +01:00
19f448d074
pocketmine/math 0.4.0
2021-10-29 21:56:56 +01:00
1c18c731ef
bootstrap: check for zlib raw support in leveldb
2021-10-29 19:15:12 +01:00
8a2ecfe1d4
Merge branch 'stable'
2021-10-29 19:04:01 +01:00
089e62b44e
Entity::spawnTo(): verify that the target player belongs to the same world as the entity
...
this should never be hit in the PM case, but it's an InvalidArgument rather than AssumptionFailedError because plugins can and do call this with bad things.
2021-10-29 18:54:00 +01:00
32a34d2494
Location: change order of constructor parameters
...
to be consistent with Position::__construct() and Location::fromObject() (although Location::fromObject() has no choice, thanks to the anti-feature known as late static binding ...)
2021-10-29 15:43:09 +01:00
ee9f5e0044
Location: make __construct() parameters mandatory
...
I did consider allowing yaw/pitch to remain optional, but considering the implicit immutability of Location, it really doesn't make any sense to create a Location with default yaw/pitch - just create a Position in that case instead.
2021-10-29 15:40:58 +01:00
88b7389080
InventoryManager: reduce code duplication
2021-10-29 15:37:52 +01:00
f1cc168d26
phpstan: exclude a couple of files from analysis temporarily
...
close #4472
2021-10-29 00:23:13 +01:00
fb5543a2ad
Updated BedrockProtocol dependency
2021-10-29 00:16:11 +01:00
a4eda9a8f5
World: call nearby entities' onNearbyBlockChange() in setChunk()
...
fixes #2779 in all known cases.
2021-10-28 23:59:32 +01:00
eb75df6f8e
World: Intelligently perform automatic transfer or deletion of tiles in setChunk(), depending on the context
...
tiles may be deleted in the following circumstances:
1) the target block in the new chunk doesn't expect a tile
2) the target block in the new chunk expects a different type of tile (responsibility of the plugin developer to create the new tile)
3) there's already a tile in the target chunk which conflicts with the old one
In all other cases, the tile will be transferred.
This resolves a large number of unintentional bugs caused by world editors replacing chunks without setting the deleteTilesAndEntities parameter to false (even the core itself does it).
closes #4520
2021-10-28 23:48:17 +01:00
c66790b6a6
World: never delete entities in setChunk()
...
entities exist completely independently from chunks now, so there is no need to interact with them whatsoever.
As I wrote in #4520 , there's no sense in deleting entities here, since a chunk replacement is essentially just a mass block update.
On that theme, it might be a good idea to call Entity->onNearbyBlockChange() for all entities in the target and adjacent chunks when replacing a chunk, to ensure that they get the proper movement updates.
2021-10-28 23:42:28 +01:00
d78801b9d5
World: fixed tiles and entities getting deleted when adjacent chunks are modified during population
2021-10-28 22:24:47 +01:00
d410db4302
Chunk: rename DIRTY_FLAG_TERRAIN to DIRTY_FLAG_BLOCKS
...
we use the word 'terrain' elsewhere to refer to the combination of blocks and biomes, so using TERRAIN here is misleading.
2021-10-28 22:11:07 +01:00
a62ce64fdd
Revert "Chunk: added modification counter"
...
This reverts commit a5418a019d .
The more I assessed this, the more I realized that this implementation
doesn't actually offer any value. Since modcounters don't persist after
chunk unload + reload, they can't be reliably used to detect changes in
chunks without additional event subscriptions.
For the purpose I actually intended to use them for (population task
cancellation) there's a) another solution, and b) modcounts are
unreliable for that too, because of the aforementioned potential for
chunks to get unloaded and reloaded.
For the case of detecting dirty chunks within PopulationTask itself,
they are also unnecessary, since the dirty flags are sufficient within
there, since FastChunkSerializer doesn't copy dirty flags.
In conclusion, this was a misbegotten addition with little real value,
but does impact performance in hot paths.
2021-10-28 21:02:04 +01:00
5db3915aad
Make MemoryManager aware of ChunkCache
2021-10-28 20:28:00 +01:00
eb40b741ae
StandardPacketBroadcaster now splits broadcasts by session-specific PacketSerializerContext
...
in the normal case, all sessions will share the same PacketSerializerContext and Compressor, so this code will be the same as before
However, for the multi-protocol hackers out there, this should reduce the maintenance burden (@Driesboy) since now only the PacketSerializerContext needs to be maintained. I recommend a separate PacketSerializerContext for each protocol (perhaps put the protocol version in the serializer context too, if you need it for some reason).
2021-10-28 20:15:37 +01:00
b3720b3f17
4.0.0-BETA8 is next
2021-10-28 17:28:53 +01:00
7effa03ba4
Release 4.0.0-BETA7
2021-10-28 17:28:48 +01:00
d0474ccd92
make-release: note which channel the build will be released into
2021-10-28 16:29:20 +01:00
2b0768f720
make-release: fixed retention of +dev on release versions
2021-10-28 16:26:56 +01:00
dba148cfaa
build/make-release: make arg parsing use getopt
2021-10-28 16:25:18 +01:00
48f77abe7e
Leave channel ID in VersionInfo
...
so that I don't have to type it out every time I make a new release. Most of the time it's going to be posted to the same channel as before anyway.
2021-10-28 16:03:43 +01:00
bb05af103d
PluginManager: fixed crash when using a plugin-loader plugin (read: devtools)
...
closes #4518
2021-10-28 15:55:05 +01:00
0ef5c67b9b
Use static constructor for MovePlayerPacket
...
this marks the last of the packets created using the old way.
2021-10-27 21:10:16 +01:00
6d89265510
Player: reduce code duplication
...
back when this was just hardcoded >> 4 everywhere, nobody thought anything of it, but now it uses constants, it's easy to cross-reference and see where the duplicates are.
2021-10-26 23:02:50 +01:00
a7d8a598e1
World: reduce code duplication for chunk coordinate calculation
2021-10-26 22:58:17 +01:00
51fbff204b
World: make PhpStorm understand return type of getAdjacentChunks()
2021-10-26 20:32:09 +01:00
1873457840
PopulationTask: stop using dynamic properties
2021-10-26 20:21:58 +01:00
fca70efbb1
World: move chunk population related methods to be in the same overall place
2021-10-26 16:44:08 +01:00
8f88393184
World: Specialize generateChunkCallback() for PopulationTask
...
this allows us to also set the adjacent chunks before calling ChunkPopulateEvent, to give a more accurate picture of what changed.
2021-10-26 15:28:00 +01:00
b9d9b69bbe
ConsoleReaderThread: trim the string before returning it
...
it will have a newline at the end that was added by the subprocess when posting it to the main process.
2021-10-26 01:07:14 +01:00
1d99cd329a
CS again
2021-10-26 00:50:43 +01:00
bd8cba1a7f
Added unit tests for Utils::testValidInstance()
2021-10-26 00:49:41 +01:00
24d4daec90
Utils::testValidInstance() now accepts interfaces for the baseName
2021-10-26 00:32:32 +01:00
4178c81209
Utils: fixed testValidInstance() not accepting the same valid class for both className and baseName
...
this caused problems in PlayerCreationEvent because plugins set the base class and then set the player class to the same thing.
2021-10-26 00:31:30 +01:00
94f4ef5862
PopulationTask: Throw AssumptionFailedError if center chunk is null for some reason
2021-10-25 21:07:03 +01:00
2e2515354c
PopulationTask: fixed undefined method call
...
fuck you PhpStorm! fuck you PhpStorm! fuck you PhpStorm!
2021-10-25 20:57:43 +01:00
359d0835f3
CS
2021-10-25 20:54:39 +01:00
d4cbde6f10
PopulationTask: use modification counters to detect changed chunks
...
instead of using terrain dirty flags, which aren't suitable for this purpose
2021-10-25 20:53:50 +01:00
a5418a019d
Chunk: added modification counter
...
this is independent from the terrain dirty flags (which are specifically used to track state of chunks needing to be saved).
2021-10-25 20:53:11 +01:00
baba25953f
Chunk: make all parameters of __construct() mandatory and non-nullable
...
having the constructor fill in defaults for these invariably causes bugs.
2021-10-25 20:22:50 +01:00
d53347454b
Chunk: use HeightArray::fill()
2021-10-25 20:17:30 +01:00
401e8d117b
Flat: use a less dumb way to build biome array
2021-10-25 20:15:33 +01:00
9835d75f65
Chunk: removed heighArray parameter from constructor
...
we don't pass this anywhere, and really it should be dynamically initialized anyway, just like light.
2021-10-25 20:13:50 +01:00
b8519d1af4
World: fixed every chunk having terrain saved at least once, even if unmodified
...
setPopulated() sets dirty flags on the chunk, causing the autosave sweep
to think they've been changed when they haven't. We now pass
terrainPopulated to the constructor to avoid this ambiguity recurring in
the future.
2021-10-25 19:53:47 +01:00
f6e53f826b
Fixed Anvil/McRegion chunks getting autosaved on first time, even when unchanged
...
setGenerated/setPopulated and friends set hasChanged = true, which causes the world to autosave them the first time around, even though they weren't modified.
2021-10-25 19:52:44 +01:00
42ede30e77
...
2021-10-23 23:57:28 +01:00
04aedc6494
Updated BedrockProtocol
2021-10-23 23:54:49 +01:00
701a71a4ee
Sound::encode() position is no longer nullable
...
making this nullable was based on the invalid assumption that global sounds have no position, but it turns out they _do_ still use the position to make the sound come from the correct direction.
2021-10-23 02:01:26 +01:00
e50072dc27
Clean PHPStan baselines
2021-10-23 01:55:10 +01:00
c77829f4ad
Migrate packet creation to use ::create() methods in all but one case
...
MovePlayerPacket doesn't yet have a ::create() due to a complication with fields that aren't always present.
2021-10-23 01:46:01 +01:00
c773e43eda
Updated BedrockProtocol to pmmp/BedrockProtocol@97fa88e9ef
2021-10-23 01:16:45 +01:00
c262c2e726
Updated composer dependencies
2021-10-23 01:14:54 +01:00
a4b65d6a3f
PlayerCreationEvent: verify that the class actually exists and is instantiable
...
this ensures that crashdumps blame the plugin instead of the core on bad classes, such as in this case: https://crash.pmmp.io/view/5331225
2021-10-21 20:37:45 +01:00
986b4e0651
Enforce single-line PhpDoc for properties where possible
2021-10-21 20:32:37 +01:00
2971bf30a5
actions: combine code verify into one step
...
this way the diff takes one less click to get to.
2021-10-21 00:30:19 +01:00
4f2bcb61d6
Fixed crashdump generation when crashing before PluginManager was created
2021-10-20 23:35:04 +01:00
e2275cc8ec
PluginManager: Prevent infinite recursion in loadPlugins()
...
if a plugin calls loadPlugins(server->getPluginPath()) during its onLoad(), and it itself is in that plugin path, an infinite recursion will occur.
2021-10-20 23:10:18 +01:00
620874d902
PluginManager: Extract checkPluginLoadability() to a PluginLoadabilityChecker unit
...
this can be more easily unit-tested.
2021-10-20 22:31:56 +01:00
44508a138f
Moved plugin extension requirement checks to PluginManager::checkPluginLoadability()
...
these don't really belong in PluginDescription.
2021-10-20 22:13:30 +01:00
aa408c9a97
Fixed 9646128d01
2021-10-20 21:54:57 +01:00
6d78a0b435
CS
2021-10-20 21:52:42 +01:00
76b4b23d98
PluginManager: remove loadPlugin()
...
loadPlugins() is now the preferred option, since it does all the proper checks.
In addition, the server now acknowledges that loading a single plugin may cause multiple plugins to be loaded, so returning only a single Plugin is not representative of what's actually happening.
2021-10-20 21:52:19 +01:00
03fcd844eb
PluginManager::loadPlugins() now accepts files as well as directories
...
loadPlugins() is now a superior option to loadPlugin(), since it enforces dependency checks and also supports automatic loading of plugins when new loaders are installed.
2021-10-20 21:36:14 +01:00
fecc13f362
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-10-20 21:23:14 +01:00
9646128d01
Updated resources/locale submodule to pmmp/Language@09c709f242
2021-10-20 21:22:56 +01:00
a788954551
Fixed dependency handling across plugin loaders ( #3971 )
2021-10-20 20:22:00 +01:00
dc07ac33d3
protocol: fixed missing field of CraftRecipeAuto
2021-10-20 19:47:32 +01:00
ec3986827c
Update BedrockProtocol to 3.0.1, widen constraint to allow newer patch versions
2021-10-20 16:20:10 +01:00
09c840b66a
Update transient composer dependencies
2021-10-20 16:19:20 +01:00
80b402e529
ItemTranslator: throw the proper exceptions when failing to map network IDs
2021-10-20 14:01:39 +01:00
a3f8546ac4
4.0.0-BETA7 is next
2021-10-19 19:13:43 +01:00
46920818b5
Release 4.0.0-BETA6
2021-10-19 19:13:43 +01:00
69cb575789
Merge branch 'stable'
2021-10-19 19:05:25 +01:00
fee6478cbe
Updated BedrockData and BedrockProtocol for 1.17.40 support
2021-10-19 19:00:29 +01:00
9c5cec77b1
3.25.1 is next
2021-10-19 18:27:30 +01:00
f48b703533
Release 3.25.0
2021-10-19 18:27:26 +01:00
70636f6eb4
Protocol changes for 1.17.40
2021-10-19 18:00:34 +01:00
c70b80c273
ItemEntity: implement partial itemstack pickups in the dumbest way possible
...
Given the various limitations and flexibilities posed by EntityItemPickupEvent, I settled on this as the simplest way to deal with the problem.
- EntityItemPickupEvent may have its destination inventory changed, so we can't cache the result of getAddableItemQuantity() to use after the event.
- The item itself may have changed, so even if we thought we could add some items before the change, we might not be able to afterwards.
Considering the above facts, it's better to just give the whole itemstack to EntityItemPickupEvent, and let plugins use getAddableItemQuantity() on their own to decide if their chosen inventory can accommodate the item or not.
If it can't, then we'll just drop it on the ground.
This also fixes a potential issue where plugins changing the item to a custom one might end up with their items and the actual items both just vanishing if the target inventory was full.
closes #4499
2021-10-17 22:37:49 +01:00
a794d24c81
Added a tool to generate a Markdown document of all core permissions
2021-10-17 17:02:18 +01:00
8db5732b44
Drop respect/validation
...
it's not worth this turning into compatibility baggage just so that we can parse plugin_list.yml, especially when we have new ways to handle data parsing coming in the pipeline.
For something as small as plugin_list.yml, it's easier (and in this case better too) to just validate it manually (respect/validation was anyway too strict considering it's YAML we're dealing with).
2021-10-15 17:15:46 +01:00
48f809d3fa
Removed another dead PHPStan error pattern
...
this was actually a PHPStan bug fixed in 0.12.99.
2021-10-15 17:01:09 +01:00
0348236860
fucking CS again
2021-10-14 15:56:50 +01:00
8c07748100
RakLibInterface: print packet exception info as a block using Utils::printableExceptionInfo()
2021-10-14 15:55:08 +01:00
06e7338ff9
Move exception printing utilities from MainLogger to Utils
...
where they can be useful to other stuff apart from just the logger
2021-10-14 15:54:20 +01:00
bdbfa70558
Server: break some isolated stuff out of Server::__construct()
2021-10-14 15:44:18 +01:00
7a4af7a0bc
SignalHandler: fix CS
...
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2021-10-14 15:14:27 +01:00
34b1392598
Cross-platform signal handler
2021-10-14 15:03:11 +01:00
321345fcc8
Sapling: simplify condition
2021-10-13 23:00:38 +01:00
0ac9f4fe61
BlockFactory: move SweetBerryBush to its proper place
2021-10-13 22:26:51 +01:00
2db53775e0
Sort item_from_string_bc_map using SORT_NATURAL
2021-10-13 21:01:59 +01:00
8523f0fb0b
CS fix
2021-10-13 20:31:24 +01:00
b570324288
LegacyStringToItemParser: rely exclusively on item_from_string_bc_map.json, do not interpret integers given as strings
...
fixes #4507
2021-10-13 20:29:18 +01:00
6284cd14c7
LegacyStringToItemParser: added getMappings()
2021-10-13 20:19:44 +01:00
ce8af4e3bc
4.0.0-BETA6 is next
2021-10-13 00:02:01 +01:00
b65e89b605
Release 4.0.0-BETA5
2021-10-13 00:01:56 +01:00
d3f74d6ce1
Merge branch 'stable'
2021-10-12 23:32:43 +01:00
bbd925abc4
Merge commit '974d08efd62c52c1c8ac92cb1b67ac157908fd71'
2021-10-12 23:31:50 +01:00
4bf6205a6c
Merge commit '289553fa46fc26b03db73db23481a98d6ddb12a5'
2021-10-12 23:28:35 +01:00
b5699679ef
Merge commit 'e38866c4ba90f8efd5630dbe674fd7ca15f586ff'
2021-10-12 23:23:27 +01:00
824a89edfe
Merge commit 'e032b8fe208a053441c9fbd377209740008cddb8'
2021-10-12 23:12:17 +01:00
ead9aae23c
Updated build/php submodule to pmmp/php-build-scripts@fab0cbeaae
2021-10-12 23:10:06 +01:00
aefa0afd7c
DefaultPermissions: Order registrations alphabetically
2021-10-12 22:17:46 +01:00
ec2699ffee
DefaultPermissions: fix description of timings command permission
2021-10-12 22:16:20 +01:00
49c1e4c06e
Implement fletching table ( #4501 )
2021-10-12 21:21:05 +01:00
9b94a4661b
ItemTranslator: Use LegacyItemIdToStringMap instead of reading files directly
2021-10-11 22:17:40 +01:00
62f11360ee
Added unit tests for getAddableItemQuantity()
2021-10-11 21:52:27 +01:00
a5833327f0
Inventory: added getAddableItemQuantity()
...
this mostly reuses the code from canAddItem().
2021-10-11 21:46:27 +01:00
d73ea8efe4
FlatGeneratorOptions: Do not hardcode biome ID
2021-10-11 21:32:20 +01:00
835e18ce6e
Changelog: Changed utils\Color to color\Color ( #4502 )
...
[ci skip]
2021-10-11 20:15:44 +01:00
01c0602043
Server: do not attempt to generate a new world if it already exists
2021-10-11 17:48:08 +01:00
8fd475f87b
WorldManager: Check generator options of worlds before loading them, too
2021-10-11 17:44:38 +01:00
34f54750c8
Added support for creation-time validation of generator options, closes #2717
2021-10-11 17:37:47 +01:00
092aabeb97
fix CS
2021-10-11 17:21:19 +01:00
89d7b7198f
Server: drop support for tagging generator options onto the 'generator' key in pocketmine.yml
...
the 'preset' key should be used for this purpose instead.
This couldn't be dropped until now due to the shitty handling of unknown generators.
2021-10-11 17:20:49 +01:00
70deea0ef9
Flat: Move preset handling to a FlatGeneratorOptions unit
2021-10-11 16:53:08 +01:00
859cdfa5d2
GeneratorManager: removed unused parameter from getGenerator()
2021-10-11 16:18:38 +01:00
fa93a8d78f
Server: Error on unknown generators when generating new worlds from config, instead of silently using DEFAULT
...
this is consistent with the behaviour of loading worlds.
2021-10-11 16:13:32 +01:00
7b6632941d
GeneratorManager::getGenerator() now returns null for unknown generator aliases
...
instead of returning Normal::class (indistinguishable from successful match) or throwing an exception (pain in the ass to handle).
2021-10-11 16:04:36 +01:00
e62794e4cf
TypeConverter: fixed PHPStan errors
2021-10-11 15:17:32 +01:00
500c298aaf
Disallow the use of @handleCancelled on non-cancellable events
...
closes #3464
2021-10-11 15:12:16 +01:00
8ac16345a3
TypeConverter: account for items without properly mapped IDs
...
fixes #4459
2021-10-11 15:05:08 +01:00
19a66a8d03
committing the new strings would have helped ...
2021-10-11 01:14:00 +01:00
6d728e8d98
PluginManager: Improved startup performance when loading many plugins
...
for some reason we were reading and parsing the plugin.yml at least twice for every plugin loaded.
We were repeating work already done by the initial loadPlugins() triage (discovering correct loader, loading plugin.yml from disk, parsing plugin.yml, validating plugin.yml) every time loadPlugin() was called with that plugin.
2021-10-11 01:11:59 +01:00
e1ee320c8d
PluginManager: Localize plugin loading error messages
2021-10-11 00:58:33 +01:00
965a16d19d
PluginManager: Extract deterministic plugin loadability checks into a separate method
2021-10-11 00:49:32 +01:00
5bae458a91
changelog: mention that Entity->setPosition(AndRotation)() are now protected
2021-10-10 23:32:40 +01:00
2696698926
ClosureTask: relax closure checks to allow arrow functions without return typehints
...
nobody uses return typehints on arrow functions anyway .. they just waste space.
2021-10-10 23:31:57 +01:00
912e612743
Utils: allow validateCallableSignature() to accept a manually constructed CallbackType instead of a closure
...
this allows more fine-grained control without PHPStan yelling at us.
2021-10-10 23:27:09 +01:00
fd2df637b6
Block: rename getPositionOffset() -> getModelPositionOffset()
...
this gives a better idea of what the function does, and is also much less annoying for auto complete.
2021-10-10 22:35:38 +01:00
aa53dc6709
Entity: fixed network properties not updating when fireTicks changes
...
another bug that LBSG knew about, but didn't report. :/
2021-10-09 23:57:37 +01:00
c1f843a42c
GarbageCollectorCommand: fixed duplicate MB suffix
2021-10-09 23:57:36 +01:00
09715906c8
StructureGrowEvent: added API to get the player who caused the growth ( #4445 )
2021-10-09 22:51:46 +01:00
13068ba3a7
3.24.1 is next
2021-10-09 20:20:41 +01:00
b54854529f
Release 3.24.0
2021-10-09 20:20:37 +01:00
974d08efd6
Bump PHP minimum requirement to 8.0
...
PHPStan failed on 7.4 after updating to 0.12.99, and I figured it was less hassle to just do this than fix the build. In any case, we stopped shipping 7.4 months ago, and warned at 3.22 release that 7.4 support would soon be dropped.
2021-10-09 20:09:42 +01:00
289553fa46
CS again
2021-10-09 19:50:07 +01:00
e38866c4ba
phpstan 0.12.99
2021-10-09 19:33:43 +01:00
58a95f8836
Updated transitive composer dependencies
2021-10-09 19:18:32 +01:00
ccc881ee58
Switch to custom permission denied message
...
closes #4494
2021-10-09 00:57:15 +01:00
308d7c126a
Fixed world data ::generate() functions putting level.dat in the wrong place if the world path didn't end with a /
2021-10-08 23:39:25 +01:00
4910250a81
Config: fixed writeList()
2021-10-07 21:47:09 +01:00
e0d2e24698
fix CS (again\!)
2021-10-07 21:19:44 +01:00
d5f02a0bf8
Config: expose APIs to parse/emit list configs
2021-10-07 21:18:42 +01:00
2a3a57c519
Enable parsing/emitting .properties without creating a Config object
...
this is useful when the contents are just going to get passed straight into a model, making Config object redundant anyway.
2021-10-07 20:53:15 +01:00
5115387feb
fix CS (again)
2021-10-07 20:43:55 +01:00
dd0aaf59b5
MainLogger: Log exceptions as a single block message
2021-10-07 20:40:20 +01:00
a555f21b18
MainLogger: write messages before calling logger attachments
2021-10-07 20:32:02 +01:00
1be9b2f037
Config: drop packing of arrays
...
we don't handle arrays on decode, so there's no reason to support them on encode either.
2021-10-07 20:30:56 +01:00
32fd9879e5
fix CS
2021-10-07 20:16:54 +01:00
dc2e8e7e8f
ServerConfigGroup: do not assume that values are always bool|string
2021-10-07 20:02:21 +01:00
847e24fc41
4.0.0-BETA5 is next
2021-10-06 23:49:30 +01:00
9e6d740570
Release 4.0.0-BETA4
2021-10-06 23:49:13 +01:00
8e3772ceef
Block: fixed incorrect behaviour of isSameState() for multi-ID blocks
...
fixes #4492
2021-10-06 23:16:03 +01:00
e032b8fe20
Server: fixed stats reporting checking a nonexistent pocketmine.yml property
...
this was originally worked around by 47f7af6739 . However, that commit was just duct tape, and I never bothered to investigate if the config was being checked somewhere else.
Here's to a years-old bug finally getting fixed.
2021-10-06 22:23:41 +01:00
90800a4124
Config: Try to coerce types, similar to YAML
2021-10-06 21:09:23 +01:00
4b00465e24
Clean PHPStan baselines
2021-10-06 02:14:30 +01:00
10b3596eef
PluginDescription: use typed properties
2021-10-06 02:00:55 +01:00
258c38f9cd
PluginDescription: loosen invalid permission message (it might be wrong type as well as not existing)
2021-10-06 01:45:40 +01:00
d07517fe8b
Use an object to represent command entries in plugin manifest
2021-10-06 01:42:03 +01:00
31a176286d
Do not register plugin commands without valid permissions
...
this could lead to harmful results, e.g. if a developer typo'd while writing the plugin.yml, an admin-only command could become accessible to everyone, since commands are by default accessible by everyone.
2021-10-06 01:18:14 +01:00
1fafce6d6f
PluginBase: remove special true/false handling for command permissions
...
these aren't accepted as permission names anymore, and they never worked properly anyway.
2021-10-06 01:12:02 +01:00
5061bbbc25
fuck you git x2
2021-10-06 01:01:20 +01:00
a101d1cdf9
Drop pocketmine.plugin.fileError in favour of pocketmine.plugin.loadError
...
fileError was unnecessarily noisy, putting the directory path on the console twice. This conveys just as much information but with less wasted space.
2021-10-05 23:31:00 +01:00
fec48003d9
.....
2021-10-05 20:29:24 +01:00
e25c03eec1
Gracefully handle errors loading plugin manifest
...
this isn't perfect, but it covers the common cases.
Now, the server won't spam crashdumps just because some plugin declared nested permissions.
2021-10-05 20:28:43 +01:00
7245d15abe
PermissionParser: Throw more specific exceptions
2021-10-05 19:57:26 +01:00
13178a47a5
fuck you git
2021-10-05 19:11:10 +01:00
817ab88c70
Properly handle errors decoding network item NBT
...
since the NBT is now decoded immediately now, any incorrect NBT will cause exceptions to be thrown that we weren't handling, causing server crashes.
2021-10-05 19:10:55 +01:00
fef8297907
GiveCommand: don't crash on bogus item NBT
2021-10-05 19:09:46 +01:00
dbeaf27cb7
Document that Item::setNamedTag() may cause NbtException to be thrown
...
if the NBT is bogus for some reason
in PM3, these kinds of bugs wouldn't show up until/unless the item NBT was actually used, but on PM4, we decode it ahead of time, so the errors always show up immediately.
2021-10-05 19:09:22 +01:00
2db79cf58d
Fix build
2021-10-05 18:41:47 +01:00
7d06b76aaf
PluginManager: account for possible invalid format of API version
...
we're seeing a lot of crashes because of this.
2021-10-05 18:36:00 +01:00
0ad663ff50
Merge remote-tracking branch 'origin/stable'
2021-10-05 01:17:59 +01:00
a27c14c00c
phpstan: exclude build/php from analysis
...
in case I built PHP in there, I don't want the install_data getting analysed and screwing up the analysis.
2021-10-05 00:14:44 +00:00
5b26abcb0e
NetworkSession: fixed code copy pasta
...
these are not, in fact, equivalent.
2021-10-05 01:02:15 +01:00
f2d6059613
NetworkSession: Sync world spawn on world change
2021-10-04 22:51:31 +01:00
bb6ea8cbdc
Do not call PlayerLoginEvent during the Player constructor
...
this closes a lot of loopholes in the login sequence that plugins were using to cause crashes.
2021-10-04 22:36:50 +01:00
356a49d225
NetworkSession: account for possibility of syncGameMode() being called before the player is ready to receive it
...
close #4323
2021-10-04 22:13:42 +01:00
6332af3e59
Require RakLib 0.14.2 minimum
2021-10-04 21:50:11 +01:00
fb570970a8
Localize gamemode command errors
2021-10-02 21:22:54 +01:00
30e10c38b6
Localize /help
2021-10-02 20:59:36 +01:00
05dc675d5b
Replace commands.generic.notFound with a custom PM version
...
this also fixes #4379 .
2021-10-02 20:42:59 +01:00
d63b9d1648
WorldManager: localize strings for world loading, generation and conversion
2021-10-02 20:33:32 +01:00
f9e6fd44bc
Merge branch 'stable'
...
it looks like I goofed up the last merge and the changelog didn't get
merged into master.
2021-10-02 20:18:06 +01:00
0108888450
Process: silence taskkill complaining that it can't commit suicide
...
since taskkill is a subprocess of the server process, it gets included in taskkill's own attempted killing spree, but taskkill (wisely) won't kill itself.
2021-10-02 17:23:26 +01:00
dd0c2fed82
Process: add subprocess parameter to kill()
...
fix CommandReader subprocess lingering on a crash and fucking up the console
2021-10-02 16:56:24 +01:00
2566123e49
Remove unnecessary constant from PHPStan bootstrap
2021-10-02 16:34:38 +01:00
54174eefa0
Make sure COMPOSER_AUTOLOADER_PATH is always declared
...
Sacrifice dynamic composer autoloader path to do this, because we don't
need it anyway - it was a misconceived feature from the days when I used
the same workspace for PM3 and PM4 both.
2021-10-02 15:27:17 +01:00
f5266ec816
World: remove dead code leftover from 34f01a3ce3
...
fixes #4486
2021-10-02 12:33:46 +01:00
c6b2c63a9b
Remove a couple more dead errors from PHPStan baseline
2021-10-02 00:52:47 +01:00
f26f063164
UPnP: catch InternetException when attempting portforward
...
we might fail to get the internal IP for some reason, which shouldn't crash the server.
2021-10-02 00:52:14 +01:00
81d5598e96
UPnP: Fixed server crash on failure to find UPnP device
...
https://crash.pmmp.io/view/5241010
2021-10-01 23:27:58 +01:00
c7e9138994
PopulationTask: reduce code duplication
2021-10-01 23:18:56 +01:00
88f799da2c
more AssumptionFailedError hacks for PHPStan :(
...
the code in this class is really horrible
2021-10-01 23:05:48 +01:00
8de30e8162
FastChunkSerializer no longer serializes light by default
...
the core doesn't use this anywhere.
serializeWithoutLight() has been renamed to serializeTerrain() to more accurately describe what it does.
2021-10-01 22:57:22 +01:00
e6f6a036ef
LightPopulationTask: do not copy existing light arrays
...
this task wipes out the light arrays and recalculates them from scratch, so it's pointless to copy any preexisting light arrays anyway.
2021-10-01 22:34:11 +01:00
32f8b8163e
Clean out PHPStan l7 baseline
2021-10-01 22:19:36 +01:00
5b818827db
Chunk: stop exposing SplFixedArray<SubChunk> to the API
...
this fixes a large number of PHPStan errors, and also brings us a step closer to negative-build-height readiness.
2021-10-01 22:17:28 +01:00
42bf9578ce
Remove unused constants
2021-10-01 22:05:03 +01:00
aee4a00a50
Updated dependencies
2021-10-01 21:40:31 +01:00
2fdd8d039e
RakLib 0.14.1
2021-10-01 21:39:26 +01:00
349f37b15f
resource packs: manifest may also contain a list of dependencies
...
... which we should be verifying the presence of, as the server.
2021-10-01 21:14:28 +01:00
afa3349c04
Acknowledge the presence of capabilities field in resource pack manifest
...
closes #4485
2021-10-01 21:09:53 +01:00
6a8280b1ba
Lever: add block property APIs
2021-09-29 00:20:57 +01:00
003c002208
Bump phpunit/phpunit from 9.5.9 to 9.5.10 ( #4482 )
...
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit ) from 9.5.9 to 9.5.10.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases )
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md )
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.9...9.5.10 )
---
updated-dependencies:
- dependency-name: phpunit/phpunit
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-09-28 21:04:11 +01:00
d417b1e2f5
Projectile: fixed move() not using the given parameters ( #4481 )
...
it was using this->motion instead, which usually would be the same, but maybe not.
2021-09-28 21:03:03 +01:00
65e468e3c2
Updated build/php submodule to pmmp/php-build-scripts@6aac46e500
2021-09-28 21:00:13 +01:00
a11cf8c296
Update PHP versions used by GitHub Actions
2021-09-28 20:52:40 +01:00
c931c52617
AsyncTask: added newline
2021-09-27 13:53:30 +01:00
b3e8314b9f
PTHREADS_INHERIT_CONSTANTS is no longer needed for MainLogger to log exceptions
...
cleaned paths are now referenced from Filesystem instead of namespace constants.
2021-09-26 21:41:24 +01:00
f138004913
PlayerDeathEvent: fixed property type variance issue PHPStan complains about
2021-09-26 21:20:42 +01:00
8e2d06a880
ChunkSerializer: support writing 0 bpb palettes on the wire
...
these are now supported as of 1.17.30.
2021-09-25 01:17:32 +01:00
eb80515e99
Fixed incorrect parameter checking in BlockFactory::get() ( #4476 )
2021-09-24 15:47:11 +01:00
1cb540387c
4.0.0-BETA4 is next
2021-09-23 21:51:36 +01:00
9bc07a9cc0
Release 4.0.0-BETA3
2021-09-23 21:51:23 +01:00
5f1e66478b
changelog: mention UPnP API changes
2021-09-22 23:12:56 +01:00
36b8217e68
Updated to RakLib 0.14.0
2021-09-22 23:05:24 +01:00
d455188d03
3.23.2 is next
2021-09-22 01:00:50 +01:00
14fba36636
Release 3.23.1
2021-09-22 01:00:50 +01:00
43ac3fbf3e
actions: use newer PHP versions
2021-09-22 00:51:06 +01:00
352162a6e6
Fixed PHP 7.4 build
2021-09-22 00:50:00 +01:00
b3601c9390
Regenerate PHPStan baselines
2021-09-22 00:45:07 +01:00
817fec9e3d
EducationSettingsPacket: safeguard against purity issue reported by PHPStan
...
while annoying, PHPStan is right to complain about this, because putBool() is impure, meaning that these fields could have been mutated in the call.
We know they didn't, but PHPStan doesn't, and we can't mark the method as pure because .. well .. it isn't.
2021-09-22 00:44:52 +01:00
3813caf5ec
Updated BedrockProtocol and BedrockData for 1.17.30
2021-09-22 00:36:21 +01:00
e472c117e0
Merge branch 'stable'
2021-09-22 00:33:49 +01:00
ceeef7c729
3.23.1 is next
2021-09-22 00:29:24 +01:00
7f1b2a0ee5
Release 3.23.0
2021-09-22 00:29:24 +01:00
27324a3aeb
Protocol changes for 1.17.30
2021-09-22 00:26:39 +01:00
133398c69a
changelog: add newline
...
[ci skip]
2021-09-19 22:57:22 +01:00
52b6952771
changelog: baseline for 4.0.0-BETA3
...
[ci skip]
2021-09-19 22:55:48 +01:00
1ce388ca0b
Liquid: add getMinAdjacentSourcesToFormSource(), remove circular dependency between Liquid and Water
...
this unpleasantly-named method allows controlling the source-forming behaviour of liquids by changing the required number of adjacent sources that must be present in order for a new source to form. This allows stuff like non-infinite water.
2021-09-19 15:59:16 +01:00
971cbe3929
Liquid: restore mistakenly removed check
2021-09-19 15:42:17 +01:00
18de35ffc7
Liquid: use facing instead of hardcoded integers
2021-09-19 15:37:03 +01:00
576c33ee8f
Liquid: make flow vector calculation less cancerous to read
2021-09-18 23:04:28 +01:00
6b2ab15ea1
MinimumCostFlowCalculator: fix bug caused by recent change
2021-09-18 16:20:01 +01:00
027f7e249b
MinimumCostFlowCalculator: Use match statements where possible
...
coincidentally, this also fixes the build.
2021-09-18 16:17:08 +01:00
a9c4238c59
Liquid: Extract a big chunk of code to MinimumCostFlowCalculator
2021-09-18 16:13:38 +01:00
34e1b244fa
Liquid: split canFlowInto() over multiple lines
...
the original version is very hard to read.
2021-09-18 15:53:54 +01:00
b047100719
Liquid: improve minimum cost calculation handling
2021-09-18 15:52:16 +01:00
1b5071e074
Liquid: make some code slightly less cancerous to read
2021-09-18 15:28:45 +01:00
3836a57ba6
Player: add getPlayerInfo(), closes #4450
2021-09-17 22:17:36 +01:00
87dc763d92
actions: test that generated code is consistent
2021-09-17 16:46:27 +01:00
43b2e1a0e8
tools/convert-world: improve error messages and exit codes
...
die with a string exits with zero? wtf?
2021-09-16 15:28:20 +01:00
05e2bef5ce
ItemFactory: fix crash when checking if blockitem IDs are registered
2021-09-16 14:53:19 +01:00
6cf181b579
LevelDB: Use arrow functions for better readability
2021-09-16 14:44:56 +01:00
9490b78640
Move packet handler default implementations to BedrockProtocol
...
in many cases this will now require zero changes to PM at all to be compatible with a new protocol version.
2021-09-15 22:27:49 +01:00
59f3622f69
changelog: mention PluginLoadOrder changes ( #4458 )
...
[ci skip]
2021-09-15 17:18:53 +01:00
a1c82da2f2
Liquid: remove useless continue
2021-09-12 16:03:52 +01:00
84170ad3e1
Furnace: fixed deactivation after being reloaded from disk (regression from PM3)
...
closes #4430
2021-09-12 15:49:33 +01:00
ace8841d5d
Explosion: allow the normal blockupdate mechanism to deal with explosions
...
in PM4, all blockupdates are buffered, so the old 7x performance penalty that used to be incurred by doing this is no longer a problem.
Also, this actually reduces the overhead of explosions themselves by moving the onNearbyBlockChange() burden off explodeB() and into the main world ticking function.
2021-09-12 15:45:02 +01:00
5ddd94b7e8
Remove redundant World->isChunkGenerated() calls
...
isChunkGenerated() merely checks if the chunk can be loaded from disk, if it's not in the runtime cache already.
This is pointless in all of these cases, because the check is prefaced by an isChunkLoaded() check, which already limits the possibility anyway. If the chunk is not generated, it'll also be considered not loaded.
2021-09-12 15:21:09 +01:00
f0fa561c2f
World: use arrow functions in useBreakOn()
2021-09-12 15:16:55 +01:00
33a7c05425
Updated PHPStan baselines
2021-09-11 23:12:43 +01:00
273aa8ab42
Drop useless usage translation strings for commands with no parameters
2021-09-11 17:06:26 +01:00
3b7580688c
Stop auto-translating string descriptions/usages for commands
...
Require usage of Translatable for translations.
2021-09-11 16:46:40 +01:00
b65e3c69b1
4.0.0-BETA3 is next
2021-09-10 17:18:32 +01:00
26e3280fea
Release 4.0.0-BETA2
2021-09-10 17:18:31 +01:00
fa45d1cdb5
Merge branch 'stable'
2021-09-10 17:13:51 +01:00
33b5da3749
3.22.6 is next
2021-09-10 17:09:51 +01:00
40e88f1686
Release 3.22.5
2021-09-10 17:09:50 +01:00
c995c2de37
updated changelog
...
[ci skip]
2021-09-10 17:04:35 +01:00
7701e1ff98
InGamePacketHandler: fix regression in movement handling since 82c8fa696a
...
fixes #4291
fixes #4398
2021-09-10 16:52:46 +01:00
4111d92b98
Stop hardcoding chunk dimensions everywhere ( #4443 )
2021-09-10 16:13:25 +01:00
9d5a86fe53
Revert "World: make the second parameter for getCollidingEntities() mandatory and non-nullable"
...
This reverts commit e1b7bf31bb .
fixes #4447
2021-09-10 16:06:08 +01:00
cf762d345d
Player: Log debug messages when canInteract() prevents block interaction
2021-09-10 15:58:38 +01:00
f5c9c02e09
Improve documentation of Thread and Worker
2021-09-10 15:57:45 +01:00
32588d79c8
ConsoleReaderThread: remove useless code
2021-09-10 13:54:42 +01:00
1cc57afd25
Stop the ConsoleReaderThread explicitly, instead of letting ThreadManager do it
...
this hack dates back to the days when the console reader would get stuck on shutdown on some platforms.
2021-09-10 13:48:01 +01:00
334bf1277d
BlockTransaction: Return failure if no blocks were changed
...
fixes #2813
2021-09-10 00:32:46 +01:00
082f0f2d57
Player: Generate an InventoryTransaction (with event) for crafting grid/cursor evacuation
...
this fixes the crack in the armour that allows creative players to drop items even when all drops are being cancelled by plugins.
closes #3284
2021-09-09 17:11:59 +01:00
5d4f14b388
Added TransactionBuilderInventory for server-side inventory transaction generation
2021-09-09 17:10:04 +01:00
4a787769bf
Merge branch 'stable'
2021-09-09 16:06:16 +01:00
4c65a0cdaa
LegacySkinAdapter: Use 64x64 for persona polyfilled skins
...
64x32 has some corruption issues and generally just looks really bad.
2021-09-09 16:04:43 +01:00
e0e19c67ef
World: do not warn about leaked Player entities during world unload
...
this raises false-positives during shutdown if players were online.
The fact that the player entity leans on the World to clean up after it is slightly problematic, but I'm not sure what else to do about it for now.
2021-09-09 15:55:37 +01:00
6f8261f26a
Added changelog so far for beta2
2021-09-09 01:32:39 +01:00
34f01a3ce3
World: Track entities separately from chunks
...
this allows entities to exist outside of generated chunks, with one caveat: they won't be saved in such cases.
Obviously, for player entities, this doesn't matter.
fixes #3947
2021-09-09 01:17:41 +01:00
ba2bfe0e11
World: depopulate neighbourBlockUpdateQueueIndex sooner
...
this fixes 2 problems:
1) Blocks which set themselves to something else during onNearbyBlockChange() would not receive any block update
2) A memory leak when blocks in unloaded chunks were scheduled for an update.
I'm a little uneasy about this change, because there must have been some reason why I put this at the end of the block and not at the start, but whatever it is, I can't reason about it, and there's reasons not to put it at the end too.
2021-09-08 22:11:17 +01:00
b9b1ba9526
Include eye height in Living->lookAt() calculation ( #4440 )
2021-09-08 21:54:32 +01:00
dca5a9d8ea
Remove PHP Version from notice. ( #4442 )
2021-09-08 17:00:12 +01:00
7c943880b2
Do not show update notifications to users running from git sources
2021-09-07 23:52:11 +01:00
b8a15b647c
Updated build/php submodule to pmmp/php-build-scripts@ad9cd1fdb4
2021-09-07 22:35:02 +00:00
627c70c4df
actions: use chunkutils2 0.3.1
2021-09-07 22:55:50 +01:00
bc6e73e81d
SubChunk: fixed light array GC since native LightArray introduction
...
since this went native, there was no support for copy-on-write, so this was only lazy-inited, but never cleaned if the array remained empty.
2021-09-07 22:54:54 +01:00
11d2e1ef08
Require ext-chunkutils ^0.3.0
2021-09-07 22:53:50 +01:00
c605b54591
Accept dev versions of chunkutils2
2021-09-07 22:52:00 +01:00
0f70348821
Remove noise
2021-09-07 20:31:13 +01:00
72fb49b356
World: add notifyNeighbourBlockUpdate() to allow triggering neighbour block updates on blocks manually
...
this can be useful if blocks were modified asynchronously.
2021-09-07 20:18:53 +01:00
ac55b21fb4
4.0.0-BETA2 is next
2021-09-07 14:19:29 +01:00
210b9c7b75
Release 4.0.0-BETA1
2021-09-07 14:19:29 +01:00
57e2b16139
Dropped PreProcessor
2021-09-07 14:04:52 +01:00
806f03bd37
consistency ...
2021-09-07 13:00:28 +01:00
39820be836
draft-release: preprocess only src of dependencies
...
p sure we had this problem already somewhere else? ...
2021-09-07 12:59:32 +01:00
7276e9610c
fixing draft-release for PM4
2021-09-07 12:49:39 +01:00
06a0e37b94
Fixed build info generation for PM4
2021-09-07 12:47:41 +01:00
64347e9499
Merge branch 'stable'
2021-09-07 12:45:52 +01:00
c948aa94aa
Fixed new files in build/ keeping getting missed
2021-09-07 12:39:54 +01:00
5d0d1aa4c5
Include build/generate-build-info-json.php in analysis
2021-09-07 12:36:42 +01:00
9b8be22015
Sort phpstan.neon
2021-09-07 12:32:19 +01:00
dd4abe7f7a
Updated test
2021-09-07 12:27:24 +01:00
da0482d330
Solidify version comparison
2021-09-07 12:24:16 +01:00
9a745ffc09
Do not enforce suffix checks for API versions
2021-09-07 12:06:36 +01:00
580b53eb9b
update changelog
...
[ci skip]
2021-09-07 12:05:13 +01:00
710345d4b0
Implemented Farmland turns to dirt when jumped on. ( #4434 )
2021-09-06 12:55:52 +01:00
931c3ed77d
Entity: fixed current movement not being accounted for in fall height
...
this caused incorrect damage when falling from heights, as well as a bug in #4434 .
2021-09-06 12:53:52 +01:00
956780c6a6
Entity: add getters and setters for fallDistance
2021-09-05 23:59:04 +01:00
df3b112877
Implemented slime blocks
2021-09-05 20:46:59 +01:00
8e2486b96a
Bed: bounce doesn't apply if the entity was sneaking
2021-09-05 20:14:17 +01:00
ded778f422
Implemented bed bouncing
2021-09-05 20:11:49 +01:00
b0b28ec6ed
3.22.5 is next
2021-09-05 15:47:54 +01:00
2fb4704269
Release 3.22.4
2021-09-05 15:47:54 +01:00
0c0eb72b1b
make-release: display the current and next version numbers
2021-09-05 15:46:40 +01:00
466107d3b8
actions: fix release build shitting the bed
2021-09-05 15:45:07 +01:00
4f59d3487a
3.22.4 is next
2021-09-05 15:42:39 +01:00
65220b4f7f
Release 3.22.3
2021-09-05 15:42:38 +01:00
85eb6b30a5
Player: do not allow doFirstSpawn() to be executed before the constructor is called
...
this problem doesn't exist on PM4.
2021-09-05 15:38:14 +01:00
1c2eb35025
actions: fixed bad git hash on published releases
2021-09-05 15:32:31 +01:00
92f3a7d206
make-release: allow specifying the nextVer as well as currentVer
2021-09-05 15:29:55 +01:00
e1b7bf31bb
World: make the second parameter for getCollidingEntities() mandatory and non-nullable
...
the only reason to use getCollidingEntities() instead of getNearbyEntities() is if you have an entity that may or may not be collidable depending on certain conditions.
Really, I don't think this logic belongs in World at all, but for now it has to stay, because some other stuff depends on it.
2021-09-05 15:22:12 +01:00
2fc33d3bff
World: remove unused variable
2021-09-05 15:15:48 +01:00
19513c65f0
World: avoid code duplication between getCollidingEntities() and getNearbyEntities()
...
these two methods are very misleadingly named, but they do almost exactly the same thing - the only difference is that getCollidingEntities() does a couple of additional checks.
2021-09-05 15:13:22 +01:00
d4d00a9b80
Living: added calculateFallDamage()
...
to clean up the way that fall damage is handled for flying players; also, onHitGround() isn't only doing fall damage things these days.
2021-09-05 14:36:58 +01:00
6b7e671794
Living: use Vector3->down() instead of subtract().
2021-09-05 14:12:04 +01:00
17dfd2cc52
Living: Trigger fall sounds on the nearest collidable block below
...
we can't have landed on it unless it actually has a collision box - otherwise, we only landed _in_ it.
This assumes, of course, that no blocks have bounding boxes >= 2 blocks tall, which currently none do.
2021-09-05 14:10:54 +01:00
d329bfb25d
Entity: rename movX/movY/movZ to wantedX/wantedY/wantedZ
...
this makes the code much easier to understand.
2021-09-05 14:06:53 +01:00
73cc841d0b
Entity: rename checkBlockCollisions() to checkBlockIntersections()
2021-09-05 14:00:27 +01:00
8be1f34736
Entity: Rename fall() to onHitGround(), and make it protected
...
this had no business being exposed to public API in the first place.
2021-09-05 13:36:40 +01:00
6ecad153ea
Entity: remove fallDistance parameter from fall()
2021-09-05 13:34:43 +01:00
7e82cafdeb
Entity: remove a bunch of commented code that no one cares about
2021-09-05 13:27:48 +01:00
7d5b9295cb
PoisonEffect should accept Translatable|string, like its parent
...
this doesn't really break anything, but someone will likely whine about consistency if it's not fixed now.
2021-09-03 21:33:55 +01:00
0404298c74
Effect: get rid of runtimeIDs
2021-09-03 21:25:06 +01:00
c062282954
Drop enchantment runtime IDs
2021-09-03 21:20:43 +01:00
ed1e7322dd
be quiet phpstan
2021-09-03 21:16:37 +01:00
f95eb6a218
Server is not cloneable
2021-09-03 21:08:29 +01:00
62435fe935
Standardize clone denying
2021-09-03 21:07:39 +01:00
b026ada489
Standardize serialize denying
2021-09-03 21:07:10 +01:00
aa5a9f6d12
Enchantment: use Translatable instead of hardcoded translation keys
2021-09-03 20:52:05 +01:00
fbbaef4401
Enchantment: use promoted properties
2021-09-03 20:41:43 +01:00
665f2473e1
Effect: stop using hardcoded translation keys for names
2021-09-03 20:39:02 +01:00
8e58beef7f
Effect: use promoted properties
2021-09-03 20:32:13 +01:00
078347b44a
MemoryManager: fixed a PHPStan error
2021-09-03 20:26:58 +01:00
f207f9e3e9
Merge remote-tracking branch 'origin/stable'
2021-09-03 20:00:15 +01:00
2e153624ad
Anvil: actually add slot constants, this time
2021-09-03 12:44:41 +01:00
963f4a9cf3
Added constant slot IDs for Furnace, Enchanting, Anvil and Brewing Stand inventories
2021-09-03 12:16:07 +01:00
85ed7efcb4
PHPStan 0.12.98
2021-09-03 11:50:18 +01:00
183489e863
PHPUnit 9.5.9
2021-09-03 11:47:31 +01:00
ac060f2ec6
Update build/php submodule to pmmp/php-build-scripts@e55c60f176
2021-09-03 11:45:43 +01:00
2fe03757d5
PopulationTask: fixed PHPStan errors
2021-08-30 00:26:54 +01:00
e0d6357eb7
OreType: use promoted constructo properties
2021-08-30 00:18:34 +01:00
0289b45202
Chunk: Drop dirty flags for tiles and entities
...
instead, just ungate this and allow the provider to decide what to do.
Any chunk that contains entities or tiles is already always considered dirty, so the only thing the flags are good for is flagging chunks that previously had tiles and/or entities but no longer do.
In those cases, it's just removing keys from LevelDB anyway, so it's already very cheap.
Avoiding these redundant deletions is not worth the extra complexity and fragility of relying on flags to track this stuff.
2021-08-30 00:09:36 +01:00
6c85d4d254
CommandReader: fixed CS with php-cs-fixer 3.1.0
2021-08-29 23:35:07 +01:00
4b06e19d28
Cover tools/ in php-cs-fixer
2021-08-29 23:33:07 +01:00
7def3db781
Fixed generate-known-translation-apis script not getting PHPStan'd
2021-08-29 23:32:08 +01:00
ee8b854f30
Add tools/ to PHPStan analysis
2021-08-29 23:31:24 +01:00
6bbc0aae7d
Merge branch 'stable'
2021-08-29 23:23:30 +01:00
f506c922b5
phpstan.neon.dist: fix indentation inconsistency
...
fuck you, phpstorm!
it doesn't have an option to use tabs for indentation in YAML, and YAML is the closest thing to NEON, so ...
2021-08-29 23:19:35 +01:00
994a2c9eb9
Clean up entity/tile data loading from world providers
2021-08-29 23:11:18 +01:00
533b0d0724
Updated convert-world CLI tool
2021-08-29 21:04:59 +01:00
b4e23a57d2
CraftingDataCache: Replace hardcoded recipe block names with constants from BedrockProtocol
2021-08-29 16:26:18 +01:00
510b75ef38
Use tagged version of BedrockProtocol
2021-08-29 16:23:56 +01:00
8847aa2d7f
LegacyStringToItemParser: mark as deprecated, and point people towards StringToItemParser, which is much nicer
2021-08-29 16:13:19 +01:00
dee2062b1b
CraftingManager: Reduce footprint of recipe keys
...
this was using json before, which is horribly inefficient.
This saved about 200 KB of memory on initial startup (which isn't much, but for more complex recipes, it might have been significantly worse.
2021-08-29 15:49:18 +01:00
c2558573e2
Fix offhand pickup ( #4412 )
2021-08-29 12:45:23 +01:00
2139171a55
added BlockItemPickupEvent class ( #4402 )
2021-08-29 00:40:09 +01:00
3fe6ce7d1f
[ci skip] changelog: mention StructureGrowEvent
2021-08-27 21:02:52 +01:00
43d90d621d
[ci skip] update changelog
2021-08-27 20:55:19 +01:00
938e430b0f
Convert Populator into an interface
2021-08-27 20:41:54 +01:00
c7f78bec15
Added missing change to complete beba0ffe15
2021-08-27 20:33:17 +01:00
6c1fec8a29
Tree: renamed generateChunkHeight to generateTrunkHeight
...
I guess it must have been late at night when I originally wrote this code.
2021-08-27 20:32:07 +01:00
beba0ffe15
Remove circular dependency between Tree and its children
2021-08-27 20:25:21 +01:00
4778c1483a
Tree: fixed formatting error
2021-08-27 20:14:31 +01:00
8f89c04c51
Refactor Tree classes ( #4407 )
2021-08-27 20:11:05 +01:00
a5b08fc8f2
Rewrite CONTRIBUTING.md to be more developer-oriented
2021-08-27 15:05:57 +01:00
c3c4c80b70
SECURITY: drop supported versions table
...
this isn't actively maintained, so it's misleading.
[ci skip]
2021-08-27 13:53:01 +01:00
5695fa9086
CONTRIBUTING: fixed a broken link
...
[ci skip]
2021-08-27 13:51:16 +01:00
ee16a00c57
World: do not attempt placement of itemblock if stack size is zero ( #4410 )
...
This doesn't make any sense, and also caused a crash.
2021-08-27 13:14:56 +01:00
d9b9aed2cc
Fixed CS
2021-08-26 15:31:28 +01:00
7919a1a1c5
Drop support for commands with spaces in the names
...
the use case for this is basically zero, since the community prefers implementing their own subcommand systems instead (which are much more flexible).
In addition, allowing spaces in command names makes it extra complicated to display helpful information to the user, such as the command that was actually accepted by the command map (which would be useful for identifying accidental invisible characters / control characters when sending commands).
2021-08-26 15:24:35 +01:00
e140614a63
Localize /gc
2021-08-26 15:06:43 +01:00
239534995f
Update preprocessor submodule to pmmp/PreProcessor@8a3163aad6
2021-08-26 13:32:50 +01:00
47120022c2
Localize messages for /op and /deop
2021-08-26 13:31:19 +01:00
f78808bad0
Bump phpstan/phpstan-strict-rules from 0.12.10 to 0.12.11 ( #4401 )
...
Bumps [phpstan/phpstan-strict-rules](https://github.com/phpstan/phpstan-strict-rules ) from 0.12.10 to 0.12.11.
- [Release notes](https://github.com/phpstan/phpstan-strict-rules/releases )
- [Commits](https://github.com/phpstan/phpstan-strict-rules/compare/0.12.10...0.12.11 )
---
updated-dependencies:
- dependency-name: phpstan/phpstan-strict-rules
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-08-25 20:41:11 +01:00
4189fbdaef
Added StructureGrowEvent ( #4354 )
...
This event is currently fired for tree and bamboo growth. Its intended use is for any plant growth that affects multiple blocks at once.
TODO: We could explore using this for cacti and sugarcane?
2021-08-25 14:05:30 +01:00
6e68e99ec0
Added PlayerEntityInteractEvent ( #4374 )
2021-08-24 11:56:10 +01:00
224d71f272
World: renamed getChunks() to getLoadedChunks() ( #4393 )
2021-08-23 21:23:35 +01:00
2d025bf02f
Populate StringToItemParser with some names from VanillaBlocks
...
this makes just about everything easily accessible via commands.
There are some stuff that shouldn't be here due to not being actual items (e.g. door blocks, bed blocks, wall coral fans) but since there were legacy aliases for all those things already, I figured what the heck - it's more effort to exclude them, so whatever.
2021-08-23 14:49:30 +01:00
78b0275a6c
StringToItemParser: added a bunch of nice new aliases
...
this should especially make potions less cancerous to /give.
2021-08-23 14:25:00 +01:00
7fd712c1ff
Refactor Block & Tile: getPos() to getPosition() ( #4395 )
...
this also changes the name of the class property 'pos' to 'position' as well as Block->getPosOffset() to Block->getPositionOffset()
2021-08-23 14:01:32 +01:00
dc0082162b
Bump phpstan/phpstan from 0.12.95 to 0.12.96 ( #4397 )
...
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan ) from 0.12.95 to 0.12.96.
- [Release notes](https://github.com/phpstan/phpstan/releases )
- [Commits](https://github.com/phpstan/phpstan/compare/0.12.95...0.12.96 )
---
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-08-23 13:53:20 +01:00
22316976fa
Introduce next-generation StringToItemParser
...
this isn't specced up with some of the finer features of LegacyStringToItemParser such as metadata parsing, but those are still a work in progress (and probably limited to specific items like durable stuff).
The goal is to unbind these aliases from legacy internal IDs, while also providing a nice flexible way for plugins to add their own items and aliases to the existing system.
This system allows mapping a string to any item at all, irrespective of state, internal IDs, or any of that nonsense. This means it's finally possible to have stuff like lapis_lazuli and bone_meal aliases in commands.
2021-08-23 00:39:20 +01:00
044b2f54ac
Fixed build
2021-08-22 23:13:25 +01:00
270ee5c085
Simplify registry method generation
2021-08-22 23:02:36 +01:00
1ce9474fce
Picked up items can now be added to offhand slots. ( #4360 )
2021-08-22 20:36:12 +01:00
cd9af7f9f6
Utils: be explicit about class existence checking in testValidInstance()
2021-08-21 15:57:57 +01:00
4d73c93886
fix CS
2021-08-21 15:54:11 +01:00
7d9f8ff4ed
World: do not use static:: for private property access
2021-08-21 15:46:19 +01:00
5f3c9e6f19
Timezone: fix some implicit boolean type conversions
2021-08-21 15:43:30 +01:00
686bf398d5
BlockFactory: simplify get() code
2021-08-21 15:41:00 +01:00
4023a024ce
[ci skip] update changelog
2021-08-21 00:15:38 +01:00
14577daae3
fixed build
2021-08-20 23:52:34 +01:00
668df85e3f
Merge branch 'stable'
2021-08-20 23:08:17 +01:00
f5a4baf3cf
AsyncTask: regroup some methods into more sensible places
...
how the fuck is anyone supposed to find anything??
2021-08-20 23:00:39 +01:00
eb9188c309
Replace InventoryPickup*Event with EntityItemPickupEvent ( #4384 )
...
The rationale here is that inventories don't actually pick items up - their holders do.
It's especially misleading to say that an inventory is picking up an item in creative mode when the picked-up item can't actually be added to the target inventory in the first place.
This change allows a range of new functionality, such as:
- Allowing survival players to pick items up even when their inventories are full, similarly to creative players
- Changing the destination inventory of collected items (e.g. items could be redirected to the offhand or ender chest inventory, while still allowing other plugins to understand what's happening)
As an added bonus, this obsoletes one more use case for Inventory->getHolder(), bringing us one step closer to removing the cyclic reference nightmare from inventories.
The choice of naming (EntityItemPickup, instead of EntityPickupItem) is to be consistent with other events, where the word order is SubjectObjectActionEvent.
2021-08-20 22:59:35 +01:00
34a7405820
Player: fixed player can fly after respawn ( #4388 )
2021-08-20 22:51:36 +01:00
ff4aa148ef
phpstan 0.12.95
2021-08-20 22:47:29 +01:00
e43d39c0bc
UpdateChecker: improve type handling
2021-08-20 20:06:09 +01:00
e113981750
UpdateChecker: be less wordy
2021-08-20 19:59:55 +01:00
950dadab0c
UpdateChecker: be less noisy
...
we already have a log prefix, so there's no need for this spam as well.
2021-08-20 19:56:55 +01:00
d488c25a1a
Rename AutoUpdater -> UpdateChecker
2021-08-20 19:54:08 +01:00
63e86fe806
Config: fixed incorrect fluent @return annotations
2021-08-20 14:44:59 +01:00
ab05bc7379
Replace some references to Pocket Edition with Bedrock Edition
...
closes #4387
2021-08-20 14:23:11 +01:00
17c7e25346
resourcepacks: use typed properties in JSON models
2021-08-19 16:12:04 +01:00
5478b7cb63
UpdateInfo: use typed properties
2021-08-19 16:07:11 +01:00
7ba34927c9
Update UpdateInfo JSON model to be compatible with new updater API
2021-08-19 15:57:53 +01:00
bf8b5905e4
Player: Play ItemBreakSounds when items break due to usage
...
closes #4381
2021-08-19 15:56:40 +01:00
a5b85e095a
Fixed some missing function imports
...
these weren't getting corrected since php-cs-fixer 3.0 due to a change in the default configuration for native_function_invocation. Since the builds are randomly choosing to use php-cs-fixer 2.19 at the moment, the consistency is a problem.
2021-08-19 15:40:43 +01:00
b4b3c21d30
Merge branch 'stable'
2021-08-19 15:39:16 +01:00
1a395a51c9
Fixing function import inconsistencies since php-cs-fixer 3.0 migration
2021-08-19 15:26:45 +01:00
142c8f067b
fix CS in php-cs-fixer config
...
unfortunately i can't seem to make it fix itself
2021-08-19 15:25:20 +01:00
cd3c96aad2
shivammathur/setup-php 2.12.0
2021-08-19 02:31:18 +01:00
19c47fa71f
3.22.3 is next
2021-08-18 14:14:58 +01:00
d670bc8bf8
Release 3.22.2
2021-08-18 14:14:54 +01:00
7bd8d09023
GitHub Actions: automatically build and upload release artifacts, and auto-update update.pmmp.io ( #4376 )
2021-08-18 14:02:52 +01:00
83805a3406
Entity: use match in checkObstruction()
2021-08-17 20:44:49 +01:00
5a970541f9
actions: use newer pthreads version
2021-08-16 23:15:47 +01:00
e561fa6222
actions: update PHP versions
2021-08-16 23:14:17 +01:00
b3298d7c77
Fix Skull->asItem() ( #4375 )
2021-08-16 19:06:30 +01:00
a012e7ccc0
VersionInfo: make static methods more constant-like
...
if we could have class constants declared at runtime, these would be constant.
2021-08-16 16:37:36 +01:00
5da90b9530
Stop auto-translating strings when not asked
...
fixes #4371
2021-08-15 20:44:27 +01:00
a81680c5c6
missed a few more hardcoded translation keys
2021-08-15 20:12:55 +01:00
039c59856d
Remove % translation prefixes dotted around all over the place
2021-08-15 20:03:38 +01:00
39cdf23bd5
Language: Attempt to treat parameters as translation keys, even if they don't have %prefixes
...
%prefixes should only be necessary for embedded translations where the key isn't at the start of the string.
Longer term we should just drop raw string translation entirely and just translate Translatables exclusively, but this is a stepping stone.
2021-08-15 20:00:58 +01:00
1aa541aefe
Utils: remove useless commented code
2021-08-15 19:38:55 +01:00
dfc82f6820
VanillaCommand: fix bogus mixed typehints
2021-08-15 19:32:33 +01:00
60ac76a3bc
Remove more usages of hardcoded translation keys
2021-08-15 19:22:40 +01:00
752d1179a1
Do not rely on random translation keys prefixed with % getting translated
2021-08-15 19:05:05 +01:00
715fbc9ee5
fix last remaining non-usages of KnownTranslationFactory
2021-08-15 16:35:51 +01:00
789a669395
Rename TranslationContainer -> Translatable
2021-08-15 16:17:46 +01:00
5bdcc0339f
build/generate-known-translation-apis: make the ref to TranslationContainer statically analysable
...
this ensures that it will follow refactors automatically with no additional changes.
2021-08-15 16:13:07 +01:00
177eecf9ee
[ci skip] changelog: mention recent translation changes
2021-08-15 16:04:27 +01:00
db90b40bdd
Command: remove unnecessary branching in broadcastCommandMessage()
...
this problem is handled automatically now that nested translations are supported.
2021-08-15 16:00:16 +01:00
4748b0db37
PluginManager: remove unused import
2021-08-14 21:28:38 +01:00
8b9d7d6390
Support for nested TranslationContainers
2021-08-14 20:57:13 +01:00
804d02b086
TranslationContainer: added prefix(), postfix() and format()
2021-08-14 16:08:22 +01:00
13d4131d0d
Remove player update warnings
...
a player ingame is not going to have access to the terminal to update PM, and if they do, they can see the warning on the console themselves anyway.
2021-08-14 13:27:21 +01:00
ecdfd9ea26
Terminal: reduce code duplication in getFallbackEscapeCodes()
2021-08-13 14:04:13 +01:00
78c2dcaee5
Terminal: fixed crash on platforms which don't support tput fully
...
in 8-bit colour mode, it seems that ITALIC is not supported. This only showed its face now because of typed properties.
closes #4365
closes #4366
2021-08-13 14:00:17 +01:00
025dde19ce
Bump phpstan/phpstan-phpunit from 0.12.21 to 0.12.22 ( #4367 )
...
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit ) from 0.12.21 to 0.12.22.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases )
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/0.12.21...0.12.22 )
---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
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-08-13 12:51:34 +01:00
2ca7fc7254
Server: add native return types to getters that were skipped first time
2021-08-12 23:56:43 +01:00
0e0bbdfb70
Use typed properties in Server
2021-08-12 23:52:39 +01:00
e907c70160
...
2021-08-12 23:37:24 +01:00
34309bc810
TextFormat: do not assume that an array given to toHTML() is actually a tokenized string
...
this is a far stretch, since the documentation doesn't mention that the string needs to be tokenized. Anyone passing an array in here is most likely doing so by mistake.
2021-08-12 23:37:00 +01:00
a59ac522ee
Terminal: do not assume that an array given to toANSI() is actually a tokenized string
...
this is a far stretch, since the documentation doesn't mention that the string needs to be tokenized. Anyone passing an array in here is most likely doing so by mistake.
2021-08-12 23:35:45 +01:00
ab232ee759
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-08-12 23:32:05 +01:00
d30371be11
Command: Assume that TranslationContainer->getText() returns a valid translation key
...
there's no reason for it not to be.
2021-08-12 23:31:37 +01:00
58bc9332cd
Workaround for offhand sync ( #4359 )
...
fixes #4231
2021-08-12 23:27:53 +01:00
27e0ecf7ee
Implemented Blast Furnace and Smoker ( #4362 )
2021-08-12 23:27:05 +01:00
483c16cc41
Updated to ramsey/uuid 4.2.1
2021-08-12 20:42:23 +01:00
ce70dc48c0
composer.json: added update-translation-apis custom command
2021-08-12 20:37:03 +01:00
fd41a0f510
Remove colors from VersionCommand
...
these will have to stay gone for now, until we have some way to terminate formatting codes without breaking logger output. (we need &p!! #4364 )
2021-08-12 20:35:34 +01:00
d18b5cb306
composer.json: added update-registry-annotations command
2021-08-12 20:30:21 +01:00
662d1a35ff
generate-registry-annotations: skip files that don't contain classes
2021-08-12 20:29:21 +01:00
6a2a4cca4d
Terminal: use match instead of switch in toANSI()
...
phpstan seems to have some trouble with large match statements (phpstan/phpstan#5454 )
2021-08-12 20:13:44 +01:00
2782af7e22
Terminal: use typed properties
2021-08-12 19:41:16 +01:00
4d683c63d8
TextFormat: remove toJSON()
...
this is not used in the PM core, and is only used by 1 plugin in the whole public ecosystem: BigBrother. It makes more sense to make BigBrother maintainers shoulder the responsibility of maintaining this code, since they are the only ones that need it - besides, if this changed in any MCJE update in the last 5y, nobody has updated it, and nobody has maintained it either due to not having a fucking clue what the thing is for (the documentation is basically nonexistent).
2021-08-12 13:43:58 +01:00
eb24e040f3
TextFormat: add COLORS and FORMATS constants
2021-08-12 13:13:33 +01:00
28bfe9fbb4
emit_performance_warnings(): Log a warning when using a PHP debug build
2021-08-11 20:14:03 +01:00
99e68fb5d3
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-08-10 19:48:39 +01:00
f42c9bb6d6
Removed unused translation
2021-08-10 19:48:30 +01:00
cf77b33c3b
Bows can now use offhand arrows ( #4356 )
2021-08-10 19:36:57 +01:00
2cdd6e634f
New /version format
2021-08-10 19:32:28 +01:00
2ad5de379f
HandlerListManager::unregisterAll() accepts RegisteredListener
...
since all this function is doing is passing the object on to the HandlerList, it should accept RegisteredListener, like HandlerList::unregister().
2021-08-10 15:28:11 +01:00
b4c0ddd155
Use native union types for TranslationContainer|string
2021-08-10 15:17:26 +01:00
27a2d06083
Fix CS
2021-08-10 14:53:03 +01:00
2293bd948d
Added KnownTranslationFactory and use it in as many places as possible
...
this makes translation usage much more statically analysable.
The only places this isn't used are:
- places that prefix translations with colours (those are still a problem)
- places where server/client translations don't match (e.g. gameMode.changed accepts different parameters in vanilla than in PM)
2021-08-10 14:50:40 +01:00
d39080c45a
TranslationContainer: Add support for named translation parameters
...
this also fixes use cases like:
[1] = something;
[0] = match(...)
It made no sense whatsoever to discard the keys anyway.
Language::translateString() already supported named parameters since
forever anyway.
2021-08-10 14:26:54 +01:00
de61417bb6
Simplify console subprocess require hack
2021-08-08 18:53:13 +01:00
4c10dcaa53
ConsoleReaderThread: fixed UTF-8 paths getting corrupted on the way to the subprocess in some cases
...
I was never able to reproduce this, but it appears that Windows breaks the character encoding of command parameters (and also unicode environment variables, even though UNICODE_ENVIRONMENT should be set in php-src) when the file path contains Unicode characters (such as Cyrillic).
We workaround this problem using base64, which is an abysmally shitty hack, but not worse than using a subprocess for ConsoleReader in the first place. PHP fucking sucks, and so does Windows.
closes #4353
2021-08-08 16:19:08 +01:00
91cb374220
LevelDB: fixed isPopulated state getting lost after chunk unload/reload
2021-08-08 16:01:45 +01:00
041d314190
HandlerListManager: apply class-string type for getListFor() parameter
2021-08-05 20:11:58 +01:00
b72d81be5e
Cleanup PHPStan baselines
2021-08-04 21:24:13 +01:00
b31dce2119
Player: fixed type of loadQueue field
2021-08-04 21:17:44 +01:00
61b7faae08
Simplify BaseInventoryTest
2021-08-04 21:01:01 +01:00
00984c1b9f
BaseInventory: Move contents of InventoryHelpersTrait back inline
...
I moved these to a trait in anticipation of having multiple full Inventory implementations. That's no longer necessary because of the abstraction of SimpleInventory.
2021-08-04 20:57:20 +01:00
bb79797b68
WhitelistCommand: fixed permission checking
...
closes #4349
2021-08-04 20:34:54 +01:00
71c6f69fd3
Command: standardise permission checking
...
if subcommands had different permissions, the permissionMessage would not be used.
2021-08-04 20:29:07 +01:00
cd53fa162b
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into stable
2021-08-03 20:22:41 +01:00
efb677d5d5
Merge branch 'stable'
2021-08-03 20:22:17 +01:00
748e9705ba
Updated build/php submodule to pmmp/php-build-scripts@49971716b0
2021-08-03 20:20:56 +01:00
50b4ec0d20
Override timeout for the subprocess also
2021-08-03 18:50:36 +01:00
16965fa742
ConsoleReaderThread: override default socket timeout for accept
...
otherwise, people can break the console reader by setting the default timeout to zero or some other small value.
2021-08-03 18:48:18 +01:00
c567ed4b7a
fix build error
2021-08-03 15:32:21 +01:00
565cf84e1b
MemoryManager: use typed properties
2021-08-03 15:13:28 +01:00
dcd203370b
Player: make use of typed properties
...
readability significantly benefits from use of typed properties here.
2021-08-03 15:02:32 +01:00
219ed81389
Player: Fixed items on the crafting grid disappearing when the player disconnects ( #4344 )
2021-08-02 19:48:36 +01:00
8221475ce2
BlockDataSerializer: fix wrong exception type being thrown
2021-08-02 19:20:19 +01:00
bdac98beaf
Block: get rid of getNonPersistentStateBitmask(), add writeStateToItemMeta()
...
this is more flexible and less confusing.
2021-08-02 19:17:24 +01:00
01b48a21d9
Simplify NetworkSession ticking
...
we need to tick sessions every tick anyway, because other stuff is happening (e.g. sync attributes/entity metadata, batch buffer flush).
2021-08-02 14:32:00 +01:00
6a7196530c
Bump phpunit/phpunit from 9.5.7 to 9.5.8 ( #4345 )
...
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit ) from 9.5.7 to 9.5.8.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases )
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md )
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.7...9.5.8 )
---
updated-dependencies:
- dependency-name: phpunit/phpunit
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-08-02 11:52:17 +01:00
eb23d27004
composer: accept ext-leveldb ^0.3.0
2021-07-31 18:11:34 +01:00
1bbf739385
the function stringToLegacy gives already null useless to put a default null ( #4338 )
2021-07-31 16:54:31 +01:00
22c3736d63
LightUpdate: micro optimisations opcache isn't smart enough for
...
this removes 6 unnecessary opcodes from computeSpreadLight() and 3 from computeRemoveLight(). Tested with opcache.opt_debug_level=0x20000.
2021-07-30 23:30:28 +01:00
3319fad863
Fix build error
2021-07-26 20:33:44 +01:00
2b5667a56b
Move PHP minimum to 8.0
2021-07-26 20:29:39 +01:00
09eac0e129
Merge remote-tracking branch 'origin/stable'
2021-07-26 20:14:33 +01:00
f9863acadc
Restart console reader subprocess if it dies
...
this can happen for a bunch of different reasons, which are all indistinguishable. This also fixes pmmp/PcntlSignalHandler#3 .
2021-07-26 15:38:38 +01:00
c2c9132812
ConsoleReaderThread: say what actually happened when we fail to read commands
2021-07-26 15:17:24 +01:00
c7bb77e24a
ConsoleReaderChildProcess: die voluntarily if connection to server process is closed
...
this happens if the parent process is killed via SIGINT, because its stdin will be closed, interrupting a blocking read. This might also happen if the user pressed CTRL+D, so we don't die unless end of socket stream was also detected.
closes #4335
2021-07-26 15:07:47 +01:00
01fe497c49
phpstan: use PHP 8.0 as primary version
...
I'm using 8.0 for local development now, so having the phpstan configs targeted at 7.4 by default makes things inconvenient.
2021-07-26 14:34:47 +01:00
1afda04620
PrimedTNT: fixed fuse not getting updated client-side, closes #4333
2021-07-25 12:27:25 +01:00
8f01caf335
Merge branch 'stable'
2021-07-24 22:42:06 +01:00
3bbd088a09
Update build/php submodule to pmmp/php-build-scripts@280dd0524a
2021-07-24 22:40:28 +01:00
1246d1b7ef
Use a subprocess for reading lines from STDIN ( #4332 )
...
this FINALLY provides us with a way to deal with Windows without needing to forcibly terminate the entire server on shutdown.
2021-07-24 22:10:50 +01:00
772935cd7e
Updated biome ID constants
2021-07-23 22:39:54 +01:00
58498c2b0b
Merge remote-tracking branch 'origin/stable'
2021-07-23 16:40:19 +01:00
f89e10e684
Silence openssl_free_key() deprecation warnings on 8.0
...
we don't give a shit and these calls are currently needed for 7.4.
2021-07-23 16:30:22 +01:00
85effa5240
Remove junk from php8 baseline
2021-07-23 15:56:06 +01:00
81c5b83bd9
actions: test on 8.0
2021-07-23 15:55:01 +01:00
ef31a9fc66
Update bug_report.md
2021-07-23 13:32:18 +01:00
dc56a99473
3.22.2 is next
2021-07-23 13:03:27 +01:00
9477034a4a
Release 3.22.1
2021-07-23 13:03:27 +01:00
5844b59b12
Fixed incorrect encoding of NpcDialoguePacket
...
this is in fact an ActorUniqueID, but for some reason written as a uint64 instead of a varint.
2021-07-23 12:53:30 +01:00
0eb4231b51
Use OpenSSL for ECDH during client login, drop mdanter/ecc ( #4328 )
...
This brings a significant performance improvement to login sequence handling, reducing CPU cost of `PrepareEncryptionTask` by over 90% and `ProcessLoginTask` by over 60%. It also allows us to shed a dependency.
2021-07-22 23:04:00 +01:00
3af18917f0
Player: remove note about bans from getUniqueId()
...
while it's true that you might be able to skip the CPU waste from verifying a player's login just to find out that they are banned, this is generally a minority case anyway, so it doesn't make a lot of difference overall. This additional note is essentially a recommendation premature optimisation, which will likely lead to people making security mistakes.
2021-07-22 22:14:14 +01:00
61528393c2
Player: rewrite the confusing documentation of getUniqueId()
2021-07-22 21:14:31 +01:00
59b8453228
Player: added extra debug message for XUID mismatches
2021-07-22 21:04:40 +01:00
83016a97bd
Added getMushroomBlockType() / setMushroomBlockType() APIs to Red/BrownMushroomBlock
2021-07-22 19:13:26 +01:00
41d9bf8a2e
PthreadsChannelWriter: remove unused import
2021-07-22 19:08:21 +01:00
832a156fc7
RakLib: split PthreadsChannelWriter into two implementations
...
this gains a very small performance improvement by avoiding unnecessary !== null checks on every packet written in either direction. It's insignificant for sure, but I just found this code in an old stash, so what the heck.
2021-07-22 18:52:58 +01:00
5c609cc1c1
Added getShape() and setShape() APIs to StraightOnlyRail and Rail
2021-07-22 18:37:30 +01:00
e97234d420
Refactor Rail handling to allow LSP-complaint shape handling
...
the reason there hasn't been any API until now is because of how inconvenient it was to expose a LSP-compliant API _and_ use the same base class for handling all the connection logic. This commit fixes that problem by abstracting shape handling away from BaseRail entirely, so that now it deals exclusively with connections. Deciding the shape of rail to use is now the job of the subclasses.
2021-07-22 17:35:10 +01:00
2476f40cc6
Rail: store shape instead of connections
...
shape is what we'll eventually expose on the API.
2021-07-22 16:45:42 +01:00
77138c5c06
Living: changed bad parameter name
2021-07-22 15:46:08 +01:00
e803ca0e06
Living: Limit vertical knockback to 0.4 by default
...
this will break non-standard use cases with large forces, but they only have to stick a 'null' at the end of the parameter list.
Since this function should be primarily used for vanilla knockback, it makes more sense to keep the default as vanilla, but allow people to change it if they want to.
closes #4106 (this is close to #4106 anyway, but small enough that it was easier to recreate it than pull and modify it)
closes #2707
2021-07-22 14:27:20 +01:00
3466fbe3e3
MemoryManager: remove unused variable declaration
...
it's overwritten further down anyway.
2021-07-21 19:25:01 +01:00
309bed414f
Implemented sweet berries ( #4164 )
...
this doesn't implement the server-side logic for the "stickiness" (slowdown) because we don't have the system needed for it yet.
It also doesn't have parity with vanilla on the damage.
2021-07-19 20:01:33 +01:00
f64ef50ce3
ShulkerBox: fixed incorrect block-picking behaviour
2021-07-19 18:08:13 +01:00
dcbc0bc2a6
BrownMushroomBlock: remove useless function
2021-07-19 17:58:24 +01:00
71df15b4cc
Removed FlowerPot update_bit hack
2021-07-19 17:39:35 +01:00
5874ce582a
Implemented bells
2021-07-19 17:00:56 +01:00
8cb48bfe1d
Bump phpunit/phpunit from 9.5.6 to 9.5.7 ( #4322 )
...
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit ) from 9.5.6 to 9.5.7.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases )
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md )
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.6...9.5.7 )
---
updated-dependencies:
- dependency-name: phpunit/phpunit
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-07-19 12:48:11 +01:00
e0a9fb6eac
Merge remote-tracking branch 'origin/stable'
2021-07-19 00:16:04 +01:00
8fb4d7b982
BUILDING.md: Changed pre-requisites PHP version to 7.4 or newer ( #4319 )
...
[ci skip]
2021-07-18 00:08:14 +01:00
c5abae9eaa
Fixed merge error in bbf3f4c476
...
the corresponding code on PM3 was originally removed here: 485f573955 (diff-cf181dff0292664e4aa13c8a1731dc62131489fa404f4ac1357493d320264cceL2263)
2021-07-17 22:59:45 +01:00
13f114f30e
bootstrap: report loaded php.ini in error, as well as php binary path
...
in some cases extension loading issues are caused by incorrect php.ini path, which should be easy to spot if the path is given.
2021-07-17 21:50:30 +01:00
eccd258aeb
start.cmd: fixed incorrect php.ini scan dir when using a non-local binary
2021-07-17 21:49:11 +01:00
bd5f379c4c
apparently opcache_get_status() may return false?
2021-07-17 21:11:12 +01:00
d35e818ea0
BlockLegacyMetadata: added constants for bell attachment types
2021-07-17 19:11:28 +01:00
19e81b0cd3
BlockFactory: Be aware of potential size changes to metadata bits
...
during testing I found the need to use more bits (for example, bells have 32 states in 1.12).
2021-07-17 19:06:49 +01:00
2588895ab0
bootstrap: add a giant yellow warning about JIT
2021-07-17 19:00:19 +01:00
17d0767db5
ChunkSerializer: implement support for persistent network chunk format
2021-07-17 18:45:04 +01:00
e5327a0f3e
ChunkSerializer: Extract serializeSubChunk() from main serialize() routine
...
this will be used in the future for cache-based chunk sends.
2021-07-17 18:29:14 +01:00
432999a7d7
Bump phpstan/phpstan-phpunit from 0.12.20 to 0.12.21 ( #4313 )
...
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit ) from 0.12.20 to 0.12.21.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases )
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/0.12.20...0.12.21 )
---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
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-07-15 22:32:47 +01:00
5fbc7681b0
Allow registering multiple ClassLoaders for a thread
2021-07-15 19:00:40 +01:00
68699dbff9
PlayerAuthInputFlags: Fixed a mistake in the documentation
2021-07-14 21:08:23 +01:00
ac8b13ee36
actions: don't preprocess anything except dependency src
2021-07-14 20:47:07 +01:00
53d7ed2b5c
these tests are now done by pocketmine/bedrock-protocol
2021-07-14 20:39:32 +01:00
a2e2196a90
Start using pocketmine/bedrock-protocol library
2021-07-14 20:32:15 +01:00
b86d682793
Update to released version of pocketmine/math
2021-07-14 20:14:33 +01:00
9f11be25cb
LevelSoundEventPacket: fixed bad null assignment in ::create()
2021-07-14 15:21:33 +01:00
c474aa42e5
ClientDataToSkinDataHelper: Remove SingletonTrait
...
SingletonTrait is pointless here for multiple reasons:
1) the class is final
2) this is protocol-specific translation of types, no loss of data or alternative mutation of it needs to occur
Using SingletonTrait is an obstacle to separating the protocol library from the core code, so it has to go.
2021-07-14 14:50:59 +01:00
1ad38d499c
Deglobalize ItemTypeDictionary usage, at least for the protocol
...
while this is a bit hacky outside of the protocol namespace, it makes it much easier to use the protocol library for alternative purposes, such as for a client or MITM proxy.
It also removes all but one remaining core dependency of the protocol library, making it very close to being able to be separated from the server core entirely.
2021-07-14 14:26:32 +01:00
bfbe3d83de
3.22.1 is next
2021-07-13 18:31:34 +01:00
c32c21464c
Release 3.22.0
2021-07-13 18:31:28 +01:00
0c2917f2aa
Merge branch 'pm4-bedrock-1.17.10'
2021-07-13 18:20:00 +01:00
28ede7273f
Fixed CS
2021-07-13 18:16:25 +01:00
16faafa1ef
Merge branch 'stable' of github.com:pmmp/PocketMine-MP into stable
2021-07-13 18:11:03 +01:00
a182b36b71
Merge branch 'pm4-bedrock-1.17.10'
2021-07-13 18:04:24 +01:00
f77da60dd3
Merge branch 'pm3-bedrock-1.17.10' into pm4-bedrock-1.17.10
2021-07-13 18:02:29 +01:00
4d6ac57a26
Fixed particle IDs
2021-07-13 17:54:40 +01:00
676bacbee1
Improve the flexibility of WorldProvider registration
...
WorldProviders now have the following requirements removed:
- __construct() is no longer required to have a specific signature
- static isValid() no longer needs to be implemented (you will still need it for registering, but it can be declared anywhere now)
- static generate() no longer needs to be implemented
This paves the way for more interesting types of world providers that use something other than local disk to store chunks (e.g. a mysql database).
WorldProviderManager no longer accepts class-string<WorldProvider>. Instead, WorldProviderManagerEntry is required, with 2 or 3 callbacks:
- ReadOnlyWorldProviderManager must provide a callback for isValid, and a callback for fromPath
- WritableWorldProviderManagerEntry must provide the same, and also a generate() callback
In practice, this requires zero changes to the WorldProviders themselves, since a WorldProviderManagerEntry can be created like this:
`new WritableWorldProviderManagerEntry(\Closure::fromCallable([LevelDB::class, 'isValid']), fn(string ) => new LevelDB(), \Closure::fromCallable([LevelDB::class, 'generate']))`
This provides identical functionality to before for the provider itself; only registration is changed.
2021-07-13 16:55:21 +01:00
73ba1ba224
Bump phpstan/phpstan from 0.12.91 to 0.12.92 ( #4309 )
...
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan ) from 0.12.91 to 0.12.92.
- [Release notes](https://github.com/phpstan/phpstan/releases )
- [Commits](https://github.com/phpstan/phpstan/compare/0.12.91...0.12.92 )
---
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-07-12 12:35:35 +01:00
654fc9a2a6
LegacyStringToItemParser: Throw more specific exceptions
2021-07-10 21:03:12 +01:00
9afc5be0f5
Shulker open/close sounds != shulker box open/close sounds
2021-07-10 19:59:59 +01:00
fc090e238d
Add Shulker Boxes ( #3678 )
...
this implementation is working, although incomplete:
- The shulker close sound should not be played until the end of the shulker closing animation, which takes approximately 1 second.
- An open shulker box has a different collision box than a closed one - it should be +0.5 in whichever direction the shulker is facing. (During the animation, the bounding box also dynamically changes size - you can see this in vanilla by shooting an arrow into the top of an open shulkerbox facing UP, and then closing it - the arrow will fall and collide with the lid multiple times.
However, resolving both of these issues requires significant internal changes which are beyond the scope of this PR.
2021-07-10 19:48:38 +01:00
b07000f613
Merge branch 'pm3-bedrock-1.17.10' into pm4-bedrock-1.17.10
2021-07-09 20:02:30 +01:00
3997e612b1
silence phpstan bug phpstan/phpstan#5271
2021-07-09 19:44:25 +01:00
9d1b2c839d
this managed to get lost in the merge
2021-07-09 19:39:15 +01:00
aeb007d0a1
Merge remote-tracking branch 'origin/stable'
2021-07-09 19:36:32 +01:00
8b79253d3b
Protocol changes for 1.17.10
2021-07-09 19:29:34 +01:00
4e731f61af
BlockFactory: Remap double slab IDs with 0x8 bit set to their base DOUBLE state, instead of BOTTOM
...
this was causing problems with slabs in converted Java worlds, where the
0x8 bit means 'smooth', instead of 'double'. In MCPE it has no effect.
Since Slab doesn't retain the high/low flag for DOUBLE type slabs, this
caused BlockFactory to assume that those states were invalid, and
remapped them to their base state instead.
The following changes resulted in the consistency check:
Remap changed for 43:8 (44:0 (Smooth Stone Slab) -> 43:0 (Smooth Stone Slab))
Remap changed for 43:9 (44:1 (Sandstone Slab) -> 43:1 (Sandstone Slab))
Remap changed for 43:10 (44:2 (Fake Wooden Slab) -> 43:2 (Fake Wooden Slab))
Remap changed for 43:11 (44:3 (Cobblestone Slab) -> 43:3 (Cobblestone Slab))
Remap changed for 43:12 (44:4 (Brick Slab) -> 43:4 (Brick Slab))
Remap changed for 43:13 (44:5 (Stone Brick Slab) -> 43:5 (Stone Brick Slab))
Remap changed for 43:14 (44:6 (Quartz Slab) -> 43:6 (Quartz Slab))
Remap changed for 43:15 (44:7 (Nether Brick Slab) -> 43:7 (Nether Brick Slab))
Remap changed for 157:8 (158:0 (Oak Slab) -> 157:0 (Oak Slab))
Remap changed for 157:9 (158:1 (Spruce Slab) -> 157:1 (Spruce Slab))
Remap changed for 157:10 (158:2 (Birch Slab) -> 157:2 (Birch Slab))
Remap changed for 157:11 (158:3 (Jungle Slab) -> 157:3 (Jungle Slab))
Remap changed for 157:12 (158:4 (Acacia Slab) -> 157:4 (Acacia Slab))
Remap changed for 157:13 (158:5 (Dark Oak Slab) -> 157:5 (Dark Oak Slab))
Remap changed for 181:8 (182:0 (Red Sandstone Slab) -> 181:0 (Red Sandstone Slab))
Remap changed for 181:9 (182:1 (Purpur Slab) -> 181:1 (Purpur Slab))
Remap changed for 181:10 (182:2 (Prismarine Slab) -> 181:2 (Prismarine Slab))
Remap changed for 181:11 (182:3 (Dark Prismarine Slab) -> 181:3 (Dark Prismarine Slab))
Remap changed for 181:12 (182:4 (Prismarine Bricks Slab) -> 181:4 (Prismarine Bricks Slab))
Remap changed for 181:13 (182:5 (Mossy Cobblestone Slab) -> 181:5 (Mossy Cobblestone Slab))
Remap changed for 181:14 (182:6 (Smooth Sandstone Slab) -> 181:6 (Smooth Sandstone Slab))
Remap changed for 181:15 (182:7 (Red Nether Brick Slab) -> 181:7 (Red Nether Brick Slab))
Remap changed for 422:8 (417:0 (End Stone Brick Slab) -> 422:0 (End Stone Brick Slab))
Remap changed for 422:9 (417:1 (Smooth Red Sandstone Slab) -> 422:1 (Smooth Red Sandstone Slab))
Remap changed for 422:10 (417:2 (Polished Andesite Slab) -> 422:2 (Polished Andesite Slab))
Remap changed for 422:11 (417:3 (Andesite Slab) -> 422:3 (Andesite Slab))
Remap changed for 422:12 (417:4 (Diorite Slab) -> 422:4 (Diorite Slab))
Remap changed for 422:13 (417:5 (Polished Diorite Slab) -> 422:5 (Polished Diorite Slab))
Remap changed for 422:14 (417:6 (Granite Slab) -> 422:6 (Granite Slab))
Remap changed for 422:15 (417:7 (Polished Granite Slab) -> 422:7 (Polished Granite Slab))
Remap changed for 423:8 (421:0 (Mossy Stone Brick Slab) -> 423:0 (Mossy Stone Brick Slab))
Remap changed for 423:9 (421:1 (Smooth Quartz Slab) -> 423:1 (Smooth Quartz Slab))
Remap changed for 423:10 (421:2 (Stone Slab) -> 423:2 (Stone Slab))
Remap changed for 423:11 (421:3 (Cut Sandstone Slab) -> 423:3 (Cut Sandstone Slab))
Remap changed for 423:12 (421:4 (Cut Red Sandstone Slab) -> 423:4 (Cut Red Sandstone Slab))
2021-07-08 20:37:19 +01:00
605e26d584
remove unused import
2021-07-05 20:03:11 +01:00
5130a32333
GameMode: removed dead property (leftover from 902ea515f7)
2021-07-05 20:00:24 +01:00
b7ea10b905
MainLogger: do not assume that exception codes are always integers
...
PDOException most notably breaks this rule.
closes #4294
2021-07-05 19:20:59 +01:00
1122131c8d
3.21.2 is next
2021-07-05 18:49:26 +01:00
a50ef2af6f
Release 3.21.1
2021-07-05 18:49:26 +01:00
72e4660800
Updated build/php submodule to pmmp/php-build-scripts@4bf8ec1ad0
2021-07-05 18:42:35 +01:00
e6285a0312
Update composer transitive dependencies
2021-07-05 17:22:32 +01:00
5420e76a9a
Bump phpstan/phpstan-strict-rules from 0.12.9 to 0.12.10 ( #4295 )
2021-07-05 13:20:03 +00:00
de46a81cf4
Bump phpstan/phpstan from 0.12.90 to 0.12.91 ( #4296 )
...
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan ) from 0.12.90 to 0.12.91.
- [Release notes](https://github.com/phpstan/phpstan/releases )
- [Commits](https://github.com/phpstan/phpstan/compare/0.12.90...0.12.91 )
---
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-07-05 14:07:49 +01:00
1d8f0033af
BlockBreakInfo: Expose hardness multipliers as constants
2021-06-30 19:47:11 +01:00
7a35fdb1bb
Allow Blocks to specify their max stack size
2021-06-30 19:28:16 +01:00
91d54ff0ad
Removed unnecessary and/or obsolete GC hacks
...
the intent of these hacks was to break cyclic references to avoid having objects lingering in memory. However, all of the stuff that's being removed in this commit no longer has any effect anyway, due to the fact that these things don't circularly reference each other anymore. Notably, Tile inventories now keep Position instead of a Tile ref.
2021-06-30 19:16:25 +01:00
c05f6db8d9
Bed and Skull items now return a correct block, with appropriate type information
...
I wanted to do the same for banners, but unfortunately banners are a tad more complicated.
2021-06-30 17:27:14 +01:00
12905d8c27
BlockFactory: remove some TODOs
2021-06-30 17:03:20 +01:00
2b4a1ffdfb
Bed: use ColoredTrait
2021-06-30 16:07:46 +01:00
9e79d48aeb
BaseBanner: use ColoredTrait
2021-06-30 16:07:45 +01:00
a888ab0257
GiveCommand: remove useless clone
...
addItem() clones this anyway.
2021-06-30 14:07:58 +01:00
f3bd48e6cb
Updated some more hardcoded translation key usages missed by 94e16f416d
2021-06-30 14:02:55 +01:00
76a74b3931
Revert "Item: skip a step when decoding PC itemstacks"
...
This reverts commit 9b52af62b6 .
We shouldn't assume that a string maps directly to a legacy ID,
because we might want string aliases (e.g. dark_oak_boat) which refer to
items that have a specific meta value in the MCPE system.
Overall, I want to get rid of the reliance on IDs here and register all
this stuff using closure callbacks on VanillaItems, so getting rid of
this assumption also serves that goal.
2021-06-30 13:13:53 +01:00
2312511be6
Living: remove unnecessary double CompoundTag::getTag() call
2021-06-29 23:54:52 +01:00
316e2654cc
Fixed CS
2021-06-29 22:50:08 +01:00
94e16f416d
Added KnownTranslationKeys (generated) and start using it
2021-06-29 22:46:04 +01:00
f02817bcd3
Player: fixed toString() on TranslationContainer exposed by previous commit
...
this code looks smelly...
2021-06-29 20:14:11 +01:00
83332024df
TranslationContainer: remove __toString()
...
it doesn't make any sense to use TranslationContainer in this way.
2021-06-29 20:07:39 +01:00
1170c8fe13
EnumTrait: override __clone, __sleep, __wakeup to prevent duplication
2021-06-29 19:55:43 +01:00
7ba573db77
Added API method Item::canStackWith()
2021-06-29 19:52:52 +01:00
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40:43 +01:00
aee7b03c1d
changelog: fix outdated mention of ProjectileItem::getProjectileEntityClass()
...
[ci skip]
2021-06-29 19:26:02 +01:00
35ad199b11
changelog: mention Potion API changes
...
[ci skip]
2021-06-29 19:24:28 +01:00
7029f85c1c
Regenerated VanillaItems
2021-06-29 18:23:24 +01:00
0ec869823b
Added potion display names to Potion and SplashPotion
2021-06-29 18:21:41 +01:00
07d97bbdeb
PotionType: Added display names
2021-06-29 18:19:27 +01:00
f68caa878a
Potion: added getType()
2021-06-29 16:53:26 +01:00
6fb8ac211e
Make GameMode::fromString() and PluginEnableOrder::fromString() return null, instead of throwing exceptions
...
since these are always used for handling userdata, it doesn't make sense for them to throw exceptions.
2021-06-27 20:56:51 +01:00
3dd33cd35e
Get rid of EnumTrait::fromString()
...
it's better to just implement this for stuff where there's explicitly designated aliases, otherwise we could end up with unexpected BC breaks (e.g. hardcoding POSTWORLD in plugin.yml would suddenly break if the core enum was changed, even though it remained valid).
2021-06-27 20:52:56 +01:00
902ea515f7
Separate ID handling from GameMode
...
the aliases of 0,1,2,3 remain for user-interface level compatibility.
2021-06-27 20:32:35 +01:00
5cdf0b169f
PluginManager: Separate listener method filtering to its own method
...
this makes registerEvents() easier to read.
2021-06-27 20:25:28 +01:00
db28358316
Player: Assume that usedChunks was cleared by the previous loop
2021-06-27 17:50:39 +01:00
ede4d58394
Automatic permission calculation on PermissibleBase construction
...
thanks to the PermissibleInternal/PermissibleBase architectural change, there's no longer any concern regarding cyclic refs.
2021-06-26 22:15:22 +01:00
02fab77e55
World: change 'closed' to 'unloaded'
...
this makes more sense overall from a reader's perspective.
and also provide a rug-jerk for any idiots using World->close() when they aren't supposed to? ....
2021-06-26 21:54:18 +01:00
b8ebf8936e
InventoryManager: fix container open callbacks not working
...
this was reported to me on socials by multiple different people, but nobody reported an issue so I almost forgot. >.<
2021-06-26 21:21:23 +01:00
9b30c2feda
Extract a DelegateInventory from EnderChestInventory
2021-06-26 21:01:40 +01:00
8cd7cc7c00
pacify php-cs-fixer
2021-06-26 19:32:05 +01:00
e14bad4ea6
Rename CommandReader and friends to ConsoleReader
2021-06-26 19:29:58 +01:00
a70bd115f1
Moved console-specific stuff to its own namespace
...
this stuff has different functionality than everything else in the
command namespace (specifically console handling), so it doesn't belong
in here.
I know that this will probably break some plugins, but I don't care,
because plugins shouldn't have been abusing ConsoleCommandSender in the
first place.
2021-06-26 19:24:46 +01:00
bf7d69b69e
Stop hardcoding permission names everywhere
...
using strings for permission names is nearly as shitty, but this is at least cross-referencable and statically analysable.
2021-06-26 19:14:51 +01:00
0cdc04f9b5
Player: Fixed so-called 'pot lag'
...
this occurred because of transactions arriving before MobEquipmentPacket updating the player's own held item slot. This was only a problem while rapidly changing hotbar slots and simultaneously using items, like projectiles.
closes #4168
2021-06-26 18:56:30 +01:00
0910054c41
NetworkSession: Fixed InventoryManager nullability disaster
...
fixes #4277
fixes #4275
fixes #3139
2021-06-26 17:44:42 +01:00
e43bca95bf
Fixed build
2021-06-26 17:40:43 +01:00
4a5bdefe8b
Player: Explicitly clear permission recalculation callbacks
...
this is necessary to get rid of the broadcast permission callbacks, which retain references to the Player itself, forming a cycle which would prevent PermissibleBase->__destruct() from cleaning up.
2021-06-26 17:18:17 +01:00
8b1a84f2bf
Bump phpunit/phpunit from 9.5.5 to 9.5.6 ( #4282 )
...
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit ) from 9.5.5 to 9.5.6.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases )
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md )
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.5...9.5.6 )
---
updated-dependencies:
- dependency-name: phpunit/phpunit
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-06-26 16:49:19 +01:00
a6039ad733
Fixed InventoryHelpersTrait::addItem() cannot add items with a count greater than maxstack ( #4283 )
2021-06-26 16:48:53 +01:00
444d902990
Fix CS
2021-06-21 20:45:31 +01:00
2a6009f8bf
Check consistency of block remaps
2021-06-21 20:45:30 +01:00
85ee628a74
Player: remove sendPosition() from public API
...
plugins shouldn't be touching this for any reason now.
2021-06-21 20:08:43 +01:00
60d80e173b
Fixed player sounds not being broadcasted to the player itself
...
fixes #4259
fixes #4270
2021-06-21 20:03:32 +01:00
5d6146a01f
Register missing potion types
2021-06-19 21:53:08 +01:00
5387456e44
Move potion types to enum
2021-06-19 21:39:23 +01:00
908fa5f901
changelog: rewrite a whole lot of confusing bullshit
...
EntityFactory doesn't exist at all on PM3, so mentioning changes in its
behaviour here is only going to confuse people.
2021-06-19 19:53:55 +01:00
c07f3f5e12
fix CS
2021-06-19 19:48:30 +01:00
6fea09ded4
SplashPotion: Require potionId in constructor
2021-06-19 19:47:44 +01:00
fc70b625b3
ExperienceOrb: Require providing XP value in constructor
2021-06-19 19:42:13 +01:00
981b0285d1
Isolate config casting nastiness in one place
...
this doesn't solve the underlying problem, but it does reduce the amount of noise made by PHPStan about it, as well as avoiding code litter.
2021-06-19 19:14:02 +01:00
11b483f2dc
Inline EntityDataHelper::createBaseNBT()
...
this is only used for saving entity data now, and its presence here is allowing plugin devs to keep abusing it.
2021-06-19 18:45:21 +01:00
745f455bd2
Door: change thickness to match MCPE
...
since MCPE-19214 still hasn't been fixed after all these years, it's safe to say they won't fix it in the near future, and this causes placement glitches in PM.
2021-06-18 19:10:50 +01:00
d96fc17339
World: Check placed block collision boxes after place()
...
since we write these into a transaction instead of actually modifying the world directly, we can use the transaction to verify that the placement location is OK before setting the blocks.
closes #4248
2021-06-18 19:07:38 +01:00
735c656f9d
Merge remote-tracking branch 'origin/stable'
2021-06-18 18:52:04 +01:00
155e516f74
phpstan 0.12.90
2021-06-18 18:46:30 +01:00
ea0a47dff7
Updated transitive composer dependency junk
2021-06-18 18:42:08 +01:00
f1583f44df
LightArray: Avoid allocating 7 useless arrays for every node processed
...
instead, use a const array of the offsets and add them to the coordinates, which avoids the allocations.
In synthetic benchmarks, this method takes 40-50% less CPU time by eliding ZEND_INIT_ARRAY and ZEND_ADD_ARRAY opcodes. In practice, the benefit will likely be much smaller (perhaps even irrelevant).
2021-06-17 22:21:58 +01:00
15e5bdb210
BaseInventory::addItem(item1,item2,item3) now has the same behaviour as multiple separate addItem() calls ( #4237 )
...
fixes #1412
2021-06-17 21:05:24 +01:00
71a4ea2a95
FastChunkSerializer: remove useless variable initialization
2021-06-17 20:59:40 +01:00
0a6ce18322
CrashDump: Sort plugins list
2021-06-17 20:56:49 +01:00
43f71d0d63
FormatConverter: Copy worlds for backup if rename fails
...
this can fail if the backups directory points to a different drive than the original worlds location. In this case, we have to copy and delete the files instead, which is much slower, but works.
I REALLY advise against putting backups on a different mount point than worlds if you plan to convert large worlds.
2021-06-17 20:46:34 +01:00
ec6103d61e
Leaves can now be silk touched, closes #3714 ( #4240 )
2021-06-17 15:37:02 +01:00
11d73e5bb8
Bump phpstan/phpstan-phpunit from 0.12.19 to 0.12.20 ( #4273 )
...
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit ) from 0.12.19 to 0.12.20.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases )
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/0.12.19...0.12.20 )
---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
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-06-17 15:30:01 +01:00
61c59be299
Replace hardcoded block metadata shifts and masks with constants
...
we might want to make these bigger than 4 bits in the future.
2021-06-16 12:48:09 +01:00
c22f793521
RakLibInterface: Log a message when a non-0xfe packet is received
2021-06-15 19:20:31 +01:00
2ee86f0edf
Improved UPnP exception handling
2021-06-13 23:02:42 +01:00
ec7ea98ead
UPnP: expose more functionality
2021-06-13 22:48:38 +01:00
80bf948588
Separate UPnPNetworkInterface from UPnP implementation
2021-06-13 22:41:36 +01:00
3d0b21f30c
Denoise NetworkSession with typed properties
2021-06-13 22:27:23 +01:00
e5dd5a5745
NetworkSession: Fixed missing nullable declarations
...
phpstan doesn't report these because .. reasons .. @ondrejmirtes this is causing bugs to go unfound :(
I'm aware of the irony that I just silenced the bugs that were exposed by this commit .. that's an architectural problem for another day
2021-06-13 22:24:12 +01:00
04a6e89d6f
Change encryption to use CTR instead of GCM
...
despite MCPE claiming to use GCM, it omits the auth tag, which defeats the whole point of using GCM.
CTR can be used instead, with the final 4 bytes of the IV being 0002.
2021-06-13 21:57:23 +01:00
0df2677464
EncryptionContext: Allow passing encryption algo as a constructor parameter
2021-06-13 19:57:48 +01:00
492ad6bb66
3.21.1 is next
2021-06-13 15:38:22 +01:00
82e8eb46ac
Release 3.21.0
2021-06-13 15:38:22 +01:00
c7868a810d
Move PHP minimum to 7.4
...
7.3 isn't actively tested anymore, and since 7.4 has been out for so long already, it doesn't make sense to keep pandering to users who can't be bothered to update their PHP binaries.
In most cases, these users are also experiencing problems caused by older versions of pthreads that were long since fixed.
In addition, pthreads is no longer tested or supported on 7.3, so users can't get newer bug fixes even if they wanted to.
2021-06-13 15:34:24 +01:00
cc00b3e19b
Merge remote-tracking branch 'origin/stable'
2021-06-13 15:27:29 +01:00
4df536fee7
Bump Snooze to 0.3.0
2021-06-13 15:22:12 +01:00
d8b56a1219
Update transient composer junk that we don't care about, but have to update so that it doesn't slip in to some other commit
2021-06-13 14:48:51 +01:00
a676dba9f0
Updated ClassLoader dependency
2021-06-13 14:48:51 +01:00
2cc22a29c1
Update composer dependencies
2021-06-13 14:40:46 +01:00
6fb364b16f
Store ender chest viewer count on the tile, instead of relying on the inventory's viewer count ( #4238 )
...
Fixes #4021
2021-06-13 14:37:09 +01:00
8e2829bdd4
Remove movement workaround from 1.14.30 ( #4246 )
2021-06-13 14:32:40 +01:00
408e29da90
Removed PermissionRemovedExecutor
...
this interface is just about the most pointless code in all of PM or Bukkit. In over 4 million lines of code on Poggit, a Google search and a GitHub search, I didn't find a single usage of it that wasn't just bukkit internals code copy pasta, a spoon, a port of PM/Bukkit/whatever into a different language, or someone's generated javadoc.
2021-06-12 21:55:59 +01:00
b525f45bf8
Fixed CS
2021-06-12 21:51:08 +01:00
8e1d27a719
Constrain types to PermissibleInternal on internal permission subscription methods
2021-06-12 21:28:19 +01:00
bfcf4a25d4
Automatic cleanup of permission subscriptions on PermissibleBase destructor calls
...
this has gotten too complex ...
2021-06-12 21:12:39 +01:00
0ebafbd224
.... adding the most important part would probably help
2021-06-12 20:46:53 +01:00
7dcc4891ca
Block: added getDropsForIncompatibleTool()
2021-06-11 19:09:14 +01:00
e4ed7bc4ea
Fixed Mushroom Stem blocks never dropping anything
2021-06-11 19:04:12 +01:00
22b5e5db5e
AsyncPool: Do not drop pending tasks on shutdown
...
this creates an extra element of uncertainty for async pool usage.
2021-06-11 18:30:32 +01:00
f245147c11
AsyncPool: make collectTasks() return value more accurate
...
during onCompletion() anything may happen, including scheduling new tasks, which the previous code did not account for.
2021-06-11 18:30:32 +01:00
af79e787ea
Bump phpstan/phpstan from 0.12.88 to 0.12.89 ( #4262 )
...
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan ) from 0.12.88 to 0.12.89.
- [Release notes](https://github.com/phpstan/phpstan/releases )
- [Commits](https://github.com/phpstan/phpstan/compare/0.12.88...0.12.89 )
---
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-06-10 15:10:45 +01:00
532d57eec7
Arrow: Save and load critical state ( #4241 )
...
Fixes #3596
2021-06-09 14:00:36 +01:00
920eb7cce5
Merge branch 'stable'
2021-06-09 13:46:00 +01:00
65c53e6512
actions: use PHP 7.4.20
2021-06-09 13:44:00 +01:00
38a32c6540
changelog: remove mentions of unsupported / corrupted world handling
...
the fixes for these problems were backported to PM3 during the PHPStan integration.
[ci skip]
2021-06-09 13:19:40 +01:00
2fff3fa60c
changelog: be more specific about the range of Bedrock worlds supported
...
this was written 2 years ago, before 1.13 was released to disrupt everything all over again.
[ci skip]
2021-06-09 13:16:57 +01:00
5503fadf13
3.20.1 is next
2021-06-08 20:21:55 +01:00
99964709c9
Release 3.20.0
2021-06-08 20:21:55 +01:00
b85f3bd149
make-release: abort on no changelog changes
2021-06-08 20:20:30 +01:00
2bbb24fab7
Merge branch 'stable'
2021-06-08 20:00:08 +01:00
57d274901d
Protocol changes for 1.17.0
2021-06-08 19:40:28 +01:00
f3e1c82246
this again :thonkingtempered:
2021-06-08 19:27:49 +01:00
908b627846
3.19.4 is next
2021-06-08 18:52:01 +01:00
afb21c1df2
Release 3.19.3
2021-06-08 18:51:48 +01:00
988be2a96b
Bump phpunit/phpunit from 9.5.4 to 9.5.5 ( #4247 )
...
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit ) from 9.5.4 to 9.5.5.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases )
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md )
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.4...9.5.5 )
---
updated-dependencies:
- dependency-name: phpunit/phpunit
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-06-07 21:57:21 +01:00
afe67f7502
Updated build/php submodule to pmmp/php-build-scripts@0a0ac2abb3
2021-06-05 20:18:58 +01:00
2d686e6dc0
Merge remote-tracking branch 'origin/stable'
2021-06-04 18:03:32 +01:00
b257348a3a
Renamed fields of AddEntityPacket and RemoveEntityPacket
2021-06-04 17:18:24 +01:00
12c66d3362
CraftingDataPacket: fixed assert failure on debug builds
2021-06-04 17:13:50 +01:00
9702b51bd1
Utils: improve how boolean arguments are displayed in stack traces
2021-06-02 21:36:47 +01:00
fadc96bb0e
Utils: include spl_object_id() in stack traces
2021-06-02 21:34:19 +01:00
493977661f
Require pocketmine/binaryutils ^0.2.1
2021-05-30 20:46:39 +01:00
7d99b0115c
Added a getName() override for RakLibServer
2021-05-29 23:51:46 +01:00
0402e7e697
Separate CommandReader impl from CommandReaderThread
2021-05-29 23:41:11 +01:00
4bcc7e09cb
PacketSerializer: fix unnecessary FQN
2021-05-29 14:24:48 +01:00
8171b18002
Separate ItemTypeDictionary implementation from initialization
...
we're not going to want implementation details like how it's setup getting in the way when we separate protocol from the core.
2021-05-29 14:24:05 +01:00
92fd2d35a4
SetDisplayObjectivePacket: added order and display slot constants ( #4232 )
2021-05-24 20:33:24 +01:00
f68b9e79e1
Use typed properties in block namespace
2021-05-22 23:52:31 +01:00
73c229a236
Block: fixed LSP violations in blocks using BlockIdentifierFlattened
...
a property's type can't be changed by a subclass
2021-05-22 23:40:54 +01:00
285ad25168
BlockFactory: use the vars we already have, instead of repeated method calls
2021-05-22 12:45:08 +01:00
f655d262be
Added stripped all-sided-log variants
...
again, these should be dynamic; but right now it's not possible.
2021-05-22 12:43:07 +01:00
ac04911e88
BlockFactory: fix potential crash
2021-05-21 21:44:17 +01:00
24405b63c1
Coarse is now a state of Dirt, instead of a separate block
2021-05-21 21:36:49 +01:00
df260034cd
BlockFactory: Fill default state for all variants covered by bitmask when mismatch occurs
2021-05-21 21:12:34 +01:00
e7b21cf9dc
World: remove obsolete TODO comment
...
[ci skip]
2021-05-21 13:10:48 +01:00
2ab751f985
World: fixed potential bug scheduling async light updates multiple times
2021-05-21 13:09:38 +01:00
f6f0938b3b
Merge branch 'stable'
2021-05-21 01:27:35 +01:00
61077c48f1
Worker: fixed quit() usually being useless
...
Worker::isRunning() returns false after it exits the run() function, even if tasks are stacked and it isn't shutdown.
While this is mostly harmless (since the internal destructor will join the thread anyway), this should be fixed anyway.
2021-05-21 01:24:07 +01:00
7968a72f0e
Eliminate some duplicated breakinfos
2021-05-20 23:18:33 +01:00
376d2c4cd4
Consistently declare BlockBreakInfo at the constructor call site
...
instead of inside the class
2021-05-20 22:49:51 +01:00
e0c61071e1
3.19.3 is next
2021-05-19 22:53:31 +01:00
8b4aa36e16
Merge branch 'master' of github.com:pmmp/PocketMine-MP
2021-05-19 22:50:15 +01:00
af678f985d
All types of coral now have fully dynamic types
2021-05-19 22:49:44 +01:00
4a367b4b0e
...
2021-05-19 00:49:10 +01:00
821c9c550b
github web editor sucks
2021-05-19 00:48:25 +01:00
69fa8e8db7
Added documentation to BlockFormEvent
2021-05-19 00:17:39 +01:00
f8cfa191dd
Fixed confusing hierarchy of BlockGrow/Form/SpreadEvent, closes #2792
2021-05-19 00:17:38 +01:00
4122517292
[ci skip] update changelog
2021-05-18 23:51:58 +01:00
1d8680aaa9
Update to released versions of BinaryUtils, Log, LogPthreads, NBT, RakLib and RakLibIpc
...
these all had to be updated in tandem because of the dependency tree - RakLib, RakLibIpc and NBT -> BinaryUtils, RakLib and LogPthreads -> Log, RakLibIpc -> RakLib.
2021-05-18 23:25:19 +01:00
f5da91b42a
changelog: added a Configuration section
...
this might be incomplete.
[ci skip]
2021-05-17 23:49:47 +01:00
e4750ad2cd
WorldTimings: apply native typehints
2021-05-17 23:23:46 +01:00
7217ff5ff5
World: added an extra subtiming for random chunk updates
2021-05-17 23:18:56 +01:00
4736b5968d
WorldTimings: change some idiotic timer names
2021-05-17 23:14:30 +01:00
cdaf734470
World: Clean up ticking chunk loader tracking
2021-05-17 23:07:48 +01:00
643c3ed14e
World: Require all adjacent chunks to a ticking chunk candidate to be unlocked, generated, loaded and light-populated
...
this should address the remaining problems with grass spread/death.
2021-05-17 20:59:40 +01:00
7abf50f503
World: Extracted a tickChunk() method from tickChunks()
...
most of what's left in tickChunks() is just selecting the chunks, rather than actually ticking them.
2021-05-17 20:54:51 +01:00
bab76f4a6e
World: extract some blocks of logic from tickChunks() into their own methods
...
the amount of nested loops, cx/dx/chunkx/etc clusterfuck in this code makes it very difficult to work with...
2021-05-17 20:50:46 +01:00
10391be615
Remove useless class
2021-05-17 20:06:28 +01:00
5a14c1cb89
Entity: don't rebuild metadata every tick unless an associated property changed
...
this should improve performance back to PM3 levels.
2021-05-17 20:05:52 +01:00
bdce781c6d
Chunk: do not close preexisting tiles in addTile()
...
if it's desired to actually replace a tile, the old tile should be explicitly removed and closed first.
2021-05-12 12:32:36 +01:00
b2e806e2fa
World: Harden chunk loading against bad data in entity/tile NBT
2021-05-12 12:26:41 +01:00
80e4da85df
Fixed PHPStan build
2021-05-12 12:12:29 +01:00
42e915b902
Player: added locking variable to prevent reentry into respawn() while awaiting spawn terrain generation
2021-05-12 12:10:32 +01:00
34ee1c2354
pocketmine.yml: update preset example for worlds
...
preset is now supported as its own key, and it's less confusing to present it separately, since that's how it's displayed in the server.properties also.
2021-05-12 12:00:52 +01:00
4a68e0219e
shut
2021-05-11 19:29:30 +01:00
4c4db1836f
Merge remote-tracking branch 'origin/stable'
2021-05-11 19:28:09 +01:00
dfdd59734c
[ci skip] update changelog
2021-05-11 19:26:01 +01:00
ab0500ae4f
Player: Fixed a multitude of bugs with respawning
...
the following things are changed:
- Player->getSpawn() no longer returns a safe spawn by default. Instead, if the player doesn't have a spawn set, it returns the world's stored spawn directly. This allows consistent behaviour of locating safe respawn positions without double calculation of safe spawn position, and also fixes crash issues during the login sequence if the player's spawn position referred to ungenerated terrain.
- Player->respawn() is now asynchronous, using the promise returned by orderChunkPopulation() to complete respawn after the terrain is generated. This allows consistently selecting a safe respawn position and fixes crashes when respawning if the spawn location was in ungenerated terrain.
There remains a problem that ragequit respawns are still only handled right after PlayerJoinEvent, which leads to the original spawn terrain being sent to the player, which is obviously very wasteful. However, that's a problem for a later commit.
2021-05-11 19:15:31 +01:00
094c949e86
Entity: fixed extremely stupid bug with player respawning after ragequit
2021-05-11 19:08:56 +01:00
0ff21557e4
World: fixed generation requests being rejected during resolution
...
when a chunk population is ordered, its only chunk loader is the one that the World installed to keep the chunk loaded while it was generated. So, when the resolver removes its chunk loader from the chunk, it triggers the chunk unloading mechanism, which causes the promise to directly be rejected.
2021-05-10 17:20:04 +01:00
f909557529
Cleaned up implementations for EnderChestInventory/DoubleChestInventory
...
previously, these were forced to extend BaseInventory because of the amount of crap in Inventory's interface.
This meant that these inventories had their own slots storage, which would be _mostly_ unused because these inventories aren't real inventories, but rather just delegates.
This lead to a variety of bugs in the past, such as certain API methods on BaseInventory not working correctly for DoubleChestInventory in particular.
Now, BaseInventory just implements the functional part of the inventory implementation, leaving the storage system up to the implementation.
A SimpleInventory class is provided with a simple SplFixedArray storage backing, which is used by most inventories.
EnderChestInventory and DoubleChestInventory now extend BaseInventory directly, and implement custom methods for dealing with their delegates.
2021-05-09 20:51:16 +01:00
1533789f35
Player: fixed not subscribing to own inventory updates
...
fixes #4211
2021-05-09 19:36:36 +01:00
922164ff2c
Updated composer dependencies
2021-05-08 21:15:13 +01:00
20197e6813
RakLibServer: clean up constructor parameters
2021-05-08 20:13:29 +01:00
1003fde2fc
RakLibServer: make all parameters mandatory
2021-05-08 20:11:16 +01:00
2ce6a87d05
getSafeSpawn() may throw if the target terrain is not generated
2021-05-08 16:22:13 +01:00
e9f3cefe94
Default world might be null
2021-05-08 16:21:34 +01:00
027109075c
WorldManager: don't recalculate the spawn point for every player teleported during world unload
2021-05-08 16:19:22 +01:00
624495f4d3
Added a generic Promise type
...
I anticipate increasing demand for promises, and since all the libraries I could find suck, we'll stick to our own impl for now.
2021-05-08 15:57:30 +01:00
33eb97da97
Remove dead PHPStan pattern
2021-05-08 15:53:55 +01:00
6384b6602c
phpstorm you piece of shit
2021-05-07 23:55:49 +01:00
998a583815
World: Fixed inverted completion callbacks for chunk population
...
this would have caused any chunk populated by a plugin to remain loaded forever.
2021-05-07 23:39:44 +01:00
f9bfc0df73
NetworkSession: don't crash on teleporting to other world during PlayerLoginEvent
2021-05-07 22:47:06 +01:00
5324474194
Merge remote-tracking branch 'origin/stable'
2021-05-07 20:47:35 +01:00
6cb285d4a9
Added constants for the handler tag types
2021-05-06 18:40:14 +01:00
742f86e022
Rename DestroyBlockParticle -> BlockBreakParticle
...
closes #3461
literally every other particle/sound has the subject first, followed by the (optional) verb, and finally Particle (or Sound).
In addition, we refer to breaking blocks as 'break' everywhere except here, where we refer to it as 'destroy'.
2021-05-06 18:33:18 +01:00
7d1c4efdfb
Updated composer dependencies
2021-05-06 18:17:05 +01:00
7b2c6c5ceb
Avoid more $this refs on long-life closures
2021-05-06 14:27:56 +01:00
c356abb917
BlockTransaction: remove cyclic reference to self in callbacks
2021-05-06 14:27:08 +01:00
01794adef1
...
2021-05-05 22:24:23 +01:00
5e5277acb5
Merge branch 'stable'
2021-05-05 22:22:32 +01:00
17bbb9330f
Updated RakLib, require pocketmine/raklib-ipc
2021-05-05 21:31:48 +01:00
cc73571307
Updated composer dependencies
2021-05-05 19:43:39 +01:00
73420819f6
Clean PHPStan baselines
2021-05-05 14:51:39 +01:00
652de2632a
Rough OffHand implementation
...
this doesn't do stuff like taking arrows from offhand yet.
2021-05-05 14:46:51 +01:00
e8cb49f7ae
php-cs-fixer fixing php-cs-fixer's own mess
2021-05-05 11:25:11 +01:00
4ca5558ec1
Merge remote-tracking branch 'origin/stable'
2021-05-05 11:14:01 +01:00
267b49247e
Updated composer deps (except pocketmine/nbt)
2021-05-04 22:27:34 +01:00
176ca3fd2f
shut
2021-05-02 14:56:56 +01:00
b8645f5c15
Clean up EnderChestInventory implementation
...
now, EnderChestInventory is just a temporary window, much like anvil/enchanting windows. It provides a gateway to the player's PlayerEnderInventory.
This removes one of the remaining obstacles to disallowing null World in Position constructor.
2021-05-02 14:26:27 +01:00
129ca7fee0
Silence a PHPStan bug
...
I'm not able to reproduce this one on the playground, but it still shows up even when disabling certain phpdocs...
2021-05-02 13:55:32 +01:00
4c783f1037
shut
2021-05-02 13:43:37 +01:00
988c976459
Remove unused import
2021-05-02 13:40:18 +01:00
9b8f32c584
Extract inventory helper methods from BaseInventory to a trait
...
this allows easier alternate implementations of Inventory that don't extend BaseInventory (e.g. double chest, or delegate inventory).
2021-05-02 13:38:49 +01:00
f538440bce
De-spaghettify the hierarchy for chest inventories
2021-04-30 13:44:39 +01:00
d37016f43b
Vine: added API to get/set faces
2021-04-30 13:35:38 +01:00
726978b8f1
Migrate all coloured blocks (except glazed terracotta) to dynamic colours
2021-04-29 20:11:03 +01:00
593a8ac529
Added Loom blocks
...
these don't support doing patterns yet, but their inventories work.
2021-04-29 19:51:09 +01:00
b33bf1f433
Unfuck banners ...
2021-04-28 18:44:21 +01:00
d5e5a81cff
Don't explode when data contains invalid dye colour IDs
2021-04-28 13:39:03 +01:00
a44203a3d4
Separate BannerPatternLayer from BannerPatternType
2021-04-28 12:47:42 +01:00
2bc0f9f7a2
TimingsCommand: do not enable timings if they are already enabled
...
this causes timings to be reset, which is potentially undesirable (loss of already-collected timing data).
closes #4194
2021-04-27 22:39:13 +01:00
8a3df1212a
Added a trait for blocks which face opposite their placing player
2021-04-27 21:28:26 +01:00
72045b3d7e
CoralBlock: added setCoralType()
2021-04-27 21:03:23 +01:00
2eb05a2420
Updated block factory consistency check
2021-04-27 21:00:22 +01:00
f204d6b3dd
Make a trait for blocks which share the same horizontal facing metadata logic
2021-04-27 20:59:20 +01:00
11263909ab
Added stripped logs (incomplete)
...
this isn't practical to fully implement right now due to limitations
imposed by the legacy shitfest system we're using. To make stripped
dynamic, we would need to switch the IDs _and_ variant info dynamically,
and I have no idea what bizarre side effects that might have.
2021-04-27 20:35:58 +01:00
ed80490234
Added more APIs to Skull
...
setRotation() is conditionally useless, but there's not much we can do about this right now; and exposing it like this is better than having plugins interacting with tiles.
2021-04-27 19:31:08 +01:00
c9cf33b21b
Skull: added block property APIs
...
I need these for my R13 block deserializer.
2021-04-27 19:22:45 +01:00
0aa0d77307
Skull: recognize noDrops flag
2021-04-27 19:21:29 +01:00
017ca55a58
Vine: use facing as both keys and values
2021-04-27 15:19:55 +01:00
845819123d
Player: drop perm nulling
...
this is no longer necessary because the PermissibleBase doesn't keep a ref to the Player anymore.
2021-04-27 14:49:26 +01:00
8364bc51ac
...
2021-04-27 14:47:11 +01:00
7ce77713dd
InventoryManager: add a mechanism to allow plugins to inject their own container open packet creators
...
closes #4008
2021-04-27 14:40:43 +01:00
f37c414298
Merge remote-tracking branch 'origin/stable'
2021-04-27 14:25:54 +01:00
127b57048c
Allow plugins to use PSR-4 namespace mapping ( #4188 )
...
* Allow plugins to use PSR-4 namespace mapping
this is a reduced implementation which serves the 99% use case without being horribly breakable.
Plugins may now specify a `src-namespace-prefix`, which should be set to the namespace of the classes in `src`.
If the old system is used, `src-namespace-prefix` can be omitted, or set to an empty string.
Examples:
- If `src-namespace-prefix` is `dktapps\test`, `dktapps\test\Main` will be searched for in `src/Main.php`, instead of `src/dktapps/test/Main.php`.
* Migrate TesterPlugin to PSR-4
2021-04-23 19:34:46 +01:00
fc01735b6f
Fixed infinite loop when placing two coral plants next to each other
...
the dead flag is not persisted in their metadata, so they forget their state when next read from the world.
2021-04-19 23:01:57 +01:00
4e0bc6c98e
Scrub PHPStan baselines
2021-04-19 16:18:22 +01:00
73f913e279
Modernize TesterPlugin
2021-04-19 14:16:05 +01:00
dc51af8b66
changelog: mention CancelTaskException addition
...
[ci skip]
2021-04-19 14:00:54 +01:00
94928c030a
Removed CancellableClosureTask
2021-04-19 14:00:23 +01:00
9c1b4fd1cd
Added CancelTaskException ( #4186 )
2021-04-19 13:41:51 +01:00
5872b2fe23
Merge remote-tracking branch 'origin/stable'
2021-04-19 13:32:15 +01:00
66fdf526d4
Remove GarbageServerboundPacket
...
it's not the protocol implementation's job to decide what's garbage. It should only indicate that a packet MAY be sent by the client. It should then be up to the handler to decide what to do with it.
2021-04-19 01:07:21 +01:00
6845cbb2b3
Silence LevelSoundEventPacket noise
2021-04-19 01:02:22 +01:00
4f4069d403
World: remove another noisy debug message
2021-04-19 00:55:42 +01:00
09a2402f01
Fixed precondition on double chunk send being useless
...
this is messy, but necessary for now.
2021-04-19 00:50:43 +01:00
d19c21e2e1
Updated PHPStan baseline
2021-04-19 00:38:27 +01:00
6d38922af0
Undo my -100IQ fuckup with chunk sending precondition
...
the commit I reverted put the preconditions in the completion handler,
which is executed AFTER THE CHUNK IS SENT.
Revert "NetworkSession: allow Player to handle its own business in chunk sending"
This reverts commit a223d1cbf3 .
2021-04-19 00:36:13 +01:00
35a3522b4e
Player: fixed chunks getting spammed like crazy during generation
...
because of the shitty way that the chunk resending is handled, it causes all kinds of problems with the async system because of potential reversions of the state during the process.
2021-04-19 00:30:34 +01:00
0251359179
ChunkCache: remove outdated TODO comment
...
we don't set the entire chunk during lighting updates anymore, so updating light doesn't trigger onChunkChanged().
2021-04-19 00:20:03 +01:00
b4afa46fad
Player: don't re-request chunks unless they've already been sent
...
if they've been requested, the ChunkCache will take care of rebuilding the chunk packet before sending it.
2021-04-18 23:53:34 +01:00
129c638e29
Remove unused import
2021-04-18 20:33:49 +01:00
caf3ec1b54
World: improve documentation of World::getPotentialBlockSkyLightAt()
2021-04-18 20:31:42 +01:00
53ebe4f9f9
World: added getHighestAdjacentFullLightAt()
2021-04-18 20:20:08 +01:00
51b0685881
World: document getFullLight() and getFullLightAt()
2021-04-18 20:14:16 +01:00
f29ababf8d
World: Rearrange some light-related methods
...
these things are all over the place ...
2021-04-18 20:07:36 +01:00
5dfa6a2296
Fix dragon egg teleporting in creative ( #4180 )
...
closes #4179
2021-04-17 19:11:10 +01:00
a32eb4ebc3
Implemented coral and coral fans
...
this implementation is very rough due to having to hack around lots more MCPE bullshit, and currently doesn't allow dynamic coral types; but it's there. We'll clean this up after 1.13 migration is done.
2021-04-17 02:04:10 +01:00
d5e1b4bd39
Furnace: Separate light/extinguish code into onStartSmelting() and onStopSmelting() hooks
...
this is a preparation for other kinds of furnaces which might not be plain old Furnaces.
2021-04-17 01:36:16 +01:00
9abdcd8ee5
shut
2021-04-16 21:45:22 +01:00
01c3668375
ItemFactory: Check the bounds of durability, instead of trying to catch exceptions
2021-04-16 21:30:48 +01:00
da51f106de
ItemFactory/BlockFactory: give more specific class descriptions
...
these classes both have a very specific purpose now, which is much lesser than it was in PM3.
2021-04-16 21:27:28 +01:00
c979ab8aa0
Be more specific with documentation of ItemFactory::register() and BlockFactory::register()
2021-04-16 21:24:16 +01:00
6071746993
Mark ItemFactory::get() and BlockFactory::get() as @deprecated
2021-04-16 21:16:27 +01:00
81ced66bd0
BlockIdentifier: variant parameter of constructor is now mandatory
2021-04-16 20:14:29 +01:00
8d2ee516f0
Merge branch 'stable'
2021-04-16 18:26:33 +01:00
b31b097b8e
LightPopulationTask no longer hard-depends on Server
2021-04-16 15:41:14 +01:00
ebd19f5a70
SubChunkExplorer: Protect world field
2021-04-15 23:32:30 +01:00
bf67170504
SubChunk: don't assume 15 sky light when not allocated
...
closes #2533
at long last...
2021-04-15 23:22:53 +01:00
5d83f4670a
RegionLoader: Switch to using named constructors
...
this makes the code more self-descriptive, and also helps to detect potential bugs.
2021-04-15 21:57:23 +01:00
e8dd4de5c8
SubChunk: Lazily allocate LightArrays as needed
...
this is slightly slower, but saves a significant amount of memory (~80 KB per chunk).
Since ext-chunkutils2 doesn't do copy-on-write trickery like the PHP impl did, we need this to get the memory advantages back.
2021-04-15 21:43:46 +01:00
e6ecacbb2b
World: do not access chunks for light if they aren't yet light-populated
2021-04-15 21:21:34 +01:00
ab9615fb9c
World: fixed documentation for getHighestAdjacentPotentialBlockSkyLight()
...
[ci skip]
2021-04-15 21:19:58 +01:00
0f14c589f7
[ci skip] changelog: added a table of contents
...
generated using https://ecotrust-canada.github.io/markdown-toc/
2021-04-15 20:48:54 +01:00
9655cb819d
World: Remove duplicated code
2021-04-15 19:41:03 +01:00
99ed87bc29
NetworkSession: changed misleading debug message in beginSpawnSequence()
2021-04-15 19:27:51 +01:00
ec32848a97
[ci skip] changelog: world spawn generation progress is now logged
2021-04-15 19:27:17 +01:00
a0c3102b05
FormatConverter: add @phpstan-param for newProvider ctor parameter
2021-04-15 19:14:52 +01:00
8e3f5737a0
RegionWorldProvider: fix CS
2021-04-15 15:39:08 +01:00
32c4a165cf
Removed RegionLoader::open()
...
this is nothing but a source of bugs.
2021-04-15 15:38:18 +01:00
edb590f681
missed one ...
2021-04-15 15:23:15 +01:00
08f0c9a244
Separate writable parts of RegionWorldProvider into WritableRegionWorldProvider
2021-04-15 15:20:57 +01:00
e6fb6b1f27
BaseLevelProvider: Remove obsolete proxy methods
2021-04-15 15:15:16 +01:00
be190fc41b
gitignore: add backups
2021-04-15 15:01:01 +01:00
dc5b1efa66
Merge remote-tracking branch 'origin/stable'
2021-04-15 14:04:27 +01:00
8af6b112d2
WorldManager: log after first chunk's generation has been completed
...
this is as close as we can get to the actual start of generation.
2021-04-15 14:01:28 +01:00
506a235d7a
[ci skip] changelog: remove mention of ext-ds
2021-04-15 14:00:45 +01:00
3e1ff2a63b
[ci skip] mention WorldCreationOptions changes in changelog
2021-04-15 13:57:20 +01:00
7b21fc8e9d
WorldCreationOptions are now mandatory during creation of worlds
2021-04-15 13:54:58 +01:00
203cc7fcef
World: Removed noisy debug message
2021-04-13 22:32:00 +01:00
ecf6de3430
WorldManager: Pre-generate a radius of 8 chunks
...
3 is absurdly small. 8 is a more realistic estimation of what the average player's render distance will be (it's also the default server.properties limit).
3 doesn't even fill the default spawn-radius setting, meaning that delays during player connection would occur anyway due to generation.
2021-04-13 22:15:47 +01:00
0f3147f49b
WorldManager: Log progress of spawn terrain generation
2021-04-13 21:28:17 +01:00
c90ca37ea3
Fix CS
2021-04-13 21:10:18 +01:00
ab176264b4
...
2021-04-13 21:06:37 +01:00
9c1b274499
WorldManager::createWorld() now accepts WorldCreationOptions instead of mixed[]
2021-04-13 21:03:25 +01:00
6ce15854af
Clean up generator preset handling
2021-04-13 20:19:53 +01:00
bfa1b4384b
Updated composer dependencies
2021-04-13 15:48:14 +01:00
c42a00641f
[ci skip] changelog: mention more Permission API changes
2021-04-12 16:25:50 +01:00
666670bc6f
PermissionAttachment may now reference zero or more permissibles
...
this makes PermissionAttachment more and more like Permission, except that it doesn't have a name.
Right now, the only value of this API change is that it allows breaking references to dead Permissibles, but in the future it should be possible to reuse a single PermissionAttachment on multiple Permissibles.
2021-04-12 15:57:24 +01:00
4b715aaba7
Document API changes related to broadcast channels
...
closes #2960
2021-04-11 20:59:09 +01:00
e720c001a9
ConsoleCommandSender: ensure that PermissibleBase doesn't leak
...
if recalculatePermissions() was called, the PermissionManager will reference it, preventing it from being GC'd.
2021-04-11 17:21:29 +01:00
66622defae
PacketSerializer: fix merge error
2021-04-11 16:49:57 +01:00
74d103a56f
Merge remote-tracking branch 'origin/stable'
2021-04-11 16:36:39 +01:00
0312b62c8a
DataPacket no longer keeps its own serializer
...
since a while ago, we're anyway just discarding the internal buffer anyway when the packet is repeatedly encoded, so this doesn't serve any advantage anymore.
We do need a system to be able to reuse encoded packet buffers, but right now we're not reusing them anyway.
2021-04-09 15:37:58 +01:00
19f536d68a
...
2021-04-07 21:54:21 +01:00
1e6d97a157
Merge branch 'stable'
2021-04-07 21:25:39 +01:00
540dadbda0
Merge commit 'e22b6ff5667534c6cdeef55913e46f973772663f'
2021-04-07 20:25:24 +01:00
7aa336f5e4
Remove dead baseline
2021-04-07 19:44:00 +01:00
7578bca006
Merge tag '3.18.2'
2021-04-07 19:41:57 +01:00
1898d4b42c
Fixed corner case with player spawning in ungenerated terrain
...
we can't get the safe spawn location of a set of coordinates if the coordinates are in an ungenerated chunk. This can happen if doing /setworldspawn <somewhere ungenerated> and then having a new player join the server.
2021-04-03 22:20:19 +01:00
4eaa600f35
actions: clone submodules in PHPUnit job
2021-03-31 21:54:27 +01:00
cd71fec53d
fucking phpstorm 2020.3 and its broken autocomplete
2021-03-31 21:41:50 +01:00
5e8078f3dd
PacketSerializer: Improved performance of item serialize/deserialize
2021-03-31 21:39:55 +01:00
b7a6c9dc17
Renamed BadPacketException -> PacketHandlingException
...
this better describes the intent, instead of just vaguely describing a packet as 'bad'.
2021-03-30 01:15:28 +01:00
25998720ce
Fixed server crash on invalid gamemode in SetPlayerGameTypePacket
...
this really ought to be detected at the decode layer, but right now that's a bit difficult ...
2021-03-28 21:11:07 +01:00
7fe6815f7c
Merge branch 'stable'
2021-03-28 20:39:59 +01:00
b032d49722
Merge branch 'stable'
2021-03-28 19:41:23 +01:00
7139eccfbe
Merge branch 'stable'
2021-03-28 18:11:53 +01:00
d5549b72de
...
2021-03-27 00:08:23 +00:00
9137666952
Fixed build
2021-03-26 22:57:21 +00:00
06f20234f7
Scrub unused imports
2021-03-26 22:56:09 +00:00
adbc58f326
TickingChunkLoader: use native return types
2021-03-26 22:55:48 +00:00
cdeedbad8b
Player: extract some entity spawning logic into a separate function
2021-03-26 22:51:56 +00:00
de49a361c0
NetworkSession: Remove parameters from startUsingChunk() callback
...
these can easily be use()d into the closure (which also has slightly better performance, because no type checks - not that anyone will notice).
2021-03-26 22:45:36 +00:00
49cf009017
Remove unused variable
2021-03-26 22:43:21 +00:00
a223d1cbf3
NetworkSession: allow Player to handle its own business in chunk sending
...
these checks should appear consistently in all of these async callbacks.
2021-03-26 22:00:42 +00:00
f047ecfd2d
Fixed player spawning in ungenerated terrain ( #4087 )
...
fixes #4044
fixes #2724
this is significantly more complex than I hoped for, but it's a start... and it works.
2021-03-26 21:36:27 +00:00
64886707b2
SubChunkExplorer: avoid repeated shift-right instructions
2021-03-25 23:36:10 +00:00
5e9ce92b55
Explosion: don't depend on air having stateID 0
2021-03-25 23:17:33 +00:00
52ce8ad8ae
Plugin: removed useless shit
...
Plugin is the interface by which the server core interacts with plugins, so it should be limited only to the stuff that the server actually uses.
These methods are still provided by PluginBase, so in 99.9% of cases there will be no BC break.
2021-03-25 19:17:16 +00:00
d9b548bfde
Fixed unintentional formatting change introduced by ae75d73f48
2021-03-25 01:37:26 +00:00
9c10599c30
Updated PreProcessor to pmmp/PreProcessor@6e223fa9a0
2021-03-25 01:33:05 +00:00
61bca7cfbc
master supports 7.4 only
2021-03-25 01:31:25 +00:00
95eb70a924
Merge branch 'stable'
2021-03-25 01:30:52 +00:00
0d775f8731
Require ext-chunkutils2 at ^0.2.0
2021-03-23 22:23:17 +00:00
aa8c13ec45
Remove dynamic LightArray constants
...
sad, no constexpr functions :(
2021-03-23 20:23:56 +00:00
17dd574814
Fixed composer lockfile
2021-03-23 20:00:37 +00:00
f2a320bb5c
Merge branch 'stable'
2021-03-23 19:57:54 +00:00
9ee80357b0
phpstan baselines cleanup
2021-03-23 15:24:20 +00:00
ad048f0b7f
Merge remote-tracking branch 'origin/stable'
2021-03-23 15:17:10 +00:00
51449265ee
Updated composer dependencies
...
this should also bring the phar back down to a sensible size ...
2021-03-23 15:04:51 +00:00
8dd900a2c6
Sugarcane: allow placement on podzol ( #4094 )
2021-03-23 00:00:13 +00:00
eb9b644447
PressurePlate: remove collision boxes, closes #4045
2021-03-22 21:54:27 +00:00
49438d360d
RegistryUtils: generate ordered doc comments
...
this makes things easier to find, especially in the large ones like VanillaBlocks.
2021-03-22 16:16:28 +00:00
90161f24e3
Added script to update registry/enum docblocks
2021-03-22 16:00:09 +00:00
a515b5e1b8
World: remove dead constant Y_MASK
2021-03-19 21:13:56 +00:00
5dd0b3ac35
OOOPS
...
it's a bit too early for this
2021-03-19 21:12:46 +00:00
69cb0ba1bb
Entity: don't flag as closed until just before cycle destruction
...
this allows stuff that requires a non-cycle-destroyed state to still operate during onDispose().
2021-03-19 01:00:49 +00:00
c092a2e836
Separate TickingChunkLoader from ChunkLoader
...
this makes it possible to keep chunks loaded without ticking them.
2021-03-18 23:19:27 +00:00
d1387ebd0a
World: assume that the primary active chunk is not NULL in generateChunkCallback()
2021-03-18 21:56:17 +00:00
34bb225566
World: rename some poorly-named fields
2021-03-18 21:33:17 +00:00
7f177328ca
[ci skip] changelog: fix typo
2021-03-18 20:18:55 +00:00
eb9a68edee
Further refactors to prepare for y=-64 lower limit
2021-03-18 00:08:16 +00:00
b844c4266d
Added World::Y_MIN
...
preparation for Y axis expansion in 1.17
2021-03-17 23:19:49 +00:00
5a59afbe2c
Place world conversion backups in <pwd>/backups/worlds instead of <pwd>/world_conversion_backups
2021-03-17 01:21:11 +00:00
fe3b493cdb
UPnP: restore 'attempting to portforward' log message
...
sometimes this takes a long time (usually in the failure case).
2021-03-17 01:06:05 +00:00
b3c6c11b20
BulkCurlTask now accepts a closure callback for onCompletion
...
this requires much less boilerplate code than an anonymous class.
2021-03-16 23:56:14 +00:00
dcf53bd06d
BulkCurlTask: fixed reference to removed function [ci skip]
2021-03-16 23:38:07 +00:00
83d1051a06
changelog: mention performance improvements in event handling
2021-03-16 23:32:23 +00:00
eba6899065
changelog: mention performance improvements caused by morton codes and libdeflate
...
these two things provide a significant performance improvement over PM3, so they should be noted.
2021-03-16 23:19:33 +00:00
72de45f0e9
Drop pocketmine/uuid for ramsey/uuid
2021-03-16 23:03:00 +00:00
6d622c4020
Merge branch 'stable'
2021-03-14 23:32:09 +00:00
3fe0adbd7f
Merge branch 'stable'
2021-03-14 20:14:08 +00:00
a7dbc2c77b
Merge tag '3.17.7'
2021-03-14 19:29:32 +00:00
3dbf27e0f1
Merge branch 'stable'
2021-03-07 21:07:58 +00:00
c1e5dd2a4e
Merge branch 'stable'
2021-03-07 20:15:11 +00:00
b5361d5831
Falling lava may not harden
...
fixes #4050
this was not an issue on PM3 because the decay and falling state were both combined into the meta.
2021-02-25 22:36:53 +00:00
a49ee0d6b0
World: mark addTile() and removeTile() as @internal
2021-02-24 23:42:09 +00:00
3907ae6726
Merge remote-tracking branch 'origin/stable'
2021-02-16 22:19:54 +00:00
8dd61df7ac
Fixed server crash on truncated varint in packet header
2021-02-16 20:38:15 +00:00
dff13a884f
Merge branch 'stable'
2021-02-12 17:34:25 +00:00
9a1cef0d4f
Merge branch 'stable'
2021-02-11 22:35:33 +00:00
fd5141745d
Use a valid commit hash for pmmp/leveldb
...
the previous one pointed to the main repository, and not the pmmp fork. (Why am I maintaining a fork again? ...)
2021-02-11 17:01:10 +00:00
c21ec614fc
Fixed PHPStan 0.12.74 error in WorldManager
2021-02-11 16:54:14 +00:00
de0766dbef
actions: update PM4-specific extensions to PHP 8.0 compatible versions
2021-02-11 16:48:10 +00:00
7573a01b17
Merge branch 'stable'
2021-02-11 16:42:23 +00:00
298034549e
actions: drop ext-ds from PHP build
2021-02-11 15:56:19 +00:00
672622950f
ObjectSet: make add() and remove() variadic to match ds
...
there are still some variadic usages in the code, which, infuriatingly, phpstan does not detect (phpstan/phpstan#4528 ).
2021-02-11 15:54:05 +00:00
c61f66d973
Removed ext-ds dependency
2021-02-11 15:40:37 +00:00
b03ca1953a
Remove usage of Ds\Deque from WritableBookBase
...
ext-ds is not well maintained, and also not very well written. I'm planning to drop this extension for stability's sake.
2021-02-11 14:07:49 +00:00
e061028b69
Added Hopper::setFacing() and Hopper::getFacing() ( #4030 )
2021-02-09 16:04:05 +00:00
e80c1a0ce9
Split Mushroom Stem away from other mushroom variants
...
mushroom stem (and all-sided stem) are unique blocks, which don't drop anything and which don't stack with other shroom variants when block-picked.
They also get mapped to the same block when placed, and there's no distinction between red mushroom stem and brown mushroom stem.
2021-02-07 22:02:50 +00:00
edfe9ae745
Merge branch 'stable'
2021-02-07 21:11:24 +00:00
8d5cc9adc3
Merge branch 'stable'
2021-02-07 20:57:19 +00:00
c05779314d
Allow offline player data to be provided from a custom source
2021-02-07 20:29:37 +00:00
7745310870
Use native property types for login JSON models
...
this significantly reduces the amount of PHPDoc boilerplate, because the remaining doc comments can mostly be reduced to 1 line.
2021-02-07 17:54:38 +00:00
c456f21df8
one more
2021-02-07 17:36:49 +00:00
f952a6643c
Accept PHP 8.0 compatible dependency versions in composer.json
...
composer decided that this was a good time to reorganize composer.json for me, and... well, fuck it.
2021-02-07 17:33:33 +00:00
da7c97f885
Updated composer dependencies
2021-02-07 17:27:01 +00:00
bd4ce8d941
TNT: expose unstable flag
2021-02-06 23:46:51 +00:00
fd2ebd84b4
Recognize underwater TNT
2021-02-06 23:37:05 +00:00
609b21679f
Added Torch::setFacing() and Torch::getFacing()
...
these are not implemented with AnyFacingTrait because it would break LSP to have a setFacing that doesn't accept DOWN.
2021-02-06 22:31:36 +00:00
ce855f2133
Added isPressed() and setPressed() to PressurePlate
2021-02-06 21:20:38 +00:00
7c1f0ecb8b
Fixed getAxis()/setAxis() not being seen by static analysers for some blocks
...
when using VanillaBlocks::CHISELED_QUARTZ(), VanillaBlocks::PURPUR_PILLAR() or VanillaBlocks::QUARTZ_PILLAR(), static analysis was unable to detect getAxis() and setAxis(), because these blocks were implemented using anonymous classes.
2021-02-06 20:39:23 +00:00
9887138ac1
Get rid of anonymous classes for infested stone
2021-02-06 20:30:25 +00:00
21bafd9f07
PluginBase: add void return typehints to onLoad(), onEnable() and onDisable()
2021-02-06 20:20:36 +00:00
82bb83211f
CocoaBlock: deduplicate attachment condition checking
2021-02-06 19:34:52 +00:00
9ab3c57789
RedstoneRepeater: added getDelay() and setDelay()
2021-02-06 19:03:33 +00:00
233616aa6a
RedstoneLamp now uses PoweredByRedstoneTrait
2021-02-06 19:02:13 +00:00
5be03c3196
Make more use of PoweredByRedstoneTrait
2021-02-06 18:43:33 +00:00
48ef8771cd
Added AnalogRedstoneSignalEmitterTrait
2021-02-06 18:33:14 +00:00
02b0036cbe
DaylightSensor: refactor power -> signalStrength
2021-02-06 17:47:29 +00:00
4fc3bc53f7
Clean up hierarchy of rails
...
detector rail has fundamentally different functionality than activator and powered rails, so it's misleading to present the same APIs for both.
detector rail's 'powered' state is better referred to as 'activated', since it means the detector rail is actually _producing_ power, and not _receiving_ power.
2021-02-05 22:00:17 +00:00
6ccfe21d57
Block: improved accuracy of isFullCube()
2021-02-04 23:10:13 +00:00
169650dc5b
MainLogger: accept timezone as a constructor parameter
...
this makes it easier to unit-test, as well as making it independent of Timezone.
2021-02-04 21:50:06 +00:00
54d9342ed9
AsyncPool: Always collect workers, even if the task queue is empty
...
because of the way async tasks are processed, we might collect results from a task before it's able to be collected by collect(). Therefore, the queue might be empty, even though there are still tasks to be collected.
2021-02-04 21:43:53 +00:00
27b1951df7
MainLogger: accept main thread name as a constructor parameter
2021-02-04 20:55:50 +00:00
709b4154d7
MainLogger: Require useFormattingCodes as a constructor parameter
...
this avoids needing to call Terminal::init() before starting a MainLogger. Since it inits the formatting codes anyway when log messages are first recorded, it shouldn't be necessary to pre-initialize it.
2021-02-04 19:16:22 +00:00
6d64fb9af8
MainLogger: remove obsolete logFile field
2021-02-04 16:51:02 +00:00
7684dc03fa
Merge remote-tracking branch 'origin/stable'
2021-02-04 16:45:34 +00:00
ae75d73f48
Extract MainLoggerThread unit from MainLogger
...
MainLogger is no longer a Thread, as per the recent changes to pocketmine/log-pthreads.
2021-02-04 16:28:49 +00:00
4b9639f6c9
Merge branch 'stable'
2021-02-04 15:55:39 +00:00
4158f77110
Merge remote-tracking branch 'origin/stable'
2021-02-03 17:52:28 +00:00
561fc62232
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# .github/workflows/main.yml
# resources/vanilla
# src/pocketmine/VersionInfo.php
# src/world/format/io/region/RegionLoader.php
2021-02-03 17:32:47 +00:00
079e794339
Armor: fixed item disappearing when switching two of the same armour pieces
...
Player->useHeldItem() assumes that if the old item == the new item, we want to set the item back into the inventory if it's modified in-place. Therefore, we don't modify the item in-place to bypass the problem.
closes #4022
2021-02-03 17:05:16 +00:00
d4290837f3
fix build failure
2021-02-02 13:55:56 +00:00
3e1ac66abf
Merge branch 'stable'
2021-02-02 13:46:29 +00:00
02a4f0a170
Mark metadata as nullable in resource pack manifest data
...
if the metadata isn't provided, it won't be initialized during decoding.
2021-01-27 22:05:43 +00:00
5a1131d72d
Populator: require dependencies explicitly, don't make bad assumptions about fields
...
this also leaks ChunkManagers on the worker threads because the generator context is long-lived.
2021-01-27 21:08:46 +00:00
bbae02264d
Merge branch 'stable'
2021-01-27 20:04:13 +00:00
5384e2ba9d
Revert "MemoryDump: fixed duplicated properties, reduce useless noise"
...
This reverts commit efd67a132e .
2021-01-26 20:26:35 +00:00
269a389a97
BlockTransaction: added phpstan return type info for getBlocks()
2021-01-25 18:04:42 +00:00
74902d9926
[ci skip] changelog: mention InventoryPickupItemEvent->getItemEntity() rename
2021-01-21 13:58:08 +00:00
2064b411f2
fix build
2021-01-20 22:53:51 +00:00
69a829db91
Merge remote-tracking branch 'origin/stable'
2021-01-20 22:16:44 +00:00
3fb4b30742
InventoryPickupItemEvent: rename item to itemEntity ( #4007 )
2021-01-20 21:09:59 +00:00
487b5dd11d
Merge branch 'stable'
2021-01-16 19:44:15 +00:00
a9f8afa077
Banner: remove Deque usages
...
originally I introduced this to make it easier to implement the various APIs addPattern removePattern etc, but those were later removed in favour of simple getPatterns() and setPatterns(), allowing plugin developers to use ext-ds APIs to manipulate patterns.
However, ds poses a number of headaches because of mutability combined with by-ref semantics, which make it a pain to use these on the APIs because we can't guarantee that they won't be modified.
As much as arrays suck, they have two significant advantages over ext-ds: 1) they have copy-on-write semantics, and 2) they support PHP 8.0 without any extra work from me.
2021-01-15 00:17:56 +00:00
4c0d3d68af
Bump PHP requirement to 7.4.0
2021-01-12 21:53:41 +00:00
bbe9c01b46
Merge branch 'stable'
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/pocketmine/metadata/MetadataStore.php
# src/pocketmine/scheduler/AsyncTask.php
# tests/phpstan/configs/actual-problems.neon
2021-01-12 21:48:24 +00:00
120b224e41
Updated composer dependencies
2021-01-12 21:34:04 +00:00
a90f8601d4
[ci skip] changelog: fixed typo
2021-01-12 21:29:23 +00:00
c70c0b55df
Separate held item index change listener logic from PlayerInventory
2021-01-12 16:44:25 +00:00
01c867b608
Human: make held item sync on inventory content change more consistent
...
before this change, setContents() wouldn't trigger a held item sync, nor would setItem(heldItemIndex, someItem).
2021-01-10 20:30:39 +00:00
c4845ab6b1
Use Player->getNetworkSession() in places where it's assumed the player will be connected
2021-01-10 19:51:41 +00:00
5e73417fa9
Player::getNetworkSession() now explicitly handles disconnected state by throwing an exception
...
instead of just allowing return of possibly-null networkSession
2021-01-10 19:50:13 +00:00
3ef2a19527
Player: don't kick for attacking non-attackable entities
...
this is quite out-of-character for PM - it usually handles bad network requests by ignoring them, not by kicking the player off the server.
2021-01-08 20:58:15 +00:00
3dd01781d5
[ci skip] changelog: PlayerDisplayNameChangeEvent is new in this version
2021-01-08 20:52:21 +00:00
f4d81c0997
[ci skip] changelog: mention DedicatedQueryNetworkInterface
2021-01-08 20:51:56 +00:00
eb1c59597d
[ci skip] changelog: mention newly added blocks and items
2021-01-08 20:51:23 +00:00
80198daba0
[ci skip] changelog: mention changes to Cancellable
2021-01-08 19:53:15 +00:00
f383685c9b
[ci skip] update changelog
2021-01-08 19:44:28 +00:00
053a7a1a61
Entity: split getSyncedNetworkData() into two functions
...
to avoid opaque boolean parameters
2021-01-08 13:59:52 +00:00
e53b57732b
Entity: replace separate height/width/eyeHeight fields with an EntitySizeInfo structure
...
this will make it easier to implement stuff like sleeping (properly), swimming and gliding without needing to duplicate all the fields.
2021-01-08 00:11:01 +00:00
574b615b4c
Player: fixed attack sounds being added at the wrong position
2021-01-08 00:04:05 +00:00
a3597e195a
Player: extract getSaveData() from save()
...
this allows plugins to request this data whenever they want it (e.g. to save offline any time they want, instead of being confined to the server autosave interval).
2021-01-07 23:37:47 +00:00
eaaed79b93
Player: remove useless check from save()
...
this exception is only thrown if the player is closed, which is already unexpected in the first place and will actually crash if it's not kosher. This prevents doing stuff like saving players during onDispose(), which crashes the server if a player is disconnected due to flagForDespawn().
2021-01-07 23:33:10 +00:00
7b806e74b8
Player: use own logger for movement debug
2021-01-07 22:06:55 +00:00
5392ddf0b9
Fixed TNT broadcasting ignition sound ( #3996 )
...
closes #3952
2021-01-07 21:18:18 +00:00
82c8fa696a
Relocate teleport ACK checks to InGamePacketHandler
2021-01-07 20:43:31 +00:00
555eb464b6
build.sh: fix formatting
2021-01-06 20:10:14 +00:00
abd9e2dd4c
...
2021-01-06 19:41:08 +00:00
e8d319d87d
attempt #2
2021-01-06 18:48:14 +00:00
aadbdb375b
Merge remote-tracking branch 'origin/stable' into gh-actions-multi-php-master
2021-01-06 18:32:34 +00:00
d76883a5f8
Merge branch 'stable'
2020-12-29 18:00:09 +00:00
5fa4e284bf
Merge branch 'stable'
2020-12-27 19:35:27 +00:00
793081d803
Entity: assume that position has a valid World during setPosition()
2020-12-27 19:20:37 +00:00
f215207a27
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/CrashDump.php
# src/pocketmine/VersionInfo.php
# src/pocketmine/network/mcpe/protocol/DataPacket.php
2020-12-23 22:34:25 +00:00
8b5529fe17
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
2020-12-23 19:53:45 +00:00
bcc3e87730
Timings: rename core timers to remove 'timer' from the names
...
this makes them shorter and more consistent.
2020-12-23 17:52:25 +00:00
1d7b65e0c2
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# tests/gh-actions/build.sh
2020-12-21 00:16:12 +00:00
e762b79aae
Player: fixed setPosition() resending all the chunks
...
closes #3977
2020-12-21 00:09:49 +00:00
2ba47a80a4
updated build.sh to build PM4 binaries for gh actions
2020-12-20 22:18:04 +00:00
c5693598aa
BulkCurlTask constructor now accepts BulkCurlTaskOperation[] instead of shaped arrays
2020-12-20 22:18:03 +00:00
9228f006d4
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# composer.json
# composer.lock
# resources/vanilla
# src/CrashDump.php
# src/PocketMine.php
# src/pocketmine/Server.php
# src/pocketmine/item/Bucket.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/Chunk.php
# src/pocketmine/level/format/io/leveldb/LevelDB.php
# src/pocketmine/level/format/io/region/McRegion.php
# src/pocketmine/network/mcpe/protocol/BatchPacket.php
# src/pocketmine/tile/Furnace.php
# src/pocketmine/utils/UUID.php
# src/utils/ServerKiller.php
2020-12-20 20:54:13 +00:00
1e737644de
World: split populateChunk() into two functions
...
requestChunkPopulation() respects the queue size, orderChunkPopulation() does not.
requestChunkPopulation() should be used for non-essential generation (which mainly includes generation for player use).
orderChunkPopulation() should probably be used by plugins.
2020-12-17 23:49:37 +00:00
48623f4e79
World: add additional checks to addEntity() and removeEntity()
2020-12-14 18:55:52 +00:00
24ac5f8be0
Fixed craftingDataCacheRebuildTimer never being stopped
2020-12-13 21:41:22 +00:00
9e11cc03de
Server: get rid of matchPlayer()
...
the functionality of this API method is too specialized to be of any practical use.
In addition, a search on Poggit reveals that the only uses of this API method are abuses or incorrect uses anyway.
2020-12-13 21:38:11 +00:00
c0438f1ddb
Move player creation out of NetworkSession
2020-12-13 21:20:37 +00:00
6f09d472e2
WorldTimings: give timers names that actually make sense
2020-12-13 20:17:46 +00:00
1de5fc86c4
PopulationTask: assume that generator has been initialized
2020-12-13 20:00:57 +00:00
eaf6e19a6f
RakLib sync n.2
2020-12-12 19:54:17 +00:00
5f4ef84d52
Clean up imports
2020-12-12 19:48:00 +00:00
f81d061ea9
Updated to newest RakLib
2020-12-12 19:06:45 +00:00
3e0cf30285
fixed phpstan failures caused by 5282ae3298
2020-12-11 23:00:14 +00:00
6a314c7d70
Updated build/php submodule to pmmp/php-build-scripts@bdce80c6c2
2020-12-11 22:44:44 +00:00
2af15557b9
Merge branch 'stable'
...
# Conflicts:
# .travis.yml
# resources/vanilla
# src/block/BlockToolType.php
# src/network/mcpe/protocol/types/entity/MetadataProperty.php
# tests/travis/setup-php.yml
2020-12-11 22:44:04 +00:00
61de84373a
PermissionParser: simplify code
2020-12-11 19:09:01 +00:00
bee770ebf5
Drop nested permissions support in plugin.yml
2020-12-11 19:03:52 +00:00
dd58a95ae5
Move last-known-position tracking to World instead of Entity
2020-12-10 18:28:40 +00:00
e925423749
Entity: fix chunk tracking consistency issues, fixed attempted chunk loading in origin world when teleporting to a different position in a different world
2020-12-10 18:13:18 +00:00
5282ae3298
TimingsHandler::printTimings() now returns a list of strings instead of requiring a resource
2020-12-09 22:32:32 +00:00
58db3531c7
Use hrtime() for collecting timings
...
this allows nanosecond resolution and generally better accuracy than microtime(), which is subject to floating-point errors.
2020-12-09 22:24:31 +00:00
d39348929f
Removed PLUGIN_PATH constant
2020-12-09 20:48:50 +00:00
ff6672ba85
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/utils/Utils.php
2020-12-09 20:27:19 +00:00
22c8bdeeeb
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/CrashDump.php
# src/utils/Utils.php
2020-12-09 01:47:05 +00:00
794bb0a71d
PermissionParser: bail on encountering permissions whose names are not strings
2020-12-09 00:32:50 +00:00
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
05a1f45111
PluginGraylist: all fields are mandatory
2020-12-08 13:38:44 +00:00
219cf2126b
RegionWorldProvider: make loadRegion() return RegionLoader, fix 3 PHPStan null-reference errors
2020-12-07 19:04:52 +00:00
e810a68dd7
Merge branch 'stable'
...
# Conflicts:
# build/php
# composer.lock
# resources/vanilla
# src/pocketmine/VersionInfo.php
# src/pocketmine/level/format/io/region/McRegion.php
2020-12-07 18:57:58 +00:00
c4b47c6c06
Implemented /clear command ( #3854 )
...
closes #3854
2020-12-06 15:26:12 +00:00
d9de775c27
Updated DevTools submodule to pmmp/DevTools@888d021260
2020-12-05 22:56:27 +00:00
0bbceee86d
PermissionParser: give permissions default FALSE if they don't specify their own default
2020-12-05 21:06:07 +00:00
59cb11dc83
ChunkManager->setChunk() no longer accepts NULL
2020-12-05 18:54:30 +00:00
b6df5b974d
World->getHighestBlockAt() may still return -1 if the queried column of blocks is all air
2020-12-05 18:14:38 +00:00
531c191431
Finalize Utils class
2020-12-05 18:09:23 +00:00
1f330c0f50
World: ignore entities calling onEntityMoved() who aren't members of the world
...
this can happen if movement or teleportation occurs during the creation of an entity.
2020-12-05 17:49:34 +00:00
b2bab6c2fb
clean dead errors out of phpstan l8 baseline
2020-12-05 01:32:23 +00:00
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
eca0e88471
BaseInventory: fixed passing NULL slots to InventoryListener->onContentChange()
...
as per the documentation, InventoryListener->onContentChange() does not expect to receive NULL in the given array.
2020-12-05 01:11:30 +00:00
070d8efda3
[ci skip] more world stuff for changelog
2020-12-05 01:02:53 +00:00
d728160a77
Removed the cycle between Entity and Chunk
...
it's now the World's responsibility to manage adding/removing entities from appropriate chunks. Entities no longer know or care that chunks exist.
Entity->checkChunks() remains as-is for backwards compatibility - now it just calls the world to sync its position.
2020-12-05 00:59:16 +00:00
03b1ea766a
Added a DedicatedQueryNetworkInterface to ensure Query functionality when RakLibInterface is disabled ( #3942 )
2020-12-04 21:21:25 +00:00
37b9694845
ConsumingItemAnimation: fixed itemID translation for 1.16.100
2020-12-04 20:44:03 +00:00
1c49cedc8c
World: disallow block placement and breaking in unloaded, ungenerated and locked chunks
2020-12-04 15:49:35 +00:00
bacdb7bde5
Make sure generator gets preemptively registered when a worker restart is detected
...
if a PopulationTask took place after the target worker was garbage collected, the population would fail and the chunks it used would be copied for nothing.
This change marks workers as having unregistered generators when detecting that a worker that previously had a generator registered is restarted.
2020-12-04 15:44:17 +00:00
e056456dd1
Player: fixed crash when stopping using a chunk before it's finished being generated
2020-12-04 15:36:43 +00:00
5ba09b6a25
fix PopulationTask crash
2020-12-03 23:48:40 +00:00
5f55cdfa76
Cleaned out dead error patterns from phpstan level 8 baseline
2020-12-03 22:44:03 +00:00
b9cd633cee
Chunks no longer exist in un-generated state
...
a non-generated chunk is now always represented by NULL. This forces the case of ungenerated chunks to be handled by all code, which is necessary because ungenerated chunks cannot be interacted with or modified in any meaningful way.
2020-12-03 22:28:43 +00:00
05ab44f768
PopulationTask no longer creates chunks if they don't exist
...
creating a throwaway empty chunk on the main thread is pointless.
2020-12-03 22:12:42 +00:00
c808095978
Chunks no longer contain their own coordinates
2020-12-03 21:59:30 +00:00
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
5b1fa25dff
LightPopulationTask: remove useless @var
2020-12-03 20:29:41 +00:00
7edfa3713b
Do not persist SimpleChunkManager between async tasks
...
this is just asking for memory leaks.
2020-12-03 19:46:23 +00:00
dde2e7e66f
generation: drop AsyncWorker thread-local storage in favour of a more specialized storage
2020-12-03 19:28:22 +00:00
999defd20d
World: remove create params from loadChunk() and loadChunkAtPosition()
2020-12-03 18:49:14 +00:00
a67f0d1f75
World->registerChunkLoader() no longer causes creation of an empty chunk
...
this only made sense to work around the server crashing when creating a player in ungenerated terrain, but spawning at y=256 is hardly preferable, and it'll crash since fd99445c5b anyway ...
2020-12-03 18:41:53 +00:00
1e7f9214cc
Entity: flag for despawn if entering ungenerated terrain
...
previously this created an empty chunk for the entity to hang around in until the terrain was generated, but that's problematic for several reasons, most importantly the fact that non-generated chunks are not saved.
2020-12-03 18:36:54 +00:00
ec2feeffcb
World->populateChunk() no longer causes ChunkLoadEvent to fire with an empty chunk
...
instead, it will fire when the chunk comes out of PopulationTask and is set into the world using setChunk().
There is still one place left where auto-creation of empty chunks is used by the core, and that's an issue i'm still deciding how to deal with.
2020-12-03 18:23:03 +00:00
fa9be2477d
World: do not fire ChunkListener->onChunkChanged() when a new chunk is set
...
the documentation expressly describes a chunk being _replaced_ by a new chunk. This doesn't fit when the chunk didn't exist to begin with.
2020-12-03 18:20:43 +00:00
74744fd498
World: fire ChunkLoadEvent in setChunk() if the chunk did not previously exist
...
I'm of two minds whether this should continue to fire onChunkChanged() on chunk loaders or not, since the chunks won't be referenced by any chunk loader anyway by virtue of not existing ...
2020-12-03 18:15:09 +00:00
5197707d32
Separated TimingsRecord from TimingsHandler (different lifetimes)
...
this fixes #3906 .
TimingsHandler will now be automatically destroyed when there are no TimingsRecord referencing it and its owner has no references left to it.
TimingsRecord will be automatically destroyed at the end of the timings session (if active).
This fixes records from temporary timers being lost after the timings handlers are removed, while also fixing TimingsHandlers piling up regardless of whether timings are running or not.
This opens the doors to have more volatile timers, such as per-player/per-session timers, which are destroyed on player quit, but which won't result in the timings disappearing from the final timings result.
2020-12-03 15:45:49 +00:00
29f6ed3f68
Use Snooze to improve AsyncTask collection times
...
regardless of how long an async task takes to run, it will take a multiple of 50ms to get the result processed. This delay causes issues in some cases for stuff like generation, which causes locking of adjacent chunks, and async packet compression, which experiences elevated latency because of this problem.
This is not an ideal solution for packet compression since it will cause the sleeper handler to get hammered, but since it's already getting hammered by every packet from RakLib, I don't think that's a big problem.
2020-12-02 19:34:34 +00:00
1775fb669b
SurvivalBlockBreakHandler: fixed block break effects stopping beyond 4 blocks distance
...
this was actually intended to be 16 blocks ...
2020-12-02 18:56:39 +00:00
0574b59df9
Network: fixed interfaces registered after raw packet handlers not respecting raw packet handler filters
2020-12-02 17:11:15 +00:00
bc2fafca27
Fixed players losing all permissions when being de-opped after joining as op
2020-12-02 17:04:37 +00:00
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
6001f69d52
Network->registerInterface() now returns whether the registration succeeded or not
2020-12-02 16:16:04 +00:00
807474b3fb
PermissibleBase: do not assign any permissions by default
...
there is no longer such a thing as a permission granted to 'everyone', since we're no longer limited to true/false/op/notop, and regular players are now assigned the pocketmine.group.user permission.
It's possible we might want to add more restricted groups than 'user' in the future, in which case it would be behaviour-BC-breaking to change the default assigned permissions when creating a new PermissibleBase. Therefore, it's better to not assign any permissions at all and let the caller decide.
In addition, this solves the problem of implied permission subscriptions and leak on PermissibleBase construction - if base permissions are provided, it should be expected that the permissible will subscribe to those permissions.
2020-12-02 15:56:54 +00:00
05c52fef46
Updated DevTools submodule to pmmp/DevTools@7c2d05cafc
2020-12-02 14:41:28 +00:00
b51c6e89b3
Introduced pocketmine.group.console
...
this is only used for /dumpmemory right now, but it's planned to be used for more stuff.
2020-12-02 13:35:48 +00:00
c5e12bb11f
PermissibleBase: simplify diff calculation
2020-12-02 11:29:45 +00:00
506e76917e
PermissionAttachmentInfo now includes a reference to the PermissionAttachmentInfo that caused its assignment (if any)
...
this allows plugins to easily identify which permission group caused a permission to be assigned (particularly if multiple groups might cause it).
2020-12-02 11:23:35 +00:00
880635603c
PermissibleBase: allow injecting more dynamic base permissions
2020-12-02 10:12:40 +00:00
13e8854ec0
PermissibleBase: fixed express denying of a root permission not working
...
this only took effect when a permission was applied as a root. When overridden with a permission attachment, the problem did not manifest.
2020-12-02 01:39:43 +00:00
f5bb5c1208
Permissible->recalculatePermissions() now returns a map of changed permissions with their old values
2020-12-02 01:13:19 +00:00
0634426c26
PermissibleBase: compute permission diff, do not fire callbacks when diff is empty
...
this fixes AvailableCommandsPacket getting sent twice when adding a PermissionAttachment.
2020-12-02 01:09:29 +00:00
6720e658bd
Remove useless group permission nodes
...
the only value these have is for convenience, and a permission manager plugin can easily generate them by parsing the permission IDs.
2020-12-02 00:00:21 +00:00
07dc0f2dd5
resource packs: added metadata to manifest models
2020-12-01 23:37:36 +00:00
10067c1043
Improve painting performance
...
these really shouldn't hit the CPU at all considering they are simply static objects ...
2020-12-01 23:31:38 +00:00
6d6f8c3c38
custom threads: use PTHREADS_INHERIT_NONE by default
...
this has the most reliable behaviour, because some stuff like respect/validation likes to include files unconditionally which declare functions that are already declared, which breaks due to the lack of function autoloading.
2020-12-01 22:32:59 +00:00
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
cc473184ac
Player: added API method getUsedChunks()
2020-12-01 19:40:22 +00:00
1905c01c87
PermissibleBase no longer circularly references its parent permissible
...
this was used for 2 things:
- to notify parent permissibles on recalculate permissions (not needed anymore thanks to callbacks)
- subscription to chat broadcast permissions (now handled separately, again using callbacks)
therefore, it's no longer needed for PermissibleBase to reference its parent, meaning that we can have one less circular dependency in our lives.
2020-12-01 18:46:39 +00:00
341d8747b7
Living: wipe out effect add/remove hooks onDispose()
2020-12-01 18:27:10 +00:00
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
c20893aa4b
PermissibleBase: more robust cycle destruction
2020-12-01 17:57:55 +00:00
87033592b1
Timings: remove obsolete timings handler
2020-12-01 17:40:09 +00:00
d602547941
PermissionAttachmentInfo no longer references Permissible
...
since the only way to obtain PermissionAttachmentInfo via the API is from the Permissible API, it makes zero sense to ask the attachmentinfo for its permissible, since we obviously already had it to be able to get the info in the first place. Therefore, this is just another useless reference stopping Permissibles from being garbage-collected.
2020-12-01 17:38:30 +00:00
d48af3f4ca
Merge branch 'stable'
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/permission/BanEntry.php
# src/permission/PermissionAttachmentInfo.php
2020-12-01 17:35:30 +00:00
f28bdb5aa2
[ci skip] update changelog to reflect permission changes
2020-12-01 17:24:38 +00:00
6d8833ccd3
Removal of permission defaults (in favour of permission cascading) ( #3937 )
2020-12-01 17:13:54 +00:00
1eabc3fe75
NetworkStackLatencyPacket: added named constructors
2020-11-30 21:29:51 +00:00
d56cf35385
Permissions are now always false when permission calculation hasn't been done yet
...
lack of permission calculation means that child permissions might not have been set correctly, so this might lead to users being able to access things they aren't supposed to.
2020-11-28 21:55:26 +00:00
97a4d80854
PlayerDataSaveEvent: provide online player if possible, otherwise don't load offline data from disk for no reason (we already have it, that's the whole point of the event ...)
2020-11-28 21:43:23 +00:00
614891f8a2
OfflinePlayer no longer depends on Server
...
it also doesn't provide stuff like isOnline() (you had to have a Server reference to get an OfflinePlayer anyway, just ask the Server if the player is online ...) and getPlayer().
2020-11-28 21:29:41 +00:00
c102477f91
OfflinePlayer: remove more useless junk
...
to obtain an OfflinePlayer instance you had to have a server instance to start with, which means getServer() is pointless, and also that isOp() and setOp() (which can be removed thanks to the fact that OfflinePlayer is not a Permissible) can be done by just asking the server.
2020-11-28 21:16:04 +00:00
3e9a37ca77
PermissionParser: remove unmaintained code
2020-11-28 20:51:09 +00:00
9867424117
[ci skip] reflect today's changes to Server in changelog
2020-11-28 19:35:12 +00:00
dd200ca8cd
Rewrite message broadcasting system to not depend on PermissionManager subscriptions
...
relying on permission subscriptions for this was unreliable (a permissible is not always subscribed to a permission even when it does have it), and also difficult to control (for example there have been various bugs in the past where a Player ended up subscribed to broadcast permissions when it didn't expect to be, thanks to permission recalculation happening too early).
In addition, we might in the future want to have broadcast receivers which are not permissibles (i.e. a more general interface than CommandSender (why does a broadcast receiver need to also be a command sender, anyway?)), which the permission system wouldn't be suitable for.
2020-11-28 19:28:47 +00:00
ee7fad2271
PermissibleBase: fixed root permissible being unaware of changes in some cases
...
for example, Player->recalculatePermissions() was not called when a player's op status changed, nor when a permission attachment altered permissions (potential secvuln for broadcasting).
2020-11-28 19:22:30 +00:00
011d1713c0
[ci skip] changelog updates
2020-11-28 18:33:08 +00:00
b40720749b
ZippedResourcePack: improved exception error on invalid manifest contents
2020-11-28 18:29:13 +00:00
c7961bfe90
Toss ServerOperator; PermissibleBase now tracks its own op status
...
as well as being simpler, this also allows some nice features, such as granting memory-only op state that goes away when the player quits the server.
2020-11-28 18:22:59 +00:00
4439781124
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/event/player/PlayerCreationEvent.php
2020-11-28 16:16:15 +00:00
8cf589eedd
Strip some junk out of IPlayer
...
these methods have better pathways through Server directly.
Also, setBanned() does not allow customising the reason for banning or the duration, nor does isBanned() account for IP bans because the code is so old ... better to force dependence on a central code path to avoid these inconsistencies.
I want to do the same thing for OP, but that's a separate problem due to its effects on the permission system.
2020-11-28 15:36:46 +00:00
70b0d83258
Removed Server->broadcast()
...
this method has an explicit dependency on permission subscriptions, which I plan to eradicate.
The method's functionality can be replaced using Server->broadcastMessage() with a custom recipients array.
2020-11-28 13:01:10 +00:00
ecbc4e9433
Permission->getChildren() no longer returns by-ref
2020-11-27 20:31:59 +00:00
aa67c4894f
Permission: added removeChild()
...
this probably isn't useful at all, but it's best to provide alternatives for all the stuff that getChildren() could have been used for ...
2020-11-27 20:31:24 +00:00
3849756993
Do not mutate the result of Permission->getChildren()
2020-11-27 20:28:36 +00:00
f0e43a6b22
DefaultPermissions: remove ridiculous recursion
...
this line is totally useless since the recursion does exactly the same thing as if it wasn't there.
2020-11-27 19:59:49 +00:00
1de486733a
Permission: remove dead code
...
Bukkit CCC at its finest... what the fuck this was doing anyway I have no idea
an addChild() method would have made far more sense, especially considering that addParent() doesn't actually mutate the child.
2020-11-27 19:56:39 +00:00
c454441646
[ci skip] updated changelog
2020-11-27 18:54:09 +00:00
9969c928a8
Player: Improved hardcore death handling
...
it's now possible to cancel the banning by cancelling PlayerKickEvent.
In addition, the disconnect message will now properly explain why the player is banned instead of just saying 'You have been banned',
and also banned-players.txt will show 'Died in hardcore mode' as the reason instead of being completely blank (seriously, we couldn't tell the difference between real bans and hardcore bans????)
2020-11-27 18:37:42 +00:00
5e44d5f75e
Do not load playerdata from disk just to op/deop/whitelist/dewhitelist
...
this is an impressively dumb idea.
the playerdata is not used here in any capacity so it doesn't make sense to load it, especially considering that it takes a significant amount of time.
2020-11-27 18:12:45 +00:00
5142281cfa
[ci skip] Server: remove misleading comment
2020-11-27 17:57:52 +00:00
0a7d81a2b0
FastChunkSerializer: retain emptyBlock on subchunks
...
I think we should probably get rid of this considering the potential for inconsistencies within a chunk, but not retaining this is a bug nonetheless, even though it doesn't have any effect in PM itself since we always use BlockLegacyIds << 4 as the empty block ID.
so, this is only really aiding (ab)use cases which weren't intended anyway ...
2020-11-27 13:41:35 +00:00
4e94025b3b
SubChunk: rename defaultBlock -> emptyBlockId
...
this better describes the purpose, which is to identify air.
though, it might make more sense to make air just always have zero as air's runtime ID, since this parameter is apparently making plugin devs think that this is suitable to fill a chunk with a specific block ...
2020-11-27 13:33:25 +00:00
4d42f0c3db
Timings: added timers for player data I/O
2020-11-27 00:02:34 +00:00
37ace19857
Updated netresearch/jsonmapper to 3.1.1
2020-11-26 23:39:57 +00:00
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
4ea5401d72
World->getHighestBlockAt() now throws an exception instead of returning -1 in ungenerated terrain
2020-11-26 19:44:22 +00:00
fd99445c5b
World->getSafeSpawn() now throws if the target is in ungenerated terrain, instead of silently returning the default
...
this WILL cause crashes in some cases on slower machines (#2724 ), but it's
better than randomly spawning at the top of the map.
2020-11-26 19:36:37 +00:00
4520e425c1
Sync BedrockData submodule with merge
...
I forgot to commit this in the merge ...
2020-11-21 21:17:23 +00:00
af1fe7c293
Merge branch 'stable'
2020-11-21 21:13:48 +00:00
bc208e11f4
phpstan 0.12.57
2020-11-21 18:07:14 +00:00
027ec129b6
Merge remote-tracking branch 'refs/remotes/origin/master'
2020-11-21 17:55:54 +00:00
7b865dc5a9
Updated composer dependencies
2020-11-21 17:55:32 +00:00
f2187477b1
Merge commit '8273f789ee785cda3269e3a9841e99241503dc4f'
...
# Conflicts:
# resources/vanilla
# src/utils/SingletonTrait.php
2020-11-21 17:49:07 +00:00
d2b593edf8
Updated composer dependencies
2020-11-21 17:47:54 +00:00
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
870d237260
BlockFactory::get() second parameter is now mandatory
2020-11-18 00:50:01 +00:00
28335e3c45
Player: fixed self-defeating condition in item consuming
...
this was giving players infinite food and potions.
2020-11-17 20:33:20 +00:00
6a1f551aab
[ci skip] update TileFactory TODOs ( #3912 )
2020-11-17 11:04:26 +00:00
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
09b22c1e79
NetworkSession: drop @var doc comment referring to nonexisting variable
2020-11-16 22:51:03 +00:00
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
d1775b166f
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
2020-11-16 21:35:08 +00:00
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
1d27225553
Relocate cache-related classes to mcpe\cache namespace
2020-11-16 19:39:30 +00:00
869c9dabf1
SetCommandsEnabledPacket: added ::create()
2020-11-16 19:11:10 +00:00
ca6a892834
[ci skip] NetworkSession: added some extra TODOs
2020-11-16 19:10:27 +00:00
16b71a265f
Barrel: added missing function import
2020-11-16 19:09:59 +00:00
de40ad80a6
Updated DevTools submodule to pmmp/DevTools@0c46527bee
2020-11-16 18:33:28 +00:00
a9faed7171
[ci skip] update BlockFactory TODOs
2020-11-16 18:23:01 +00:00
430d16e5f5
fixed borked test
2020-11-16 18:17:04 +00:00
563336cdc9
CoralType: remove unused magicNumber stuff
2020-11-16 18:12:38 +00:00
fd88c78d3a
added test for CoralTypeIdMap
...
we really need a better way to guarantee exhaustiveness for this ...
2020-11-16 18:12:01 +00:00
1eee24f1fa
Implemented coral blocks
...
there are some complications with coral plants due to the fact we're stuck with R12 worlds right now - and also coral fans are a major pain to implement due to how messed up the metadata is.
2020-11-16 18:05:39 +00:00
55a9ce46b9
VanillaBlocks: added BARREL
2020-11-16 17:56:13 +00:00
d7c6a20b34
Barrel: added @return $this to setOpen()
2020-11-16 17:29:24 +00:00
b2765f32e9
Implemented Barrels, closes #3672
2020-11-16 17:26:07 +00:00
1cf3a500f8
Clean up ChestInventory handling
...
longer term I want to rip this crap out completely, but right now this provides minor maintainability benefits, while also making it slightly less nasty to deal with other containers which animate their blocks, such as barrels and shulker boxes.
2020-11-16 16:59:19 +00:00
b534ae050e
DisallowEnumComparisonRule: detect bugs involving union types (Enum|null compared to Enum|null)
2020-11-14 16:51:13 +00:00
4ade7b6225
added CoralType enum
2020-11-14 16:24:13 +00:00
06efad94b6
Separated metadata handling from PillarRotationTrait
2020-11-14 16:21:50 +00:00
7469f28f24
Server: rename getPlayer() to getPlayerByPrefix()
...
closes #3910
the existing naming was misleading, and many plugin devs assumed that it returns an exact match. However, this is not guaranteed, and it's possible for two different players to match the same prefix.
- There is no defined behaviour for what happens when multiple players can equally match a prefix (e.g. 'fr' could match 'fred' or 'frog' equally, because the name lengths are the same)
- A prefix might match a different player at a different time (e.g. 'fr' could match 'freddie' before 'fred' joins, after which it will match 'fred' instead)
With these flaws in mind, it's better to break compatibility on this to make the intent more clear, and to make plugin developers reassess their usages of this method. In most non-command use cases, they should likely be using getPlayerExact() instead.
2020-11-14 15:49:41 +00:00
41a8007c47
phpstan: drop some error counts to account for recent Sugarcane changes
2020-11-12 22:26:04 +00:00
8e0cba56b8
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/entity/Entity.php
# src/pocketmine/tile/Tile.php
# tests/phpstan/configs/check-explicit-mixed-baseline.neon
# tests/phpstan/configs/l7-baseline.neon
2020-11-12 22:10:47 +00:00
04b038ff4b
[ci skip] more detail to PM4 changelog
2020-11-12 21:34:12 +00:00
0d9561c93f
Removed crafting data cache from CraftingManager
2020-11-12 21:30:59 +00:00
31089ce3b2
Timings: added broadcastPackets timer
...
the body of this function is potentially very expensive and isn't currently recorded by any timer.
2020-11-12 17:53:07 +00:00
afbef242c6
bootstrap: remove useless phpdoc
2020-11-12 17:12:08 +00:00
5efd0eba13
Imports cleanup
2020-11-12 17:11:34 +00:00
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
8f36957c10
phpstan: drop some dead level 8 ignoreErrors
2020-11-10 22:46:30 +00:00
21d37623f8
sync phpstan level 8 baseline with 75f2f12b99
2020-11-10 22:46:15 +00:00
d08c9ee634
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/VersionInfo.php
2020-11-10 22:44:59 +00:00
75f2f12b99
NetworkSession: rename some badly-named hooks
2020-11-10 15:01:48 +00:00
e23379c34b
EncryptionContext: provide the packet ID in the exception message
2020-11-10 14:45:19 +00:00
6a266bcbd1
Separated XUID stuff from PlayerInfo into its own XboxLivePlayerInfo
2020-11-10 14:25:08 +00:00
c43f14a2d2
Updated phpstan checkExplicitMixed baseline to account for changes in 463bc044df
2020-11-10 14:06:13 +00:00
6c02bac437
Updated DevTools submodule to 66b8f7dfd77f78478a180e40137e17606301233e
2020-11-09 20:30:22 +00:00
463bc044df
Rename PluginLoadOrder -> PluginEnableOrder
...
this more accurately describes its real purpose.
2020-11-09 20:28:08 +00:00
6cf875ca3a
Item: rename onActivate() to onInteractBlock()
2020-11-09 19:33:13 +00:00
8c480ffab9
Player: fix a few more cases of held-item getting trashed after some events
2020-11-09 19:31:48 +00:00
e573226025
ItemStack: fixed phpstan failure
2020-11-09 19:10:02 +00:00
2bcb398db9
ItemStack: added jsonSerialize
2020-11-09 19:05:00 +00:00
1d02829d6f
[ci skip] more detail for World API changes on PM4
2020-11-09 14:01:27 +00:00
66955d4b99
World: make loadChunk() more useful, drop useless proxy function getOrLoadChunk()
2020-11-09 13:41:46 +00:00
3c6a64f91b
Fixed armour equipment logic, close #3896
...
this isn't perfect because the client expects to be the boss here and is also inconsistent.
2020-11-09 13:32:12 +00:00
4e91009492
Armor: fixed equipping when right-clicking air instead of a block
...
this action (which is more accurately referred to as 'activate item' or 'use item' in other areas) always fires on right-click when holding any item, whether aiming at a block or not.
2020-11-09 12:47:36 +00:00
3bf87378ef
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/VersionInfo.php
# src/pocketmine/level/LevelTimings.php
2020-11-08 19:44:30 +00:00
f43d20b47a
Move attribute net sync to NetworkSession
2020-11-08 14:15:11 +00:00
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
4ae7efbfbc
[ci skip] add some documentation to Player internals
2020-11-08 14:03:30 +00:00
ffff0a6244
NetworkSession: remove obsolete TODO
2020-11-08 14:03:30 +00:00
b059e0b475
Item: fixed wrong tag being removed during serialization of custom name ( #3894 )
2020-11-07 01:25:37 +00:00
beb6a50883
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/pocketmine/Player.php
# tests/phpstan/configs/runtime-type-checks.neon
2020-11-06 13:18:49 +00:00
528726068e
phpstan 0.12.54
2020-11-06 13:09:04 +00:00
3aa902ff77
Updated composer dependencies
2020-11-06 13:07:28 +00:00
e6348bbd34
Entity: do not assume that save IDs are always strings
...
this is only the first of many changes needed to make entity savedata fully format-agnostic, but it's a start.
2020-11-06 13:05:17 +00:00
4b46549cd1
fix PHPStan failure
...
setDirtyFlag has a void return type, so PHPStan assumes it's non-pure and invalidates the type info.
2020-11-05 14:35:23 +00:00
058a3b3fa6
relocate some world-specific logic from Chunk to World
2020-11-05 14:28:36 +00:00
8762d44506
World: skip lighting updates on chunks which are not yet light populated
2020-11-04 17:50:16 +00:00
72ace3951e
InGamePacketHandler: fixed crafting table breaking when clicked while sneaking
2020-11-03 22:56:20 +00:00
142102a054
ItemFactory: remap bucket:9 and bucket:11 to their appropriate counterparts
2020-11-03 19:44:57 +00:00
518a7827a6
BlockFactory: make slab registration slightly less awful to look at
2020-11-03 19:28:32 +00:00
32929925aa
Block: added a bunch of state manipulation APIs
2020-11-03 19:13:32 +00:00
0a8dc3edd3
Fixed users of ColorInMetadataTrait having uninitialized default colours
2020-11-03 18:42:40 +00:00
bcedbc364b
BlockDataSerializer: added methods to read/write coral facing
2020-11-03 18:41:12 +00:00
c3af0eff93
travis: use pmmp/leveldb
2020-11-03 17:56:15 +00:00
5c5fe15483
tests: remove unused script
2020-11-03 14:42:29 +00:00
a05f67bc77
Position::fromObject() world parameter is now mandatory (although still nullable)
2020-11-03 14:33:26 +00:00
5cc2a9c3dd
World: rename getChunkAtPosition() to getOrLoadChunkAtPosition()
...
this more accurately reflects what it does.
2020-11-03 14:12:47 +00:00
bd78d0bff8
Player: added getItemCooldownExpiry()
2020-11-03 14:11:28 +00:00
2e9b2d4aae
World: fixed false unload events firing on chunk replacement when tiles and entities are deleted
2020-11-01 17:41:58 +00:00
61112e4912
World: make create params of loadChunk and getOrLoadChunk mandatory
...
differences in the default values almost caused me to miss some bugs while trying to remove them.
2020-11-01 17:36:56 +00:00
0bb37b5065
World: formalize setBlockAt()'s refusal to modify un-generated chunks
...
closes #2631
2020-11-01 17:24:09 +00:00
b7690fed04
BiomeSelector: replace phpdoc with typehints
2020-11-01 17:09:10 +00:00
12e185e3f6
Relocate EntityLegacyIds to pocketmine\data\bedrock package
2020-11-01 17:07:34 +00:00
1f2bc8cb69
World: remove rogue import
2020-11-01 17:05:57 +00:00
0ae17af1e0
BiomeRegistry: fixed EOF newline
2020-11-01 16:53:42 +00:00
4231bfdc7e
Relocate biome ID constants to pocketmine\data\bedrock package
2020-11-01 16:53:06 +00:00
b176f4c12f
Switch to BiomeRegistry
...
I accidentally committed this in c869a7f099 and didn't notice. I intended to use it and never noticed.
2020-11-01 16:47:13 +00:00
f991961d9a
Generator no longer requires a ChunkManager to construct
...
this allows injection of arbitrary ChunkManagers into a single Generator instance.
The objective here was to remove the requirement to cache a SimpleChunkManager instance in worker-local storage, because that requires that the chunks it stores be manually removed to avoid memory leaks. However, there are some other obstacles, primarily the worldHeight which is not retained anywhere else.
2020-11-01 16:34:56 +00:00
315962c12c
Added __clone() for Chunk and SubChunk
...
we need this because the flatworld generator uses clone to produce new chunks, so we don't want the chunks getting fucked up.
2020-11-01 16:14:25 +00:00
1d551af54a
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/Level.php
# src/pocketmine/level/format/Chunk.php
# tests/phpstan/configs/l7-baseline.neon
2020-11-01 15:58:16 +00:00
2684ee96f7
World: do not perform base lighting calculation on non-generated chunks
...
this was causing twice as many light calculations for freshly generated chunks.
2020-11-01 15:53:50 +00:00
ef542880de
WorldManager: allow different World instances to have different AsyncPool instances
...
instead of being forced to use the Server async pool
right now the intent of this is to reduce (and ultimately eliminate) the dependency of World on Server, but it might come in useful for other stuff too, for example a chunkserver-based generator implementation which blocks on network instead of eating CPU (it would just waste CPU for other tasks).
2020-11-01 15:21:15 +00:00
11434f3a27
World::setBiomeId() now bails when trying to modify a non-generated chunk (or chunk locked for generation)
2020-11-01 15:00:48 +00:00
3e21e47b7a
Liquid: make getFlowVector() slightly less cancerous to read
2020-11-01 14:39:59 +00:00
19bc879dc1
lose useless blank line
2020-11-01 14:24:02 +00:00
be1da07ee5
tests: phpdoc cleanup
2020-11-01 14:23:44 +00:00
d6d9dde0b2
imports cleanup
2020-11-01 14:23:21 +00:00
73a8c90bee
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# src/world/Explosion.php
# tests/phpunit/item/ItemTest.php
# tests/phpunit/world/format/io/region/RegionLoaderTest.php
# tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php
# tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php
2020-11-01 14:21:47 +00:00
c312c8ddd6
fix build
2020-11-01 00:11:41 +00:00
c1a451f3b1
SubChunkExplorer: ditch subChunkChangeFunc
...
this is better implemented by checking the moveTo() result, which also won't have circular dependencies.
2020-10-31 23:46:27 +00:00
817372c55b
SkyLightUpdate: make heightmap calculation routines pure
2020-10-31 23:42:32 +00:00
c39a1407a2
Move heightmap calculation logic to SkyLightUpdate
2020-10-31 23:34:04 +00:00
59a3e8c096
BiomeArray: added ::fill()
2020-10-31 23:22:42 +00:00
05470d0621
phpstan: regenerate level 8 baseline (again)
2020-10-31 23:17:03 +00:00
4549522289
Rename Chunk::getSubChunkChecked() -> getSubChunk()
2020-10-31 23:12:03 +00:00
e09d78238f
Removed EmptySubChunk and SubChunkInterface
2020-10-31 23:10:31 +00:00
13d7b7ee1a
Removed final remaining usages of Chunk::getSubChunk()
...
this clears the way to get rid of EmptySubChunk.
2020-10-31 23:07:36 +00:00
f50be1ba63
Chunk: Use getSubChunkChecked() in getFullBlock()
2020-10-31 23:06:12 +00:00
bacfcf258e
World: remove unused function
2020-10-31 23:00:27 +00:00
8ee70dc30a
SimpleChunkManager: fix missing mask in getBlockAt()
2020-10-31 22:55:56 +00:00
40f9cd16cb
phpstan: drop a bunch of obsolete ignoredErrors from l8 baseline
2020-10-31 22:52:00 +00:00
d94877f5d2
fix build
2020-10-31 22:51:24 +00:00
01001dca74
Use Chunk::getSubChunkChecked() in places where we know that an invalid coordinate cannot be requested
2020-10-31 22:48:41 +00:00
b270029161
Rename Chunk::getWritableSubChunk() -> Chunk::getSubChunkChecked()
...
this is not specific to 'writable', it's just an opt-in to checked bounds so that an EmptySubChunk will never be received.
2020-10-31 22:46:33 +00:00
5701e733cc
World: fixed a crash in getFullBlock() when used on ungenerated terrain
2020-10-31 22:36:12 +00:00
f5807ac049
World::getBlockAt() now doesn't assume that AIR has a fullStateId of 0
2020-10-31 22:22:02 +00:00
d0470a80ab
SimpleChunkManager: remove post-mature optimisation
...
these methods are not used in hot paths and are inherently slow anyway, not to mention the introduction of morton codes eliminating the hashtable indexing problem.
2020-10-31 22:02:36 +00:00
ddda2d1e64
Remove $create parameter from ChunkManager::getChunk()
...
this restores SimpleChunkManager's behaviour to PM3, removing the need for GeneratorChunkManager (although I'm dubious whether SubChunkExplorer makes any sense in there any more now that we have morton in the mix).
2020-10-31 21:54:51 +00:00
dec235abab
World: don't create a new chunk just to read biome info
...
the chunk won't be generated, so we can provide the default result without creating a new chunk for no reason.
2020-10-31 21:29:39 +00:00
de867f1b86
World: don't create an empty chunk just for accessing the highest block
...
this is pointless since the chunk will not be generated anyway, so it serves no end to create it.
2020-10-31 21:27:16 +00:00
f0d62cf4ce
World: don't try to load chunks to read light levels
...
sync chunk load is useless here because lighting isn't immediately calculated anyway and it isn't available directly from the chunk when loaded.
2020-10-31 20:38:15 +00:00
68f5eada32
added fire extinguishing sound, closes #2777
2020-10-31 20:18:06 +00:00
f67ab094f2
fix build
2020-10-31 16:51:14 +00:00
5f7b0994b9
World: rename get(HighestAdjacent)BlockSkyLight(At) to make it clear these are **potentials**, not the actual light level
2020-10-31 16:47:34 +00:00
241a50387b
World: added getHighestAdjacentRealBlockSkyLight()
...
this is the same as its 'non-real' counterpart, but it accounts for time of day.
2020-10-31 16:44:42 +00:00
0b92e96e14
Player: set silent flag in spectator
2020-10-31 16:10:02 +00:00
8be0c0da0d
Implemented a silent property on entities and Entity->broadcastSound()
...
fixes #3516
2020-10-31 16:07:18 +00:00
66edf5a165
Particle::encode() now always returns ClientboundPacket[]
2020-10-31 15:51:17 +00:00
5a320f22b7
Sound::encode() now always returns an array
2020-10-31 15:48:46 +00:00
0cbc5c9a4a
region: harden handling of ByteArrayTag
...
previously this would just explode if the wrong length of data was given.
2020-10-31 15:37:06 +00:00
058bb3a91a
World: do not execute neighbour block updates on unloaded chunks
...
we might also need to delay this if any adjacent chunk is also not loaded, in case the block wants to access adjacent blocks during its neighbour update.
2020-10-29 13:37:14 +00:00
cfb9cc8999
fix build failure
2020-10-29 13:22:35 +00:00
b079772d32
World: do not include unloaded or unlit chunks in getHighestAdjacentBlock(Sky)Light()
2020-10-29 13:05:25 +00:00
3c892182fd
World: change some usages of getOrLoadChunk() to getChunk()
...
these usages don't require getOrLoadChunk() because they already check for unloaded chunks anyway.
2020-10-29 12:57:33 +00:00
092a69e415
update phpstan baseline
2020-10-29 12:18:29 +00:00
3e1263eb79
Chunk: remove all proxy APIs to lighting information
...
these aren't used by internals and they shouldn't be used by plugins either.
2020-10-29 12:11:06 +00:00
ddc0f137e7
changelog: VanillaEffects -> VanillaEnchantments ( #3884 ) [ci skip]
2020-10-27 21:51:55 +00:00
587a4c0095
non-exhaustive updates to changelog [ci skip]
2020-10-27 19:35:03 +00:00
797e0996f4
PopulationTask: Do not include light when serializing chunks (either way)
...
non-populated chunks shouldn't be light-populated anyway, but in some cases they are (bug or plugin interference).
chunks which were already populated might get modified by adjacent chunk populations, which should invalidate their lighting because generation doesn't track which blocks were changed, so the whole chunk should be recalculated.
2020-10-27 18:42:30 +00:00
1859dac789
Implemented self-contained (pass 1) chunk relighting
...
this doesn't handle propagating light across chunk borders yet, since that's much more complex to implement.
2020-10-27 18:29:32 +00:00
014317381f
Sugarcane: deduplicate growth code
...
this also fixes sugarcane attempting to grow past the top of the world (closes #3883 ).
2020-10-27 18:05:41 +00:00
0ecd68e4a7
LightUpdate: remove premature optimisation which breaks when mass-update lighting is used
...
when setBlockSkyLightArray/setBlockLightArray was used, currentLightArray would retain a reference to the old light array, which would cause false readings if SubChunkExplorer didn't move away from that subchunk and back.
This causes a small degradation of performance, but I think it can be implemented differently anyway.
This also fixes #3816 .
2020-10-27 18:01:31 +00:00
05ab75b5ce
PopulationTask: do not calculate lighting for chunks
...
we do this ondemand now, which means this is just wasting CPU for the vast majority of generated chunks.
2020-10-27 17:03:57 +00:00
31c2c3abb5
SubChunkExplorer::moveTo() now returns a status
...
this can be used by SubChunkExplorer subclasses to implement specialized logic.
2020-10-26 16:25:21 +00:00
390bc631c8
SubChunk: added moveToChunk()
2020-10-26 16:04:31 +00:00
8bab9cc108
RegionWorldProvider: use morton2d directly instead of abusing chunkHash()
...
while these currently do the same thing, it's very confusing and creates an unnecessary dependency on World.
2020-10-26 15:34:32 +00:00
d6ed542fcd
Merge remote-tracking branch 'origin/stable' into master
...
# Conflicts:
# composer.json
# composer.lock
# src/CrashDump.php
# src/pocketmine/Server.php
# src/pocketmine/level/format/io/region/McRegion.php
# tests/phpstan/configs/check-explicit-mixed-baseline.neon
# tests/phpstan/configs/l7-baseline.neon
# tests/phpstan/configs/l8-baseline.neon
# tests/travis/setup-php.yml
2020-10-26 16:18:53 +00:00
4c0c2ebd24
CS cleanup
2020-10-26 15:56:30 +00:00
3f254bd49c
Separated effects' MCPE ID registration from VanillaEffects
2020-10-24 18:52:20 +01:00
cf7f50af06
Fixed test failure
2020-10-24 18:25:42 +01:00
c5b925a213
Moved EnchantmentIds to pocketmine/data/bedrock package
2020-10-24 18:24:39 +01:00
f3f7ff9237
Enchantment internal IDs are now dynamic
2020-10-24 18:21:31 +01:00
47976bac34
Moved enchantment ID handling to pocketmine/data/bedrock package
...
this permits plugins to register their own enchantments mapped to MCPE IDs again.
2020-10-24 17:59:46 +01:00
2e1239f77a
EnchantCommand no longer accepts numeric enchantment IDs
2020-10-24 17:33:17 +01:00
3b632a8deb
Handle InvalidArgumentException thrown by VanillaEnchantments::fromString ( #3878 )
2020-10-24 06:43:14 +01:00
9947e13121
Yank constants out of Enchantment base class
2020-10-23 21:04:27 +01:00
a01c086481
Introduced VanillaEnchantments registry
2020-10-23 20:48:19 +01:00
e9038336e3
EventPriority: hardcode name -> value mapping instead of using constant()
...
this would have caught fire if additional non-priority constants were added, or if the constants were renamed.
2020-10-23 20:14:37 +01:00
f5e033ad5d
AsyncPool: fixed stable merge error
2020-10-23 13:25:52 +01:00
23e5ade77e
Merge branch 'stable' into master
...
# Conflicts:
# build/make-release.php
# composer.lock
# resources/vanilla
# src/plugin/PluginDescription.php
# src/pocketmine/entity/Human.php
2020-10-21 16:55:52 +01:00
286ac2a975
Rework World::blockHash() to use morton3d
...
this uses the unused bits on the Y component to expand the X/Z axes to 2^27 blocks long instead of 2^21 permitted by a regular morton3d code. It does require the sacrifice of an additional bit on the Y axis, but the performance advantages are more than worth it.
I'm exploring how realistic it would be to just eliminate blockHash global usage (currently in lighting updates and explosions). This would allow scaling up to 2^32 without larger hashes (morton2d for chunks).
2020-10-20 20:31:10 +01:00
4684333dee
Updated build/php to pmmp/php-build-scripts@eee477802a
2020-10-18 20:14:08 +01:00
9a282e2646
Noise: Improve fastNoise3D performance by ~25-30%
2020-10-17 20:03:19 +01:00
095449e86a
Normal (generator): micro optimisations (and readability improvements)
2020-10-17 19:24:01 +01:00
0f9d5f7011
ext-morton is now required and used for World::chunkHash() and World::chunkBlockHash()
2020-10-17 16:09:30 +01:00
2d839db47e
fixed build failure
2020-10-17 16:05:38 +01:00
de6d260b76
Fixed cactus and sugarcane trying to grow past the top of the world
2020-10-17 15:05:55 +01:00
d38791e27d
Listener: Drop support for @softDepend annotation
...
literally nobody uses this. I don't think anyone even knows it exists.
It's also an obstacle to separating event handler registration from PluginManager.
2020-10-16 21:10:57 +01:00
792f38f474
Carpet and Wool now have dynamic colours
2020-10-15 14:45:28 +01:00
0ef0848c44
Concrete and ConcretePowder colour is now dynamic
2020-10-15 14:30:07 +01:00
3aca03d262
Player: clean up refs when forced chunk unload is detected
...
this might happen because of a plugin, or low memory condition.
2020-10-13 18:17:12 +01:00
cc91cbd8c5
Updated build/php submodule to pmmp/php-build-scripts@bc8e1cf001
2020-10-13 17:53:31 +01:00
e8ec65766c
Updated resources/locale to pmmp/Language@884a0496c3
2020-10-13 17:52:47 +01:00
44e446b621
Merge remote-tracking branch 'origin/stable' into master
...
# Conflicts:
# build/php
# composer.lock
# phpstan.neon.dist
# resources/vanilla
# src/pocketmine/Server.php
# src/pocketmine/VersionInfo.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/lang/locale
# src/utils/Timezone.php
# tests/phpstan/bootstrap.php
# tests/phpstan/configs/custom-leveldb.neon
2020-10-13 17:51:49 +01:00
aa00bd5e31
Updated phpstan to 0.12.49
2020-10-13 17:39:24 +01:00
0186468e47
updated composer dependencies
2020-10-13 17:38:06 +01:00
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
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
ca9f3020b4
World: added private broadcastPacketToPlayersUsingChunk()
...
this is equivalent to the old addChunkPacket, but private and with a less stupid name.
2020-10-11 15:21:15 +01:00
a05b1fec7e
World: rename chunkPackets -> packetBuffersByChunk
2020-10-11 15:18:57 +01:00
bd3bf3d0ce
Revert "World: do not group broadcasted packets by chunk, broadcast directly instead"
...
This reverts commit b172c93e45 .
I made a significant mistake with this change: the scaling factor of
batch-by-chunk is O(nSendBytes), while the scaling factor of sending
directly to players is O(nSendBytes * nActivePlayers). It seems like the
real problem is that this system isn't getting enough usage.
While it does reduce compression efficiency in some cases, it falls back
to letting the sessions do individual compression when the amount of
data is less than 256 bytes anyway (compression-threshold in
pocketmine.yml).
My motivation for scrapping this system was to reduce the broadcast
system's complexity to make it easier to thread the living shit out of
compression, but it seems like this change was a step in the wrong
direction for performance.
A few steps can be taken to improve the usefulness of this system (and
also improve output bandwidth):
- Make general entity updates use this system. Movement and velocity
already kinda used this system, but crucially, players did not,
because we couldn't prevent the player from receiving its own movement
updates if we did that, which caused all kinds of problems.
- Therefore, we need to reintroduce static "self" entity IDs, like we
had in the shoghi days when entity ID 0 referred to the "self"
player.
- However, since entity ID 0 has a variety of interesting bugs since
it usually refers to "no entity" in MCPE, it would be better to use
1 (or 2, like MiNET does).
- The fixed ID used should be close to zero to maximize varint
encoding efficiency.
- We assumed that changes to player's position and velocity would be
ignored by the client. This assumption depends on the client and
could be broken at any time, so it's best not to rely on it.
- Make block updates use this system (when chunk updates are not sent).
Currently, block updates use a separate mechanism which creates a
second batch for every active chunk, which wastes CPU, and decreases
bandwidth efficiency on multiple fronts (reduced compression
efficiency, more cross-thread interactions, more bytes wasted on
RakNet packet headers).
2020-10-11 14:55:54 +01:00
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
46c57e4e24
TimingsCommand: fixed crash on result handling
...
since AsyncTask->getResult() returns mixed, phpstan has no idea what is being returned here, so it doesn't report any errors.
2020-10-11 11:35:03 +01:00
e11dbf03e2
Process: apply native typehint to kill()
2020-10-09 18:06:33 +01:00
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
15cd354b98
fixed phpstan run again
2020-10-08 21:58:22 +01:00
a91710b199
Fixed player knockback not working since 531c6344fe
...
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
15a2fd6e4f
LegacySkinAdapter: check return value of json_encode() for resource patch
2020-10-08 21:42:07 +01:00
b0b08d45d5
Entity: clean up sendData() handling, remove send-to-self hack
2020-10-08 21:35:36 +01:00
01b44ab0bc
protocol: moved skin data types to their own namespace
2020-10-08 21:20:57 +01:00
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
df7bafe2bc
TileFactory: fixed missing Beacon tile registration
...
I had this locally but forgot to commit it ...
2020-10-07 15:16:27 +01:00
cbc6ebebad
Entity: make use of MoveActorAbsolutePacket::create()
2020-10-06 18:35:02 +01:00
d8ee657d20
MoveActorAbsolutePacket: added ::create() method
2020-10-06 18:34:38 +01:00
69cad3e694
InGamePacketHandler: Ignore LevelSoundEventPacket completely
2020-10-06 18:26:57 +01:00
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
d7f7e1c4ff
InventoryManager: remove useless repeated code
2020-10-06 18:14:46 +01:00
cc3947058a
updated phpstan baseline
2020-10-06 18:11:13 +01:00
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
945a2598b7
Player: fix documented type of kick $quitMessage
2020-10-06 17:55:32 +01:00
49d611168f
Player: fix documented type of disconnect $quitMessage
2020-10-06 17:54:44 +01:00
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
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
e39d2c4621
Beacon: fixed crash in PC worlds
2020-10-06 13:40:49 +01:00
dfee8b7fa5
Added SignLikeRotationTrait
2020-10-04 21:09:45 +01:00
fc1084d65c
Sponge: fixed wet/dry state not persisting in inventory
2020-10-04 19:42:29 +01:00
309d23acfb
regenerated blockfactory consistency check
2020-10-04 19:12:36 +01:00
6fb45de405
fixed phpstan baseline
2020-10-04 19:12:04 +01:00
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
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
c42a6d7552
ItemBlock no longer depends on legacy ID/metadata
2020-10-04 18:27:20 +01:00
7ef794d725
imports cleanup
2020-10-04 18:22:07 +01:00
d3a3a41d2b
Revert back to separated floor/wall sign
...
the conditionally useless properties are problematic.
2020-10-04 17:52:23 +01:00
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
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
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
d0213f99ac
MountainsBiome: fix error from stale PR merge
2020-10-02 12:24:18 +01:00
a77970448e
Emerald ore in Mountains biome ( #3750 )
2020-10-02 12:07:49 +01:00
e17629244c
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp into master
2020-10-02 01:00:21 +01:00
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
6734dcc79f
Introduce PlayerDisplayNameChangeEvent (listen only) ( #3847 )
2020-10-01 22:23:02 +01:00
7a436dc47c
updated blockfactory consistency check
2020-10-01 22:10:02 +01:00
4492c80af1
Merge remote-tracking branch 'origin/stable' into master
...
# Conflicts:
# composer.lock
# resources/vanilla
2020-10-01 22:08:27 +01:00
201bdc069c
phpstan 0.12.47
2020-10-01 22:07:43 +01:00
84feec954f
BlockLegacyMetadata: Added constants for mushroom block variants
2020-10-01 21:41:46 +01:00
14c156b162
Added ChemicalHeat block stub
2020-10-01 14:46:14 +01:00
12087c9850
Wall: use facing as value as well as key in connections
2020-09-26 17:41:00 +01:00
9e3ff21aea
Wall: remove unused import
2020-09-26 17:26:54 +01:00
ec7c5fd669
Added a BrewingStandSlot enum
2020-09-26 17:20:02 +01:00
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
b8e1bdbed4
MemoryManager: Look inside Closure objects to resolve dependencies
...
the lack of closure analysis allowed several memory leaks to be unable to be debugged using memory dumps.
2020-09-26 15:11:47 +01:00
7b02cc3efd
Implemented #3836 : Replace setCancelled() in events with cancel() and uncancel()
...
The motivation for this is to prevent passing a dynamic argument to cancellation, which in almost all cases is a bug in user code. This same mistake also appears in a few places in the PM core (as seen in this commit), but in those cases the mistakes were mostly harmless since they were taking place before the event was actually called.
closes #3836
2020-09-26 14:31:56 +01:00
75e3a0aa0f
Merge branch 'stable' into master
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/command/defaults/StatusCommand.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/level/format/SubChunk.php
2020-09-26 13:27:08 +01:00
05a94f35d6
Updated composer dependencies
2020-09-26 13:17:54 +01:00
89cce4c749
performance: only calculate light for chunks inside ticking areas
...
this produces a major performance improvement for large render distances, and reduces the impact of lighting calculation to zero on servers which have random blockupdates turned off.
2020-09-26 13:13:12 +01:00
b727972c76
World: remove useless isLightPopulated() check
...
chunks are never light populated when loaded from disk now.
2020-09-26 12:52:28 +01:00
626680c6c1
Use new Location objects instead of mutating Entity->location directly
...
I'm actually not a big fan of needing to recreate the whole thing just to modify the coordinates. This seems kind of stupid.
2020-09-25 18:43:49 +01:00
db7fb25196
Avoid more Vector3 mutations using withComponents()
2020-09-25 18:40:13 +01:00
1d8e7abdd4
Entity: avoid direct mutation of Vector3 in checkObstruction(), use withComponents() instead
...
this ugly code can be simplified quite a lot further, but that's a job for later.
2020-09-25 18:38:41 +01:00
25566c2f1a
Entity: avoid direct Vector3 mutations in tryChangeMovement()
2020-09-25 18:37:29 +01:00
9dda99f844
Updated composer dependencies
2020-09-25 18:36:45 +01:00
38b97dd0b7
Entity: remove useless function
2020-09-25 18:11:24 +01:00
3b4e9eea96
RuntimeBlockMapping: drop useless doc comment
2020-09-25 17:43:00 +01:00
7c192f85e2
protocol: remove final remaining Vector3 mutations
...
this really should be replaced with a network layer BlockPos structure in the absence of a general int-vector structure in math.
2020-09-25 17:41:12 +01:00
a5e21bfaa9
Entity: protect getBlocksAroundWithEntityInsideActions()
2020-09-25 16:40:30 +01:00
3556f26e00
Entity: Rename getBlocksAround() -> getBlocksAroundWithEntityInsideActions()
...
this name is more long-winded, but much less misleading.
2020-09-25 16:39:55 +01:00
8e12693494
Entity: Invalid blocksAround cache when something happens during onEntityInside()
...
this fixes TNT spawning multiple entities when lit by flaming arrows.
The problem here is a bit more complex (entities aren't immediately notified when local block updates happen, so they cache stuff that becomes unusable). The simplest option would be to just lose the cache, but that would have some impacts on performance.
Barring a rethink of the block updating mechanism, this solution seems usable for now.
2020-09-25 16:35:59 +01:00
ae9e931849
LightPopulationTask: Simplify check for chunk loading in onCompletion()
...
we have no business loading chunks here either, although the isChunkLoaded() check should prevent that from happening.
2020-09-20 13:44:02 +01:00
b252c18d34
World: Loading chunks to sync block updates is a bug
...
again, this should never happen, because chunk unloading cleans this stuff out. But if it did happen, loading chunks is not the way to take care of it.
2020-09-20 13:42:27 +01:00
b7471fc77b
Player: Loading chunks to spawn entities is a bug
...
again, this would never happen except in bug circumstances, but if there was a bug, it should crash instead of trying to load chunks to paper over it.
2020-09-20 13:40:44 +01:00
7f43164776
Player: Loading chunks during unloading chunks is a BIG nope
...
this should never happen, but it could have happened if there was a bug in the code for some reason.
Readers note: I know this looks lik I'm undoing the changes I just did, but what really happened is a name change.
2020-09-20 13:39:31 +01:00
716de4d9d6
ChunkCache: we have no business autoloading chunks during sending
...
if the chunk isn't loaded, this is a bug and it should crash.
2020-09-20 13:32:54 +01:00
5096741b29
World::getChunk() behaviour now matches that of a regular ChunkManager
...
Various bugs existed for a while with stuff using chunk managers instead of worlds when interacting with terrain due to a behavioural inconsistency between World::getChunk() (return from cache or load from disk), and SimpleChunkManager::getChunk() (return from cache only). This change brings the two in line.
World::getOrLoadChunk() has been added as a replacement, which has the same behaviour as the old getChunk() and also makes it more obvious that there is an issue with code using it during refactoring.
2020-09-20 13:29:09 +01:00
c9d2edcb4d
Rename SubChunkIteratorManager -> SubChunkExplorer
2020-09-20 12:47:44 +01:00
4879df626d
Reduced LightUpdate dependency on ChunkManager to indirect
...
this opens the gateway for alternative SubChunkIteratorManager implementations which don't use ChunkManager at all.
2020-09-20 12:41:53 +01:00
5661d0496f
RuntimeBlockMapping::toRuntimeId() now accepts a single integer instead of id/meta
...
the expectation is that eventually this will receive arbitrary internal runtime IDs instead of static id/meta, and RuntimeBlockMapping doesn't really care about this crap anyway.
2020-09-20 12:16:11 +01:00
42b184c113
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp into master
2020-09-20 12:01:40 +01:00
2281df8c97
Updated build/php submodule to pmmp/php-build-scripts@0eb28b8b66
2020-09-20 12:01:24 +01:00
9d0ac297bb
Improved documentation for CancellableTrait
2020-09-10 16:49:20 +08:00
c20ac82fe6
LightUpdate: Move propagation-specific state to a separate unit
...
this solves multiple architectural issues:
- improves reusability by avoiding having old state info stick around to fuck stuff up
- prevents access to propagation state from outside of propagation
this also reduces the latent memory usage of light-updates after they have been used.
TODO: we could probably change LightPropagationContext to LightPropagator and move all the propagation-specific code into it if we can solve the subchunk-iterator and effective light problems.
2020-09-09 01:06:09 +01:00
bde24d9279
LightUpdate: remove unused field
2020-09-08 23:14:10 +01:00
03de2bcc67
Chunk: simplify heightmap calculation
2020-09-08 23:03:52 +01:00
c7070788f9
Rename and repurpose Block->diffusesSkyLight to blocksDirectSkyLight
...
this new form allows skipping some useless checks during sky light calculation and also allows getting rid of the last hard dependency on core Block classes.
We're getting real close to native light now.
2020-09-08 22:40:05 +01:00
773069d1cc
fix travis build
2020-09-08 21:09:39 +01:00
ec6ac59b9c
BlockLightUpdate: actually use lightEmitters
...
I accidentally added this during a separation of my local changes, but it's useful anyway, so we should use it.
This removes BlockLightUpdate's implicit dependency on Block, which is a
step towards native light.
2020-09-08 18:21:03 +01:00
205617f29e
Untether LightUpdate and children from BlockFactory
2020-09-08 18:14:35 +01:00
0fd3d91038
LightArray: hide constants ZERO and FIFTEEN from the API
...
this makes it easier to implement this in C++ with the same API. Since the C++ version doesn't use strings, these constants aren't needed anyway.
2020-09-08 15:13:58 +01:00
01f8116cdd
Fix some of the implicit immutability issues of EmptySubChunk
...
it's useful to have an immutable stub around for the sake of feeding back dummy read values, but for write values it has to barf instead of being quiet.
There's still some issues with LightArray which I don't currently have a solution for, but I'm thinking about separating light storage from chunks anyway.
2020-09-07 14:43:26 +01:00
5fbc842f7a
LightArray: do not accept NULL in the constructor
...
it makes more sense to pass LightArray::ZERO or just use LightArray::fill(0) if a zeroed light array is desired.
2020-09-06 16:18:47 +01:00
be0cec531a
ResourcePackInfoEntry: remove useless null coalesce operators
...
these fields are never null.
these errors aren't reported unless bleeding-edge is enabled.
2020-09-06 16:13:41 +01:00
fb4b92d1f4
HandlerListManager: fixed missing null type flag
2020-09-06 16:12:54 +01:00
f45316d2d6
Leaves: fixed phpstan type doc error
...
for some reason this isn't reported unless bleeding edge is enabled.
2020-09-06 16:12:24 +01:00
94d8f59484
LightUpdate::execute() now returns the number of visits made to blocks in total
...
this is useful for performance profiling.
2020-09-05 22:25:42 +01:00
15299735e9
Do not create chunks during light propagation/removal
...
this used to be necessary to trigger subchunk creation so that light arrays would be available for use. With 02ff8d671b , this is no longer necessary.
2020-09-05 22:22:19 +01:00
6054104ecb
drop a few more useless static variables
...
phpstan is better able to understand constant literals, since it knows their types will never change.
2020-09-05 18:43:22 +01:00
b96565faa4
Drop some obviously useless static function variables
...
these are better suited as constant literals.
2020-09-05 18:39:47 +01:00
6b6f77f8af
Chunk: improved heightmap calculation performance
...
recalculateHeightMapColumn is stateless, so it can't make any assumptions about which subchunks to check for blocks. However, in most the average case (6 allocated subchunks), this causes 2500+ useless SubChunk->getHighestBlockAt() calls (10 per column). Since we're calculating in bulk, we can figure out which subchunks are empty one time and ignore them for all 256 columns.
In the average case, this produced a 50-60% performance improvement for heightmap calculation (~1.1 ms -> 0.5 ms).
In extreme cases where the height is extremely varied, this produces no observable performance benefit, but for most cases with flattish terrain, it's an improvement.
It can likely be further improved, but further performance improvements are outside the scope of this commit and will likely result in more complexity increases.
2020-09-05 00:16:07 +01:00
e1816bd415
SubChunkInterface: clarify documentation of isEmptyFast()
2020-09-04 22:10:42 +01:00
2e45398072
World: skip random block ticking on chunks that don't have any light
...
typically this is a state that only lasts for a tick or so, but it's a race condition that is regardless very commonly encountered.
If you were very unlucky, you might have noticed grass randomly dying when you were spawning or flying around, even though it was in full sky light.
2020-09-04 18:08:42 +01:00
a68b0b1f93
LightArray: make collectGarbage() more preload-friendly
...
opcache preloading doesn't store non-class constants, but it does store class constants. Class constants that reference non-class constants are pre-resolved into values before storing in opcache SHM, so class constants are OK to use, but non-class constants will come back as undefined.
2020-09-04 17:23:23 +01:00
b81cc671e9
Major performance improvement to basic sky light calculation
...
this was degraded whenever it was I decided to make chunks always be allocated. This commit uses a fast path for light filling in subchunks which are completely clear of the heightmap, which returns the performance back to its old fast levels.
2020-09-04 15:51:33 +01:00
101dc1e1d7
fixed a couple of new phpstan errors
2020-09-04 01:44:21 +01:00
0aee39027e
Merge branch 'stable' into master
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/entity/Living.php
# src/pocketmine/Player.php
# src/pocketmine/VersionInfo.php
# src/pocketmine/block/Potato.php
# src/pocketmine/block/Sugarcane.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/Chunk.php
# src/pocketmine/level/format/io/leveldb/LevelDB.php
# src/world/generator/GeneratorRegisterTask.php
# tests/phpstan/configs/check-explicit-mixed-baseline.neon
# tests/phpstan/configs/l7-baseline.neon
# tests/phpstan/configs/l8-baseline.neon
# tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php
# tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php
# tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskPublishProgressRaceTest.php
2020-09-04 01:43:52 +01:00
5a80f6e201
Updated build/php submodule to pmmp/php-build-scripts@d88132ee55
2020-09-04 01:07:32 +01:00
e87760c218
composer: do not install packages with min version higher than 7.3.0
...
running composer update on 7.4 will generate a lock file using the newest dependencies which work for the current PHP version, which usually isn't desirable for a project like this where developers might be using newer PHP versions than users.
2020-09-04 01:05:48 +01:00
a9871a6c1a
Merge branch 'stable' into master
...
# Conflicts:
# composer.json
# composer.lock
# resources/vanilla
2020-08-21 22:14:49 +01:00
220c6dd41b
Updated composer dependencies
2020-08-21 22:13:46 +01:00
4ed59ea43f
updated DevTools submodule to pmmp/DevTools@75c2774cc7
2020-08-21 21:46:28 +01:00
3042c74aa5
Merge branch 'stable' into master
2020-08-21 21:41:29 +01:00
ebd20f997d
Merge commit 'e80ad22702f87f4a006ab16af3b46baae0490856' into master
...
# Conflicts:
# build/php
# resources/vanilla
# src/pocketmine/Player.php
# tests/plugins/DevTools
2020-08-21 21:39:17 +01:00
1ed36573a1
BlockLegacyMetadata: added some coral constants
2020-08-21 17:46:44 +01:00
ddc5694b70
remove file accidentally committed in 0b05fd1987
2020-08-17 20:25:30 +01:00
40d49b88dd
EntityFactory: remove requirement for $className as return type on creation funcs
...
since the removal of EntityFactory::create() this isn't needed anymore, since these creation functions are only used for creating entities loaded from disk.
2020-08-17 13:20:34 +01:00
bf401421fa
Implemented bamboo ( #3762 )
2020-08-16 20:39:51 +01:00
62394811e3
Merge branch 'stable' into master
...
# Conflicts:
# resources/vanilla
# src/world/Explosion.php
2020-08-16 01:00:04 +01:00
0506905875
clean up unused imports
2020-08-16 00:58:55 +01:00
a35ca1fa71
Merge branch 'stable' into master
2020-08-15 20:32:14 +01:00
ec1adb5886
Updated build/php submodule to pmmp/php-build-scripts@7a0fbfa9bb
2020-08-15 20:24:12 +01:00
93fdc1cb96
Updated composer dependencies
2020-08-15 20:23:42 +01:00
6920deac2c
BlockFactory: regenerated TODO lists
2020-08-15 19:47:38 +01:00
98db4c5200
Merge branch 'stable' into master
...
# Conflicts:
# .gitmodules
# composer.lock
# resources/vanilla
# src/network/mcpe/protocol/PlayerAuthInputPacket.php
# src/pocketmine/Player.php
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
2020-08-10 17:55:49 +01:00
192e31a397
Move code & docblock generation methods out of RegistryTrait
...
this allows generating a docblock / code for a registry without the class needing to exist or be populated yet, which makes code generation significantly less cumbersome.
2020-08-07 21:43:19 +01:00
ff2a3baa8e
Implemented Jukebox & Records ( #3742 )
...
Co-authored-by: Dylan K. Taylor <odigiman@gmail.com >
2020-08-07 21:07:58 +01:00
2545897fc2
HorizontalFacingTrait: use a cheaper check for horizontal facing
2020-08-06 14:53:51 +01:00
2b044195a5
Update for pocketmine/math Axis refactor
2020-08-06 14:38:54 +01:00
7399e6944e
Consistent fluency for block property setters
2020-08-06 13:46:08 +01:00
3d4470ed8d
added nether quartz ore to nether generation
2020-08-06 13:23:03 +01:00
7bcfece11e
Flat: use block names instead of legacy block IDs for hardcoded preset
2020-08-06 12:58:49 +01:00
de9856151a
Flat: remove useless field
2020-08-06 12:58:08 +01:00
aa682a865e
Allow injecting arbitrary preimage block for ore generation
...
this will be useful for nether ore generation.
2020-08-06 12:46:07 +01:00
b725fcbdf2
IPlayer: remove circular dependency on Player
...
and remove useless Player->getPlayer()
2020-08-05 22:01:41 +01:00
56ae3d01da
block: added HorizontalFacingTrait and AnyFacingTrait
...
these are primarily intended for deduplication of code and ability to cross-reference. Don't expect this API to remain the same.
2020-08-05 21:17:37 +01:00
060c300d50
Bed::setOccupied() no longer sets itself into the world
...
setting itself into the world is very annoying when trying to simply set up a blockstate.
2020-08-05 20:59:59 +01:00
764f92c456
BlockLegacyIdHelper: fixed a mistake in exception message
2020-08-03 23:59:06 +01:00
35e8fd01ff
phpstan: drop some obsolete level 8 baseline errors
2020-08-03 20:22:09 +01:00
abbc2b9494
phpstan: drop obsolete explict mixed ignoreError pattern
...
this got lost in merge resolution
2020-08-03 20:19:27 +01:00
e1d80f05b1
Merge branch 'stable' into master
2020-08-03 20:14:46 +01:00
164c1552d1
Add test to make sure DyeColorIdMap recognizes all colours
...
this will be useful for integrity testing if more colours get added.
2020-08-03 16:48:34 +01:00
1525001565
protocol ItemStack: added equals() method to compare net itemstacks directly
...
this will be needed for more than just this little check once item NBT gets cleaned out properly, since we'll need to compare object equality by network layer stuff instead of internals (where different network objects might deserialize to the same internal items).
2020-08-02 23:22:39 +01:00
2e0f7102e8
ItemBlock: remove superfluous doc comments generated by PhpStorm
2020-08-01 16:06:38 +01:00
32134ef1ac
make-release: remove extra newline
2020-08-01 16:06:05 +01:00
9873f53e0c
make-release: added missing import
2020-08-01 16:02:42 +01:00
f4efaff73e
phpstan: drop some obsolete baselined error patterns
2020-07-25 19:21:45 +01:00
1500668d4e
imports cleanup
2020-07-25 19:21:22 +01:00
2c29634d03
Remove VERSION and GIT_COMMIT constants
...
these are now lazily computed in VersionInfo as needed.
2020-07-25 19:17:33 +01:00
2645b19617
Convert VersionInfo into a final class
...
this allows it to be loaded by the autoloader without additional changes.
2020-07-25 19:00:48 +01:00
5910905e95
PacketBatch::getPackets() may throw PacketDecodeException
2020-07-22 15:38:24 +01:00
8402465fd2
PacketBatch is now immutable
2020-07-22 15:37:06 +01:00
798efc370c
PacketBatch: get rid of putPacket()
2020-07-22 15:24:08 +01:00
2fcee432c1
NetworkSession: store Packet[] for buffering instead of PacketBatch
...
this reduces memory allocations for buffering (in theory).
2020-07-22 15:18:01 +01:00
ed144a1709
remove unused imports
2020-07-21 19:29:12 +01:00
e3dce1f8bd
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/event/player/PlayerChatEvent.php
2020-07-21 19:28:00 +01:00
93e6d7e1a2
thanks for nothing phpstorm
2020-07-21 19:23:30 +01:00
bc52a38922
Improved network bandwidth data collection
2020-07-21 19:21:27 +01:00
92afad5e6f
Updated RakLib to pmmp/RakLib@6fbccdb6a7
2020-07-21 16:18:14 +01:00
ff54eae4b2
updated composer dependencies
2020-07-21 11:59:47 +01:00
977f9ec497
Merge branch 'stable'
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/VersionInfo.php
# src/pocketmine/block/Podzol.php
2020-07-21 11:57:24 +01:00
213afa42dd
BlockFactory: make registerElements() a bit less wide
2020-07-19 13:09:48 +01:00
1ba32c98c7
protocol: avoid potential constructor refactoring packet decode bug
...
if the order of the constructor parameters were changed, it would cause these statements to be reordered, causing packet fields to be decoded in the wrong order.
2020-07-17 23:19:33 +01:00
3e2cfd28cc
ResourcePackManager: change validity check to is_string()
2020-07-17 23:07:37 +01:00
5f70b96081
ResourcePack: do not export getPath()
...
a resource pack is not required to come from a location on disk (although it's currently the only practical option).
2020-07-17 23:03:10 +01:00
915d63a2e8
Button: rename powered property to pressed
2020-07-17 14:54:51 +01:00
9872bb4cb8
Enchantment: remove dead classes
2020-07-17 14:41:04 +01:00
b09b619a30
updated VanillaBlocks
2020-07-17 14:23:32 +01:00
1050485164
MemoryManager: remove class name from object references
...
it's possible to see this information by looking up the hash, which it's necessary to do in order to see any interesting information anyway.
2020-07-13 11:51:25 +01:00
efd67a132e
MemoryDump: fixed duplicated properties, reduce useless noise
2020-07-13 11:44:21 +01:00
46c4c65022
MemoryManager: remove duplicated information from memory dump
2020-07-13 11:10:22 +01:00
e199f403dc
MemoryManager: remove useless information from object dumps
2020-07-13 11:08:03 +01:00
d9c3ec5f91
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
2020-07-11 20:14:42 +01:00
d3c90c4dce
update block factory consistency check
2020-07-11 18:54:35 +01:00
217f9c574a
Player no longer implements ChunkLoader
...
this stops plugins from misusing Player as a ChunkLoader in ways it doesn't know about, causing leaks and god knows what else.
2020-07-11 18:48:10 +01:00
180c0e4999
World: rely on Player being a ChunkListener instead of ChunkLoader
...
ChunkListeners are less dangerous, and also make more sense considering the usages.
Ideally we want to not have to care if a listener is a Player at all, but that's still some work away yet.
2020-07-11 18:20:32 +01:00
923ea46476
PlayerPreLoginEvent: implement Cancellable again
2020-07-11 17:47:53 +01:00
2226efd7a0
added base data handling for Lab Table, Compound Creator, Element Constructor and Material Reducer
...
these also have a blockentity which needs to be implemented as well.
2020-07-11 17:44:50 +01:00
81b38cda5d
Removed setCancelled from Cancellable ( #3685 )
...
* Removed `setCancelled` from `Cancellable`
Before anyone screams, THIS CHANGE WILL NOT AFFECT MOST PLUGINS
(although it allows future changes to break some).
This commit rewrites the documentation of `Cancellable`,
clarifying the concept of "cancelled" from the perspective of the event
framework.
This commit also removes the `setCancelled` method from `Cancellable`.
This does not affect plugins using the (originally standard)
`setCancelled` method on events directly, since the implementation on
classes was not removed. On the other hand, it no longer requires
`Cancellable` events to implement this method, allowing flexibility on
cancelation conditions, e.g. subclasses may require additional
parameters for cancellation without needing to use hacks to check that
the user cancelled the event in the correct way.
2020-07-11 17:42:15 +01:00
d4f6dc8179
BlockFactory: make color block registration slightly less painful to look at
2020-07-11 10:50:02 +01:00
62815f6c9b
Furnace: get rid of entirely unnecessary ItemFactory usage
2020-07-10 21:38:29 +01:00
9b52af62b6
Item: skip a step when decoding PC itemstacks
2020-07-10 21:32:39 +01:00
279abb871d
Remove all usages of CompoundTag->hasTag()
...
in pretty much every case, these usages really wanted to read the tag's contents anyway, which can be combined with a getTag() and instanceof call for more concise and static analysis friendly code.
In the few cases where the tag contents wasn't needed, it still wanted to check the type, which, again, can be done in a more static analysis friendly way by just using getTag() and instanceof.
2020-07-10 21:01:43 +01:00
91b028c208
WorldManager: use ChunkSelector to find stuff to pre-generate
2020-07-10 20:06:26 +01:00
c762ec1319
Entity: removed unused field
2020-07-09 14:10:56 +01:00
c1a815a458
Sign (block): added setText() ( #3100 )
2020-07-09 13:43:42 +01:00
600ef033ab
PlayerSkinPacket: added ::create()
2020-07-09 13:24:31 +01:00
b22cc4875e
Player: Accept NBT data in constructor, instead of asking for it from the server directly
...
this allows custom implementations to provide custom data to the constructor (or none at all).
2020-07-09 13:09:46 +01:00
f2cf453cd0
World: remove one more unnecessary vector3 field mutation
2020-07-09 12:53:16 +01:00
9e1d9768f0
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-07-09 12:37:50 +01:00
874fec0a35
Switch back to PM3 spawn-chunk handling, fix pre-spawn death bug caused by 939dfd9269, close #3513 (properly this time)
2020-07-09 12:35:45 +01:00
36727aabf7
Extracted a ChunkSelector unit from Player
...
if anyone asks me why not use a static method, it's because I want to make this more dynamic going forward, and statics are anything but.
2020-07-09 11:42:12 +01:00
a5d77d5106
LevelDB: remove unused function
2020-07-08 23:24:54 +01:00
31fd427710
Entity: remove usages of Chunk->getX()/getZ()
2020-07-08 20:29:30 +01:00
92f6967665
Command: validate permissions, require permission registration in advance of commands using them
...
this fixes #3200 .
This causes permissions to be registered before plugin load, which changes some behaviour, but after discussions on #internals-dev we couldn't see any reason to keep the behaviour the way it was, and several reasons to change it to be something like this.
2020-07-08 13:50:38 +01:00
6bca38999d
scheduler: removing task IDs
...
These no longer serve any purpose that can't be replaced with a structure like Ds\Set, SplObjectStorage, or just using spl_object_id().
2020-07-08 12:01:48 +01:00
d738504e24
TaskScheduler: use a Ds\Set to index tasks internally
...
this removes all remaining use-cases for taskID.
2020-07-08 11:57:48 +01:00
dca4bf424e
TaskHandler: change isQueued() to accept TaskHandler instead of int
2020-07-08 11:53:47 +01:00
a71b111b50
TaskScheduler: get rid of cancelTask()
...
developers should be using TaskHandler->cancel() instead.
2020-07-08 11:49:43 +01:00
da798817b5
Merge branch 'stable'
...
# Conflicts:
# changelogs/3.14.md
# resources/vanilla
# src/VersionInfo.php
# src/entity/Attribute.php
2020-07-08 11:46:02 +01:00
b79aa04530
remove unused FileWriteTask
2020-07-07 21:21:13 +01:00
7106ff575c
End abuse of PluginCommand by making it final
...
PluginCommand should be better-named CommandExecutorCommand or perhaps CallbackCommand. It's not supposed to be extended by plugins.
2020-07-07 19:42:47 +01:00
909f3f39de
Block: get rid of getRuntimeId()
...
the runtime ID mapping should be non-global in case of multiple protocols.
2020-07-06 11:18:29 +01:00
ad99dc5884
ChunkSerializer micro optimisation: reduce indirections when writing runtime IDs
2020-07-05 22:00:42 +01:00
0188323d74
fixed a bunch of NBT-related phpstan level 8 errors
2020-07-05 21:01:13 +01:00
68c408268c
Separate dye colour ID management from DyeColor enum
2020-07-05 19:04:22 +01:00
bf5da596f7
Get rid of WALL metadata mapping
2020-07-05 18:27:10 +01:00
79d8bf898a
Moved glazed-terracotta ID-mapping table to BlockLegacyIdHelper
2020-07-05 18:20:41 +01:00
eddb2b7fdd
Moved some legacyID mapping code to a separate BlockLegacyIdHelper
...
this makes the code more reusable and will facilitate getting rid of legacy IDs from within the core code.
2020-07-05 16:52:42 +01:00
2219f61ea0
BlockLegacyMetadata: added constants for chemistry table variants
2020-07-05 11:13:29 +01:00
ae179e5039
fix interacting with anvil & enchanting table inventories
2020-07-04 23:46:26 +01:00
d840e8c4d4
Merge commit 'a34f3261c'
...
# Conflicts:
# resources/vanilla
# src/event/entity/EntityExplodeEvent.php
# src/pocketmine/event/block/SignChangeEvent.php
# src/utils/Utils.php
2020-07-04 22:39:40 +01:00
c35a596079
Merge commit '8ce0022de'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/types/inventory/NetworkInventoryAction.php
2020-07-04 22:34:01 +01:00
991abe8864
Merge commit 'fb6491dde'
...
# Conflicts:
# resources/vanilla
2020-07-04 22:25:56 +01:00
5cf74fc16b
Merge commit '3b961d0e5'
...
# Conflicts:
# resources/vanilla
2020-07-04 22:25:23 +01:00
76cf3b7aa5
Merge commit 'a60fc4cc2'
...
# Conflicts:
# resources/vanilla
2020-07-04 22:24:33 +01:00
373783d99b
Merge commit 'b747899fd'
...
# Conflicts:
# resources/vanilla
2020-07-04 22:23:26 +01:00
740ed2013f
Merge commit '57b6451e1'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/block/Ladder.php
2020-07-04 22:22:22 +01:00
172830fc44
Merge commit '8cf025a2d'
...
# Conflicts:
# resources/vanilla
2020-07-04 22:20:42 +01:00
e9eadd3a26
Merge commit '8480ee82e'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
# src/pocketmine/block/CraftingTable.php
2020-07-04 22:19:43 +01:00
1d18662d9b
InventoryAction: replace isValid() with validate() which throws TransactionValidationException
2020-07-04 19:38:34 +01:00
cf5e31c619
InventoryTransaction::execute() now throws exceptions instead of returning true/false
2020-07-01 14:08:28 +01:00
30591d047c
PacketBatch: added a getPackets() method which encapsulates some logic
2020-07-01 13:38:06 +01:00
29612cded3
CraftingTransaction: make CraftingManager injectable
...
this becomes a bit easier to unit-test.
2020-07-01 13:38:06 +01:00
96541763f1
ConsoleCommandSender: inject Language via constructor
2020-07-01 13:38:05 +01:00
7f81507ea1
Add Releasable interface ( #3664 )
...
closes #3301
2020-06-30 21:09:10 +01:00
74a919353f
Food: remove unused import
2020-06-29 22:52:04 +01:00
8b87cf73b9
Player->setSpawn() now accepts NULL (fallback to world spawn)
2020-06-29 22:51:02 +01:00
c0af05fcad
phpstan: clean some errors from level 8 baseline
2020-06-29 22:42:46 +01:00
fc60abe5e5
Player: fixed a few phpstan level 8 warnings
2020-06-29 22:41:17 +01:00
2cd67aed72
Block: fixed crash on block factory clone
2020-06-29 22:40:35 +01:00
69fb2786c6
Player: fixed spawn position sticking to old world spawn when new world spawn is set
...
this will still take effect for preexisting data because the server will still see previously set spawns as custom, but for new players, their spawns will follow the world spawn unless they sleep in a bed.
2020-06-29 22:32:00 +01:00
da3f0752a6
Block: make getAllSides() and getHorizontalSides() use underlying Vector3 generators
2020-06-29 22:13:07 +01:00
8673a4872e
InventoryEvent: fix wrong return type on getViewers()
2020-06-29 21:55:21 +01:00
670ad9eb9d
Position: rename getWorldNonNull() to getWorld(), remove original getWorld()
2020-06-29 21:19:46 +01:00
fc22fd80d8
Eradicate remaining usages of Position->getWorld()
2020-06-29 21:03:55 +01:00
43ae1a5cb4
Block: make getAllSides() and getHorizontalSides() return generators
2020-06-29 20:54:51 +01:00
e61a08a56b
Make SignText immutable
2020-06-29 20:18:10 +01:00
42f543b405
SignText: fixed crash when fetching lines of text if not all lines were provided to the constructor
2020-06-29 19:35:38 +01:00
dae2a4ffce
SignText: added failing test case for index omission in constructor
2020-06-29 19:35:09 +01:00
0b05fd1987
added missing file
2020-06-29 18:54:47 +01:00
4fc134bd04
Separate item ID/meta to ItemIdentifier structure
2020-06-29 12:16:34 +01:00
cbfdfe87cf
phpstan: drop some obsolete bootstrap constants
2020-06-28 19:40:10 +01:00
5a56f68991
Normal: make gaussian non-static
...
this allows each generator to (potentially) have a different gaussian curve for biome blending, as well as fixing a few phpstan level 7 errors.
2020-06-28 19:08:18 +01:00
db8e094d11
Extract a Gaussian unit from Normal generator
2020-06-28 18:45:52 +01:00
78c270a96e
PopulationTask: check the correct instance
2020-06-28 18:45:51 +01:00
d585081c22
Separate consumable item interfaces from general consumable interfaces ( #3595 )
...
I wonder if there's a way to generalise item consuming beyond just eating/drinking. Stuff like lava bucket in a furnace needs the same kind of "leftover" logic.
2020-06-28 17:53:03 +01:00
01d221b794
imports cleanup
2020-06-28 17:50:49 +01:00
27511ac3ec
updated network item ID constants
2020-06-28 17:37:51 +01:00
74b0c411c4
regenerated network entity ID constants
2020-06-28 17:37:25 +01:00
0d13a3fbdb
NetworkSession: do not respond to death before player spawn, fixes #3513
...
there's a few changes that can be made to avoid this problem, the
primary one being to separate this API from NetworkSession and abstract
it away... but this is a reasonable, although not great, solution.
2020-06-28 17:35:12 +01:00
2104b2d32b
Entity: defer kill() until post-construct
...
this fixes crashes and various bugs with death logic executing during the creation of entities, as well as an age-old Player crash after quitting the server when dying.
2020-06-27 23:28:03 +01:00
2a9586f6fd
Explosion: fixed assert failure on explodeB()
2020-06-27 23:17:27 +01:00
87ce92d87e
Entity: some cleanup of network position hacks
2020-06-27 23:16:04 +01:00
1f0ea0c2c7
Living: stop mutating Vector3
2020-06-27 21:51:42 +01:00
f1048aeaa3
Block: rework addVelocityToEntity() to avoid vector3 mutation
2020-06-27 21:38:24 +01:00
ff00595a48
Remove some more Vector3 mutations
2020-06-27 20:58:02 +01:00
c040248dbd
Item: use static-analysis-friendly method for retrieving custom block data
...
fixes 2 phpstan level 8 errors
2020-06-27 13:46:04 +01:00
0000783926
Item: make nbt field non-nullable
2020-06-27 13:34:08 +01:00
7e331c590d
Use static-analysis-friendly method for getting effects from EffectManager
...
fixes 5 phpstan level 8 errors
2020-06-27 13:09:05 +01:00
9e6f1c9a5a
Living: check if damager is null before trying to use it
2020-06-27 13:09:05 +01:00
b7b5ea6fc9
Painting: use motive directly internally
...
this is cleaner and also fixes a phpstan level 8 error
2020-06-27 13:09:05 +01:00
3c1b8b83f5
HungerManager: use AttributeMap->mustGet()
...
fixes 2 errors on phpstan level 8
2020-06-27 13:09:05 +01:00
7e391a8123
Tile: use phpstan-friendly way to pass block NBT
...
fixes 1 level 8 error
2020-06-27 13:09:05 +01:00
9484220bd5
ContainerTrait: use a static-analysis-friendly way to read NBT, fixes 4 phpstan level 8 errors
2020-06-27 13:09:05 +01:00
f039a077cd
ItemFrame: fixed a phpstan level 8 error
2020-06-27 13:09:05 +01:00
45b4e3cd7a
EmoteListPacket can be ServerboundPacket ( #3635 )
2020-06-27 10:04:23 +01:00
9f323bc480
phpstorm, stop messing with my code pls
2020-06-26 22:25:09 +01:00
f23c3be7af
Merge branch 'stable'
2020-06-26 22:21:56 +01:00
0caf99445b
Merge commit '4fed08bcd4655d7eec8d2cdf88950789f99ed2ee'
...
# Conflicts:
# resources/vanilla
2020-06-26 22:21:49 +01:00
7e6adc41f0
Merge 1.16 support into PM4 (with changes)
2020-06-26 22:21:09 +01:00
5aefdda942
Merge commit 'c616d9bb7c1335f84808bed9c8eef183ad163679'
...
# Conflicts:
# resources/vanilla
# src/VersionInfo.php
2020-06-26 19:19:54 +01:00
18f04d6d96
Merge commit '3ecae0db1964562a8a13346df3593744d2288b81'
...
# Conflicts:
# resources/vanilla
2020-06-26 19:19:20 +01:00
9887a8b778
Merge commit 'c5bbb2bcbc4ecc8bcfd9bfaefd27c1b51e482d77'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
# src/pocketmine/network/mcpe/protocol/InventoryTransactionPacket.php
2020-06-26 19:18:58 +01:00
fa0d6f4bd0
Merge commit '24a28897583ca54730c689bec3ca14fc270e8ea4'
2020-06-26 19:17:13 +01:00
05bd92a94b
Merge commit '60b26a7ea8939a85db9af0a99dd5a4b13e1a562d'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/serializer/PacketSerializer.php
2020-06-26 19:16:53 +01:00
94ad0cd3f3
Merge commit '22b52f03d12fb82b4c8cd16ef6b0d2c8cb44f9f5'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-06-26 19:15:18 +01:00
a8180cdf0b
Merge commit 'df76c02e7ac3bfbde8ecb597653779e8e1516f58'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l7-baseline.neon
2020-06-26 19:14:25 +01:00
d52ae120d4
Merge commit 'd343187e58e02c37903a0a93fb22ad9e9cbcdea6'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l8-baseline.neon
2020-06-26 19:06:46 +01:00
ac20e0b005
Merge commit 'c5ad127854eb2618a2cc417c301a15963314be12'
2020-06-26 19:01:08 +01:00
9fd9428377
Merge commit '0f6dc9082a781fcc6f70f3d3e05bd261c6f6c203'
...
# Conflicts:
# composer.lock
# resources/vanilla
2020-06-26 18:49:11 +01:00
111f4b3778
Merge commit '2b6dcbc2e2f1dc8d629225c19cbcedfb9ae969c4'
...
# Conflicts:
# resources/vanilla
2020-06-26 18:46:29 +01:00
abe4f1bf25
Merge commit '763c8ebfe3bb8a597768d86040fee130c8fc7ab8'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Worker.php
# src/thread/CommonThreadPartsTrait.php
2020-06-26 18:46:01 +01:00
b8bbfdb181
Merge commit 'c572e9bb6a787d0573e7999b38f4651fc48cec58'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l7-baseline.neon
2020-06-26 18:43:43 +01:00
17054e1001
Merge commit '89521f166d8b43f2fd2af99f367888a34b44c492'
...
# Conflicts:
# resources/vanilla
# src/world/Explosion.php
2020-06-26 18:42:30 +01:00
d8a8f5b77a
phpstan: ignore a new error caused by 52fd1a8c1d
2020-06-26 13:54:30 +01:00
52fd1a8c1d
CommandSender: export getLanguage()
...
this currently serves as a proxy to the server main language, but it can be used by third party implementations to choose a non-Server language.
2020-06-22 20:05:23 +01:00
097fc7e6cb
phpstan: clean out some more dead error patterns
2020-06-22 19:59:57 +01:00
5c3d39f4e2
phpstan: clean out some level 8 error patterns that no longer apply
2020-06-22 19:56:00 +01:00
137605ab8c
Position: make World constructor parameter required
2020-06-22 14:15:27 +01:00
5e0d635562
Resource packs: modules field is required in manifest.json
2020-06-21 23:19:15 +01:00
a920baa295
resource packs: use JsonMapper for manifest parsing
2020-06-21 18:47:27 +01:00
1ef6e5e17b
TileFactory now only manages loading tiles from NBT, not direct creation
...
my objective is to make this use proper constructors like entities, but there's a couple of obstacles to get around first.
2020-06-21 00:47:02 +01:00
1f90aa07aa
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/command/defaults/TeleportCommand.php
# src/pocketmine/event/entity/EntityDespawnEvent.php
# src/pocketmine/event/entity/EntityInventoryChangeEvent.php
# src/pocketmine/event/entity/EntityLevelChangeEvent.php
# src/pocketmine/event/entity/EntitySpawnEvent.php
# tests/phpstan/configs/actual-problems.neon
2020-06-21 00:30:45 +01:00
a16de8747e
Explosion: stop using Vector3->setComponents()
...
this kills two birds with one stone: this inlined version of the logic should be faster than the vector-abusing version.
2020-06-20 22:19:37 +01:00
bf5c06f285
World: get rid of temporalPosition too (entirely unused)
2020-06-20 21:45:35 +01:00
fc7672c6ba
World: remove temporalVector (premature cold path optimisation again)
2020-06-20 21:44:05 +01:00
80e150c803
Entity: get rid of temporalVector mutation
...
except for checkBlockCollision, these are all cold paths ... this gets us one step closer to immutable Vector3
2020-06-20 21:41:19 +01:00
42637f97c6
Liquid: eliminate some unnecessary Vector3 field mutations
2020-06-20 21:32:24 +01:00
d38c17835d
Properly switch to string entity IDs
2020-06-20 13:43:31 +01:00
a988578ee0
protocol: move PotionType and PotionContainerChange recipes to types/recipe namespace
2020-06-20 11:43:47 +01:00
0784bfa2fb
phpstan: drop another pattern that was fixed by recent changes
2020-06-20 11:30:14 +01:00
032dc57090
phpstan recognizes the existence of parallel\bootstrap now
2020-06-20 11:29:45 +01:00
6be56de3ed
clean some newly fixed errors from phpstan baselines
2020-06-20 11:24:39 +01:00
d5db163208
protocol: added proper object wrappers for gamerules
2020-06-20 11:24:39 +01:00
d2089afbc3
ItemBlock: get rid of -1 meta check (meta is never -1 in this code path now)
2020-06-20 09:52:02 +01:00
62e7b0e2b1
(Splash)Potion: do not assume that META == potion ID
...
it probably will be, but meta might not be accessible anymore soon.
2020-06-20 09:31:06 +01:00
d62d0762ff
item: remove some unnecessary CompoundTag usages
2020-06-19 22:59:19 +01:00
4e8e10ca45
EntityFactory: remove obsolete indirection (class mappings are redundant here now)
2020-06-19 22:18:42 +01:00
0a43fd816c
EntityFactory: drop unnecessary @param
2020-06-19 22:10:35 +01:00
47baaf4c72
move NBT helper functions from EntityFactory to EntityDataHelper
2020-06-19 22:04:36 +01:00
1a3445f4b5
EntityFactory: drop automatic provisioning of short class name as save ID
2020-06-19 22:03:22 +01:00
012acdd4cb
move runtime entity ID counter from EntityFactory back to Entity
...
EntityFactory is specialized for the purpose of deserializing data from worlds, and runtime ID assignment isn't related.
2020-06-19 21:55:49 +01:00
6d3750994b
EntityFactory: remove dead function
2020-06-19 21:54:23 +01:00
954e8e6e6f
update pocketmine/math dependency
2020-06-19 11:33:10 +01:00
fb4a99a0ef
Position: x,y,z parameters are now mandatory
2020-06-19 11:21:47 +01:00
9f89f2887a
Location: x,y,z parameters are now mandatory
2020-06-19 11:19:05 +01:00
4b0bf34adb
Location: add native typehints
2020-06-19 11:17:20 +01:00
60a6b4b10d
Entity: use EntityFactory helper function to deserialize Motion
2020-06-19 10:51:27 +01:00
4b528aa637
NBT is no longer needed to create an entity
...
it's still able to be provided, but shouldn't be needed in the majority of cases (constructor args and/or API methods should be sufficient).
2020-06-19 10:51:27 +01:00
0a1bb0041b
Player: avoid using NBT for onGround hack
2020-06-19 10:51:27 +01:00
1205432c34
Extract mandatory parameters into constructor parameters
...
the goal is obviously to ditch NBT entirely here, but there's more work to be done before that becomes possible.
2020-06-19 10:51:27 +01:00
3f135da704
Simplify motion handling in ProjectileItem
2020-06-19 10:51:27 +01:00
6a26c0bebf
EntityFactory now exclusively handles loading data from disk
...
this commit removes the ability to replace centrally registered entity classes in favour of using constructors directly.
In future commits I may introduce a dedicated factory interface which allows an _actual_ factory pattern (e.g. factory->createArrow(world, pos, shooter, isCritical) with proper static analysability) but for now it's peripheral to my intended objective.
The purpose of this change is to facilitate untangling of NBT from entity constructors so that they can be properly created without using NBT at all, and instead use nice APIs.
Spawn eggs now support arbitrary entity creation functions like EntityFactory does, allowing much more flexibility in what can be passed to an entity's constructor (e.g. a Plugin reference can be injected by use()ing it in a closure or via traditional DI.
2020-06-19 10:51:27 +01:00
72a7fc68c1
First look at making entity creation closure-driven
...
this allows doing stuff like injecting plugin references to entity constructors for now. I want to make this more flexible still, but I've done about as much as I feel like doing today and don't want this disappearing into a stash to never be seen again.
2020-06-19 10:51:27 +01:00
3bdd9ee860
phpstan: drop a bunch of error patterns that don't appear on 0.12.29+
2020-06-19 10:49:21 +01:00
64e9647334
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/convert/LegacySkinAdapter.php
# tests/phpstan/configs/check-explicit-mixed-baseline.neon
# tests/phpstan/configs/phpstan-bugs.neon
2020-06-19 10:48:27 +01:00
ced89add3c
Human: remove dead function
2020-06-19 01:13:00 +01:00
cf85857660
Entity: remove duplicated code from saveNBT()
2020-06-19 01:07:18 +01:00
0ae357cf8f
ProjectileItem: get NBT as far away as possible
2020-06-18 20:25:19 +01:00
b3df5f4e95
CS: strip unneeded phpdoc
2020-06-18 20:01:49 +01:00
11eb1f1c5e
imports cleanup
2020-06-18 20:01:19 +01:00
44814a8421
AutoUpdater: remove useless check (details_url is mandatory)
2020-06-18 19:06:42 +01:00
98f0447912
AutoUpdater: use JsonMapper to handle API response information
2020-06-18 19:03:11 +01:00
2687e63645
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/block/Cake.php
2020-06-18 18:10:27 +01:00
755e53cd71
JwtUtils: added a split() function to reduce code duplication
2020-06-18 12:05:54 +01:00
222399d178
EncryptionContext: fix exception message
2020-06-18 11:52:05 +01:00
d931a5bcc0
phpstan: drop an obsolete level 7 ignoreErrors pattern
2020-06-18 11:51:07 +01:00
95114dcc1e
EncryptionContext: fixed a phpstan level 7 error (openssl_digest() might return false for god knows what reason)
2020-06-18 11:50:43 +01:00
edc3156bea
Rename NetworkCipher -> EncryptionContext
2020-06-18 11:37:53 +01:00
82b3e3398b
make more use of igbinary_serialize() and igbinary_unserialize()
2020-06-17 23:03:03 +01:00
6f4d4be3da
InGamePacketHandler: handle InvalidSkinException thrown by SkinAdapter::fromSkinData()
2020-06-17 22:31:44 +01:00
05615b3eb7
ClientDataToSkinDataHelper: move safeB64Decode to its own function
2020-06-17 22:27:13 +01:00
e6a3f7baa2
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-06-17 22:23:17 +01:00
a686840e5e
RuntimeBlockMapping: fixed palette cache never being initialized
...
I must have been very tired when I wrote this code
2020-06-17 21:33:56 +01:00
333ed8ed2f
RuntimeBlockMapping: remove unnecessary nullable flag
2020-06-17 21:32:51 +01:00
715fca8986
LoginPacketHandler: use playerInfo directly again, fix another 2 PHPStan level 8 errors
2020-06-17 21:30:34 +01:00
eefb6ae8e7
LoginPacketHandler: use reference to new PlayerInfo directly, fixes a PHPStan level 8 error
2020-06-17 21:29:16 +01:00
7558f2cb12
regenerated phpstan level 8 baseline
2020-06-17 21:27:51 +01:00
503782d67c
moved skin-parsing code from LoginPacketHandler to its own dedicated helper class
2020-06-17 21:24:12 +01:00
55e6b2dfbc
Merge commit '1c13ba565660e0985c08f2c6b59e26f8216f87e4'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/serializer/PacketSerializer.php
2020-06-17 21:14:04 +01:00
5c94c6992d
Merge commit 'f970be0e4ddf90e64c2e87cc6b2123aa933b3ab1'
...
# Conflicts:
# resources/vanilla
2020-06-17 21:12:46 +01:00
6a8bb89734
Merge commit '11a3f9f1b906d0a73adb5a81a6eff120b56cf6fa'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/VerifyLoginTask.php
2020-06-17 21:12:27 +01:00
8cabab20e3
Merge commit '09771849aefb70bc29202b160f65723cf926c974'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/VerifyLoginTask.php
2020-06-17 21:10:59 +01:00
543023793c
Merge commit '57a310230acd8b13e96fa4f24dbdabb19927b483'
...
# Conflicts:
# resources/vanilla
2020-06-17 21:04:23 +01:00
d58ea80dca
Merge commit '130c55d9f1c3b350c2767f7656366e08a63cf1ad'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/serializer/PacketSerializer.php
# src/network/mcpe/protocol/types/entity/EntityLink.php
# tests/phpstan/configs/l8-baseline.neon
2020-06-17 21:03:45 +01:00
7c79a28fdb
Merge commit '2712befa82dc92fe26d2b913a47200ad84927799'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l8-baseline.neon
2020-06-17 20:49:46 +01:00
fb059cda69
Merge commit 'a4e250a3e61cbf1e75fe2785e71158f16a4a9039'
...
# Conflicts:
# resources/vanilla
2020-06-17 20:48:19 +01:00
8d537eaae8
Merge commit '23b97d8e2dca50cca77061c1080911ab610fa708'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l8-baseline.neon
2020-06-17 20:47:51 +01:00
f1fd8a13e9
Merge commit '1fb5043eb1b495e6926caecf3fb493837724c770'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l8-baseline.neon
2020-06-17 20:46:18 +01:00
d310c8b782
Merge commit 'b0b1b29de4d4cbf60ca54d9043f01c9b2b21f136'
2020-06-17 20:44:32 +01:00
7e6a7d4611
Merge commit '1c3b641e37471833523f50f818571f25f85a52f9'
2020-06-17 20:43:57 +01:00
a2677eba02
Merge commit 'f3063e797fab56ff8d0213c8e5a3904085a6eb79'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/format/io/ChunkUtils.php
2020-06-17 20:43:30 +01:00
d2130265f8
Merge commit '8dcc88712c6b8a4d4a0c6be2f6b908ae85378209'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/format/io/ChunkUtils.php
# tests/phpstan/configs/l7-baseline.neon
2020-06-17 20:42:28 +01:00
921aa091e0
Merge commit '04191ec44a00dd058f5d7e9e315d451e44285494'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l7-baseline.neon
2020-06-17 20:40:12 +01:00
14d3e5ce27
Merge commit '62ea7c93a9ba1e71bef868efefdd9cc6dcc84a08'
...
# Conflicts:
# resources/vanilla
# src/entity/Skin.php
# src/item/InvalidSkinException.php
2020-06-17 20:34:19 +01:00
09909f7af8
Merge commit 'cf06b5b8cffb4ee3a4c1e88b7be9e35fca74a89e'
2020-06-17 19:20:53 +01:00
6d63c9bf43
Merge commit 'a8ec51daacaef9113b17e3fc79c0bdcaf1c99df9'
2020-06-17 19:20:30 +01:00
57908586bd
more jsonmapper models for login
2020-06-17 19:10:27 +01:00
4bb93eeca7
updated composer dependencies
2020-06-17 14:32:57 +01:00
506f98efc4
Eliminate usages of BaseNbtSerializer->readCompressed() and BaseNbtSerializer->writeCompressed()
2020-06-17 14:31:56 +01:00
3cdf808da1
NetworkNbtSerializer: do not assume that this format is related to the disk little-endian format
2020-06-17 13:55:29 +01:00
76e15016a2
updated composer dependencies
2020-06-17 13:51:14 +01:00
c618932d25
Eliminate usages of BinaryStream->setBuffer() and BinaryStream->reset()
2020-06-17 13:49:43 +01:00
893f7cb6ef
fix crash whn player joins in spectator mode
2020-06-17 12:39:54 +01:00
9c46a1f141
Rename Packet->getBinaryStream() -> Packet->getSerializer()
2020-06-17 11:33:59 +01:00
6c096c44aa
Rename NetworkBinaryStream -> PacketSerializer
2020-06-17 11:31:13 +01:00
c6557f0222
protocol: added a FixedItemIds class (this is fully auto-generated, unlike the one provided by the API)
...
this may be different from the IDs exposed on the API and shouldn't be used for anything outside the protocol.
TODO: we need to review the dynamicness of item numeric IDs and find out if it's possible for them to change based on StartGamePacket content. If they can, we might need to change this.
2020-06-17 11:06:26 +01:00
a381fc8848
sync composer dependencies
2020-06-15 22:24:44 +01:00
3294075aad
LoginPacketHandler: use double quotes consistently
...
the mixture of single quotes and double quotes makes PHPStan type inference quietly not work, and reports an error here in checkExplicitMixed mode.
2020-06-15 20:31:09 +01:00
7d73630fb7
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/world/format/io/region/RegionGarbageMap.php
# src/world/format/io/region/RegionLoader.php
# tests/phpstan/configs/l7-baseline.neon
# tests/phpunit/world/format/io/region/RegionLocationTableEntryTest.php
2020-06-15 20:10:15 +01:00
a39fbe600d
Merge branch 'stable'
...
# Conflicts:
# phpstan.neon.dist
# resources/vanilla
2020-06-14 20:03:02 +01:00
f55a7f8b53
Merge commit 'd8d994351'
...
# Conflicts:
# composer.lock
# resources/vanilla
# tests/phpstan/configs/l7-baseline.neon
2020-06-14 19:47:21 +01:00
13031967f4
Merge commit '0029efa37'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Server.php
2020-06-14 19:36:50 +01:00
9ce531fef4
(master) imports cleanup
2020-06-14 19:29:33 +01:00
7d5607e72c
Merge commit 'df13e967f'
2020-06-14 19:28:20 +01:00
d0c8d64b40
Merge commit '097c260db'
...
# Conflicts:
# resources/vanilla
# src/item/enchantment/Enchantment.php
# src/plugin/PluginDescription.php
# src/pocketmine/entity/Effect.php
# src/pocketmine/item/ItemFactory.php
# src/pocketmine/plugin/PluginManager.php
2020-06-14 19:28:05 +01:00
5f79071e4c
Registry Trait: fixed magic methods not working properly when system locale is tr_TR ( #3580 )
...
Fixed incorrect case of incorrect letters on operating systems using languages other than English. Like (Stair => STAİR)
2020-06-14 11:48:15 +01:00
5f0f5236f8
RegistryTrait: fix crash when child classes don't define getAll()
2020-06-13 18:34:23 +01:00
465285b3c2
do not rely on GameMode::getMagicNumber() to match protocol IDs
2020-06-13 12:26:17 +01:00
5c16261374
Merge branch 'stable'
2020-06-13 11:59:05 +01:00
f0669b7770
Merge commit '710c16260'
...
# Conflicts:
# resources/vanilla
# src/network/query/QueryInfo.php
2020-06-13 11:59:00 +01:00
5a8633f6c0
Merge commit '409c8c170'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:57:58 +01:00
3bf47e33f0
Merge commit '376926c70'
...
# Conflicts:
# resources/vanilla
# src/command/defaults/TimingsCommand.php
2020-06-13 11:57:31 +01:00
fab46f159b
Merge commit 'c3fabe833'
2020-06-13 11:56:26 +01:00
430806cab3
Merge commit '3e09ff535'
...
# Conflicts:
# resources/vanilla
# src/block/tile/EnchantTable.php
2020-06-13 11:56:11 +01:00
0d186fe42c
Merge commit '725506510'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/format/io/leveldb/LevelDB.php
2020-06-13 11:55:10 +01:00
dba059d8da
Merge commit 'a7f10d8cc'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:52:17 +01:00
70ca12bb90
Merge commit 'fcc9e62c6'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/types/command/CommandEnum.php
# src/pocketmine/Player.php
2020-06-13 11:49:52 +01:00
ee6b980b98
Merge commit '42613618a'
...
# Conflicts:
# phpstan.neon.dist
# resources/vanilla
2020-06-13 11:46:39 +01:00
f3271a0d19
Merge commit '1bbeb6245'
...
# Conflicts:
# composer.lock
# resources/vanilla
2020-06-13 11:44:44 +01:00
fe1b5d2d01
Merge commit '3d50aafcc'
...
# Conflicts:
# resources/vanilla
# src/crafting/ShapedRecipe.php
2020-06-13 11:30:44 +01:00
4208192aa2
Merge commit '50fed4164'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:29:39 +01:00
69aa6a51b4
Merge commit '3f971a0c6'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l7-baseline.neon
2020-06-13 11:29:12 +01:00
da3ba1e2b2
Merge commit 'a27b29897'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:28:03 +01:00
2a9498a4f9
Merge commit 'a90132a30'
...
# Conflicts:
# resources/vanilla
2020-06-13 11:22:18 +01:00
d82264fe60
Merge commit 'dfbd85777'
...
# Conflicts:
# resources/vanilla
# src/VersionInfo.php
2020-06-13 11:21:43 +01:00
586f265033
update build/php submodule to pmmp/php-build-scripts@2f422db397
2020-06-13 11:17:58 +01:00
f3bcd04e87
update build/php submodule to pmmp/php-build-scripts@fd749b299a
2020-06-04 14:16:45 +01:00
b8e57282e3
Merge branch 'next-minor'
...
# Conflicts:
# resources/vanilla
2020-06-04 14:14:09 +01:00
2affdc1af2
Merge commit '00916ade0'
2020-06-04 14:13:52 +01:00
c29ed34b54
Merge commit 'f4ee2912db89c6629d4fa191e993f0798035ef20'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Server.php
2020-06-04 14:13:23 +01:00
0a3bd6fe78
Merge commit 'a0de9b0d4'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-06-04 14:11:00 +01:00
fcc2352203
Merge commit '03e8cd3ed'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-06-04 14:07:55 +01:00
3e9018a838
Merge commit '7af4e70f6'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/entity/Entity.php
2020-06-04 14:02:00 +01:00
017afead3b
extract FurnaceRecipeManager unit from CraftingManager
...
I'd like to have this directly provided to Furnace, but I don't know how to short of making into a singleton. Since I want to have per-furnace recipe managers (e.g. for stuff like blast furnace vs regular furnace etc), a singleton isn't really an option.
2020-06-03 18:59:59 +01:00
b58c425189
Merge branch 'next-minor'
...
# Conflicts:
# changelogs/3.12.md
# resources/vanilla
# src/VersionInfo.php
2020-06-03 13:11:30 +01:00
0af5dbc89b
Merge commit '3be83e09f'
2020-06-03 13:09:04 +01:00
bce7cdd461
Merge commit 'f24be2b05'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
# src/pocketmine/block/SnowLayer.php
2020-06-03 13:08:48 +01:00
a5e08e9a71
Merge commit '92cffc00d'
2020-06-03 13:06:02 +01:00
d2d4780653
Merge commit 'a3f633862'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-06-03 13:03:23 +01:00
7d7c16b764
Merge commit '21aef97ba'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-06-03 13:00:31 +01:00
892fa1598d
Merge commit 'ed0d1978a'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/item/WritableBook.php
2020-06-03 12:58:57 +01:00
01cbd27485
Merge commit 'd64561b0b'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-06-03 12:57:20 +01:00
b2f182b196
Merge commit 'd234d3e45'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/command/defaults/ParticleCommand.php
2020-06-03 12:55:46 +01:00
90b53149d7
Merge commit '5056754ce'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-06-03 12:54:00 +01:00
5b0964cec8
Merge commit '2dc3cf816'
...
# Conflicts:
# resources/vanilla
2020-06-03 12:52:42 +01:00
2bf73c7a4a
Merge commit '8c5a81cf5'
...
# Conflicts:
# resources/vanilla
2020-06-03 12:50:09 +01:00
e7d712aeb6
Merge commit '2b58f2baf'
...
# Conflicts:
# resources/vanilla
# src/entity/object/FallingBlock.php
2020-06-03 12:47:44 +01:00
c72937a4af
Merge commit '5dadf1237'
...
# Conflicts:
# resources/vanilla
2020-06-03 12:46:06 +01:00
544bcb8f12
Merge commit '0d4e473bd'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-06-03 12:45:28 +01:00
087b31e7f0
Merge commit '11cedc401'
2020-06-03 12:44:05 +01:00
e250553670
Merge commit '3f2455f09'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/block/SnowLayer.php
2020-06-03 12:43:36 +01:00
d7ae86b30c
Merge commit '9d26a224a'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/block/DoublePlant.php
2020-06-03 12:35:59 +01:00
9e98666f57
Merge commit 'c4ad39046'
...
# Conflicts:
# resources/vanilla
2020-06-03 12:31:42 +01:00
899da1b7f7
Merge commit '42e14f749'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
# src/pocketmine/item/Bow.php
# src/world/World.php
2020-06-03 12:31:17 +01:00
bbf3f4c476
Merge branch 'next-minor'
2020-05-31 18:40:19 +01:00
4bf40df770
tools: added a script to remove garbage from region files
2020-05-31 15:10:28 +01:00
31f4735ce5
Merge branch 'next-minor'
...
# Conflicts:
# composer.lock
# resources/vanilla
2020-05-31 15:05:44 +01:00
e9e8055238
Merge commit '3f07f0687'
2020-05-31 15:05:11 +01:00
9c50ad4c83
Merge commit '10279e11e'
2020-05-31 15:04:58 +01:00
1974afec78
updated build/php submodule to pmmp/pthreads@653d685628
2020-05-31 15:04:37 +01:00
8dc5b9e712
Merge commit '673e44445'
...
# Conflicts:
# composer.lock
# resources/vanilla
2020-05-31 15:03:48 +01:00
7e86354519
updated composer lockfile
2020-05-31 14:59:00 +01:00
6df43338df
Merge commit 'c3a795e87'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
# src/pocketmine/entity/Entity.php
2020-05-31 14:56:37 +01:00
0a730db030
Merge commit '4199c3796f4c6d8da0eccba64fe4cd9812acadeb'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/block/Water.php
2020-05-31 14:46:51 +01:00
cc549630e5
HandlerListManager: fixed @param doc comment not referring to correct ReflectionClass
...
phpstan doesn't notice this because of the phpstan-param doc directly underneath.
2020-05-30 22:29:30 +01:00
4ce5f2a6c6
WorldManager: Add access to WorldProviderManager ( #3527 )
...
* WorldProvider: Add access to WorldProviderManager
* WorldManager: Updated getProvider method
Co-authored-by: Govdim <govdim.govorek@gmail.com >
2020-05-26 06:59:19 +01:00
c93038f574
Inject WorldProviderManager to WorldManager's constructor, no longer singleton
2020-05-24 19:22:04 +01:00
437e4d75ab
WorldProviderManager: use $this-> instead of self::
2020-05-24 19:16:57 +01:00
81d11ea4e3
Player: make selectChunks() non-dependent on the player's current view distance & location
2020-05-24 18:59:43 +01:00
63d622a3cc
Remove GlobalConstants
...
the constants described in this file are now provided by pocketmine\utils\Limits in the BinaryUtils dependency.
2020-05-24 18:37:09 +01:00
41566e8077
Server: remove unused BOOTUP_RANDOM constant
...
this used to be used for /dumpmemory filenames, but those were confusing and stupid, and it's not used anymore since March 2018.
2020-05-24 18:33:04 +01:00
3473254d01
added Timings::INCLUDED_BY_OTHER_TIMINGS constant
2020-05-24 16:09:45 +01:00
fe649d8d70
Extract ServerConfigGroup from Server
...
this API isn't very nice, but it's pretty much the same as the original, and at least this can be _kinda_ unit-tested...
2020-05-24 15:48:03 +01:00
b05fab3e3c
FormatConverter: do not hardcode progress update interval
2020-05-24 14:30:59 +01:00
c95951479c
FormatConverter: beware paths with \ on linux
2020-05-24 14:28:07 +01:00
49bd58a86a
DiskResourceProvider: do not trim backslashes from path when we're not on Windows
2020-05-24 14:26:12 +01:00
2170f81cdd
PluginManager: remove dead function isCompatibleApi()
...
moved to ApiVersion static class
2020-05-24 14:14:47 +01:00
5eadb0ac44
ConsoleCommandSender: be honest about Server dependency
2020-05-23 12:31:22 +01:00
5f2e65d608
QueryHandler: be honest about dependency on Server
2020-05-23 12:28:12 +01:00
23ab6a283b
Separate QueryInfo from QueryRegenerateEvent
...
this removes some useless and confusing APIs from query info.
2020-05-23 11:55:29 +01:00
0025196a81
Merge branch 'next-minor'
...
# Conflicts:
# resources/vanilla
# src/network/upnp/UPnP.php
2020-05-23 11:16:19 +01:00
14dd7f306b
Merge commit '45c89d084'
...
# Conflicts:
# resources/vanilla
# src/command/defaults/TimeCommand.php
2020-05-23 11:14:12 +01:00
c9af5ce7a9
Convert GeneratorManager to singleton
2020-05-23 10:13:03 +01:00
640428c415
Convert WorldProviderManager to singleton
2020-05-23 10:02:09 +01:00
e2232dd8d4
WorldManager: reduce code duplication for world path discovery
2020-05-23 09:50:25 +01:00
8d9759288c
WorldManager: don't hard-depend on server configuration for autosave settings
2020-05-23 09:43:59 +01:00
fcea7da183
WorldManager: allow dataPath to be injected via constructor
2020-05-23 09:37:37 +01:00
6257f717b1
Entity: make networkProperties private
...
this reduces the temptation to use it in high-level code, as well as making syncNetworkData() more useful (now it can export to many data collections, which means we can start to think about having a property cache per network session, which is more flexible)
2020-05-21 20:29:06 +01:00
1aa92bd6a8
Living: Do not rely on attribute map for moveSpeed attribute access
2020-05-21 20:13:24 +01:00
f77eea8c44
Living: set SPRINTING flag when it's needed, close #3521
2020-05-21 20:01:37 +01:00
ec8ee29291
moving sneak & sprint properties to Living
2020-05-21 19:55:58 +01:00
74e1f6320a
Store attributes as local vars, reduce usage of AttributeMap
...
ideally we want attribute map to only be used for properties that need synchronization.
2020-05-21 19:18:00 +01:00
f93bc0739c
Force types of RegistryTrait usages to shut PHPStan up
...
we need generic traits to solve this problem properly.
2020-05-21 19:12:48 +01:00
8e2b9b686b
Block: Invert default behaviour of silk touch (more logical)
...
Now, blocks do not respond to silk touch unless specifically opted into. Since this always involves custom drops in one way or another, it's easy enough to figure out which blocks need to be marked for silk touch - anything that overrides getDrops, getDropsForCompatibleTool or getSilkTouchDrops is a block which _might_ need to be flagged. Using these criteria to reduce the number of blocks needing to be checked, I was able to manually invert the behaviour as needed.
This fixes reoccurring bugs with blocks erroneously dropping themselves whenever new blocks are added and someone forgot to set that flag, granting players access to internal blocks with strange behaviour.
2020-05-21 13:02:36 +01:00
72f59eca3c
Slab: ignore silk touch on breaking tools, closes #2794
2020-05-21 11:46:43 +01:00
8ec2ba79de
Unhackify Registry member cloning, fixes #3519
2020-05-21 11:38:02 +01:00
7aca41a530
Living: do not loop downwards searching for collision block, closes #3517
2020-05-20 20:33:25 +01:00
64bb126bf5
ignore some more l8 errors (architectural issue in NetworkSession)
2020-05-20 20:25:32 +01:00
3d0e47a86f
Merge branch 'next-minor'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/protocol/StartGamePacket.php
2020-05-20 20:22:18 +01:00
12f53f0ae0
Merge commit 'a29424f5b'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:21:29 +01:00
f992c35b68
Merge commit 'ff3af492f'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:20:47 +01:00
0d9703c774
Merge commit '80b804f7a'
2020-05-20 20:20:08 +01:00
9421308f73
Merge commit '3a7873598'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:19:42 +01:00
1318cfbe29
Merge commit 'ab32784c7'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:18:57 +01:00
c14069c42b
Merge commit '816234a37'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/UpdateBlockSyncedPacket.php
2020-05-20 20:16:45 +01:00
14c7ab50d8
Merge commit 'b7bf92a5e'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:15:15 +01:00
b6209ffe71
Merge commit 'dcca000ea'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:14:58 +01:00
ca4f8501f6
Merge commit 'c4ea51f98'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:14:33 +01:00
d2ee2d42f9
Merge commit '8202bb1cd'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:14:01 +01:00
a34fbba4c8
Merge commit 'b75758e35'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/protocol/MoveActorDeltaPacket.php
2020-05-20 20:13:28 +01:00
82bc59f480
Merge commit '38a06f76f'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
2020-05-20 20:11:43 +01:00
73495f303e
Merge commit '84f99ed41'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:10:30 +01:00
8f6ccb17fd
Merge commit 'fd63f1919'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/serializer/NetworkBinaryStream.php
# src/pocketmine/network/mcpe/protocol/StartGamePacket.php
2020-05-20 20:09:54 +01:00
3bf52b3977
Merge commit '66d44aa81'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:06:58 +01:00
5caae278cf
Merge commit 'f3089f577'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/protocol/StartGamePacket.php
2020-05-20 20:05:48 +01:00
c5c1db1bc9
Merge commit '9516ef163'
...
# Conflicts:
# resources/vanilla
2020-05-20 20:00:56 +01:00
64f0b2deb6
Merge commit 'e982a57cb'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/protocol/StartGamePacket.php
2020-05-20 19:59:46 +01:00
d33ccf4edc
Merge commit 'f57fa2252b6b7aa3667da5bb1e09fb716b951402'
...
# Conflicts:
# resources/vanilla
2020-05-20 19:57:50 +01:00
b5a74fe3c7
Merge commit '02cc370855e543e64e34388c99fb439d206323ae'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/protocol/StartGamePacket.php
2020-05-20 19:56:38 +01:00
72761503cd
Merge commit '0a5d14a840a03564dcbc1d97deb91a92a00477b0'
...
# Conflicts:
# resources/vanilla
2020-05-20 19:53:23 +01:00
570a709059
Merge commit '3ec2994d7f05f30e2519430379ae0f3106be5074'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
2020-05-20 19:52:03 +01:00
3bb53658da
Do not allow remote clients to spawn themselves before we're ready
...
this would have allowed clients to send SetLocalPlayerAsInitializedPacket at any time during the spawn sequence, which would have caused undefined behaviour around spawning logic.
2020-05-20 11:09:27 +01:00
82e257cf13
BUILDING.md: Fixed wrong instruction of running from source ( #3512 )
2020-05-19 22:44:57 +01:00
b09379151a
MainLogger: fix exception messages always reporting ErrorTypeToStringMap source if they have non-zero code
2020-05-19 22:43:44 +01:00
3f1f135a59
remove a couple more Position->getWorld() usages
2020-05-19 21:38:51 +01:00
81dff6d4c5
Merge branch 'next-minor'
2020-05-19 21:32:44 +01:00
5b7a55660f
Merge commit '786f416f2ef31726b9e6fa0a5edde36aecddf085'
...
# Conflicts:
# resources/vanilla
# src/plugin/PluginBase.php
# src/utils/Utils.php
2020-05-19 21:19:44 +01:00
5b82bd4fad
Merge commit 'a67d2ae978ecae234c3e46b5ac0f8f0dc99e85a7'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/item/Bow.php
2020-05-19 21:15:56 +01:00
45ec4645d2
Merge commit '089180fef4534b383a31a9d560a76bfaf0d16c6b'
...
# Conflicts:
# resources/vanilla
# src/entity/Living.php
2020-05-19 21:14:54 +01:00
337addf1de
Eradicate remaining usages of public Position->world field
...
and as an added bonus, ditch a bunch of extra phpstan errors
2020-05-19 19:14:56 +01:00
8a8b1b0b97
Remove Position->setWorld()
2020-05-19 18:33:16 +01:00
148228e360
update pocketmine/math, adapt to add() changes
2020-05-19 12:26:18 +01:00
f0fefecf40
updated l7 and l8 baselines for master
2020-05-18 20:36:50 +01:00
55f8314fa7
Merge branch 'next-minor'
...
# Conflicts:
# resources/vanilla
2020-05-18 20:33:22 +01:00
232ff838db
Merge commit '22b5de09b476a8c1638adfaba56b210c1eb1faf0'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/particle/InstantEnchantParticle.php
# src/world/sound/ExplodeSound.php
2020-05-18 20:30:00 +01:00
ba0dcdb722
Merge commit '71a8b0340c303a4d2c024ad5a0a558c5e52694e7'
...
# Conflicts:
# resources/vanilla
2020-05-18 20:18:47 +01:00
22425551ed
separate default attribute creation from Attribute into AttributeMap
2020-05-18 18:12:04 +01:00
07f979fbde
RuntimeBlockMapping: bedrockKnownStates is never null
2020-05-18 17:54:27 +01:00
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
e96b082a54
RegistryTrait: fixing use of method that doesn't belong to the trait
2020-05-18 11:40:02 +01:00
a91e895781
Merge branch 'next-minor'
...
# Conflicts:
# resources/vanilla
# src/VersionInfo.php
2020-05-18 10:54:39 +01:00
ca0d92ac59
Merge commit '1fb0ba6fc051a3052bf6ef8a84db31f85cfd4313'
2020-05-18 10:52:44 +01:00
dec500bbdd
Merge commit '9ebd6d6b0fee486e1cb935cc7b5376d27ca99fd4'
...
# Conflicts:
# resources/vanilla
2020-05-18 10:48:58 +01:00
58fb185e05
Merge commit '58e32086c04d6622c01f59d0cd7216bd8a50eddb'
...
# Conflicts:
# resources/vanilla
# src/world/World.php
2020-05-18 10:47:37 +01:00
3c367c70cd
update build/php submodule to pmmp/php-build-scripts@8084604600
2020-05-18 10:44:29 +01:00
af253d196d
Merge commit 'f1d378468ecccb7bb03ed5d4e5729558c2beda3c'
2020-05-18 10:42:16 +01:00
0e7a822553
Merge commit '25fb5140a2dba99c5e076849ac11e051a2970807'
2020-05-18 10:40:07 +01:00
8d49bc93e0
Merge commit 'f5a49b6d55940584a6a4e9cdbc456c581182b5fd'
...
# Conflicts:
# resources/vanilla
2020-05-18 10:35:23 +01:00
fb58959d5f
Merge commit '189f12a644aa6474bc91650cce0eb0ae9735db91'
...
# Conflicts:
# resources/vanilla
2020-05-18 10:34:00 +01:00
eeec775ff6
Merge commit '5a8917f6f21205d074ce3e9d2f9325e427f9d254'
...
# Conflicts:
# resources/vanilla
2020-05-18 10:32:20 +01:00
4520660025
Merge commit 'f3e436592a180c8d4fbcd346a97abdd746056c38'
...
# Conflicts:
# resources/vanilla
2020-05-18 10:30:55 +01:00
38d67620f6
Merge commit '35747874f6b9b0a35ad06ec4919df5956e6b8e91'
2020-05-18 10:29:45 +01:00
76d41e7695
Merge commit '59445902b8c1fbd2bd738c69132d8a4dac3d6c5f'
2020-05-18 10:29:31 +01:00
3795a13683
Merge commit '2eb62c85f69ebd22b36f29cfb513a579ea570b0c'
...
# Conflicts:
# resources/vanilla
# src/Server.php
2020-05-18 10:29:06 +01:00
d6b03e03bf
Merge commit 'ad2a39bf13e7ed6a84a7973aed686eba2d70e417'
2020-05-18 10:27:14 +01:00
65f82f5cdf
Task::onRun() and Task::onCancel() now require :void return typehints
2020-05-17 13:58:01 +01:00
b3454b3488
BiomeArray: check lower bounds in ::idx() as well as upper bounds
2020-05-16 18:42:47 +01:00
ae6a7b7cc9
imports cleanup
2020-05-16 18:42:08 +01:00
88715c7055
extracted a HeightArray type from Chunk
2020-05-16 18:41:27 +01:00
a31240f60b
FastChunkSerializer: added constants for internal flags
2020-05-16 18:06:00 +01:00
82d361d75f
extract a BiomeArray unit from Chunk
...
this now also properly validates data read from disk.
2020-05-16 17:36:22 +01:00
c30dd9f1b6
Entity: add abstract getNetworkTypeId(), remove NETWORK_ID constant
...
this now requires that subclasses supply a proper NETWORK_ID.
2020-05-16 16:08:12 +01:00
67666db827
Task: Remove currentTick parameter ( #3498 )
...
This parameter is not used for the vast majority of task use cases and just serves as extra useless boilerplate code, especially for closure-based tasks.
This use case can be replaced using Server->getTick() in the cases where it matters.
2020-05-16 15:28:45 +01:00
38e28f91e8
PermissionParser: move default string mappings to const array instead of switch
...
this allows them to be used for validation in stuff like Respect In() rule.
2020-05-16 11:26:00 +01:00
3fb34ad18e
remove particle/validator dependency, require respect/validation, close #3228
...
this fixes a few crashes that could appear from invalid plugin_list.yml setups, which was the reason #3228 was opened to begin with. Respect also has nicer error messages, as long as you don't use the static API :)
2020-05-15 22:57:38 +01:00
129a7c1b3e
LoginPacketHandler: avoid trashing variables in foreach
2020-05-15 11:19:14 +01:00
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
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
4437756987
Inventory: reduce API duplication by using a Set for viewers
2020-05-14 14:13:28 +01:00
3dafee6aa6
NetworkSession: explicitly unregister effect manager hooks on dispose,
...
close #3455
2020-05-14 10:59:10 +01:00
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
955b23cc8e
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
2020-05-14 00:23:36 +01:00
e9ecb9a9fd
fixed build failure
2020-05-13 22:54:24 +01:00
97a4a53e59
added legacy string item mappings that were unknowingly removed
...
these are returned for the sake of backwards compatibility for plugins.
2020-05-13 22:48:08 +01:00
84291e7980
Throw a more specific exception for JWT handling errors
2020-05-13 21:23:04 +01:00
486e0e710b
JwtUtils: fix minor formatting issue
2020-05-13 20:51:24 +01:00
44a7829536
VerifyLoginException: fixed rogue usage in JwtUtils
2020-05-13 20:50:41 +01:00
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
161ac468f3
ProcessLoginTask: properly cater for key parsing errors
2020-05-13 19:23:12 +01:00
bbc249ff0d
Merge branch 'next-minor'
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/VersionInfo.php
2020-05-13 13:54:29 +01:00
1b47970e71
Merge commit 'b0445504754a2f4cd0414e25851718235aeac089'
2020-05-13 13:52:34 +01:00
cc8aed5979
Merge commit '56883f9ff9d2a0934dd3585e565d109ea322f583'
...
# Conflicts:
# resources/vanilla
2020-05-13 13:51:55 +01:00
a37cf6f5b2
Merge commit '7cdd26add5a13b2bb0afcf69b4bd3b8fd87c264c'
2020-05-13 13:49:32 +01:00
4c5fb1371d
Merge commit 'a70fa1569027b5a77979ae513f753e71b4454b05'
2020-05-13 13:48:51 +01:00
fada0d57ce
Merge commit 'bd1d7b8d75976966c5480b18b91e9d8ff176612e'
2020-05-13 13:38:13 +01:00
934f85841c
asserts 👏 are 👏 not 👏 error 👏 checking
2020-05-13 13:37:49 +01:00
8c2878fe5b
Added JwtUtils::parse(), make ProcessLoginTask more robust
2020-05-13 13:36:42 +01:00
c69411c984
Merge commit 'c4150d45207a8681ea1f181c7ee4ca75109a21de'
...
# Conflicts:
# composer.lock
# resources/vanilla
2020-05-13 13:30:31 +01:00
934a18df3c
Merge commit '2f47597d75b514944a2f3f5d293f2fb72dd7fb56'
2020-05-13 13:28:47 +01:00
45f9c61d0f
forward-port of 2f47597d75 as best it fits
2020-05-13 13:28:35 +01:00
84f41153e9
silence another phpstan bug
2020-05-13 00:25:16 +01:00
11ef9fb0c0
Item-from-string parsing no longer depends on ItemIds
...
after this is done I'm banning the constant() function.
2020-05-13 00:18:49 +01:00
ec13aa659a
ItemFactory: do not explode on invalid damage values for durables
...
just treat them as unknown items instead
this might break some use cases, but at least this way they won't crash the server when read from disk and they won't get lost either.
2020-05-12 23:28:17 +01:00
ac4c1c9086
Clean up to SurvivalBlockBreakHandler internals - don't create a handler if it won't be used anyway
2020-05-12 22:45:42 +01:00
144a66c110
cumulative imports cleanup (again)
2020-05-12 22:38:59 +01:00
152da604be
MemoryManager::dumpMemory() should never throw an exception that matters to calling code
2020-05-12 22:37:23 +01:00
3a6cdba281
Implemented server-side block-break FX handling, closes #3485
...
this had been planned for a long time already, just never finished.
It's not fully done, because there needs to be synchronization of block-break handlers between different players attempting to break the same block, but this should resolve a lot of the bugs that previously existed, while also opening the doors to making the logic more flexible.
2020-05-11 21:16:30 +01:00
24b63d71ab
updated DevTools submodule
2020-05-11 19:30:52 +01:00
3238b4ff33
Remove PluginIdentifiableCommand in favour of a more generic PluginOwned interface
2020-05-11 19:25:52 +01:00
6b037d6a4c
RuntimeBlockMapping: these IDs are not static any more
2020-05-11 12:40:55 +01:00
e3dec95b75
Convert AsyncPool tests into PHPUnit tests
2020-05-11 11:34:50 +01:00
b7cf4f01f9
remove utils\UUID, switch to pocketmine/uuid package
2020-05-11 10:46:48 +01:00
cb33f408a1
updated pocketmine/spl to get rid of ErrorUtils
2020-05-10 13:08:48 +01:00
3299bc4023
start using pocketmine/errorhandler
2020-05-10 13:04:40 +01:00
65e359584e
Updated RakLib to pmmp/RakLib@12153dc
2020-05-10 11:59:03 +01:00
8efe7fcfb0
World: allow configuring blocks-per-tick for random updating
...
this makes it much easier to observe and debug stuff that depends on it, such as grass, crop and tree growth, since they'll happen much faster.
A future improvement would be to have the update function use a non-global random so that the output can be reproduced using a given seed.
2020-05-10 11:50:31 +01:00
a6c35cab9a
JwtUtils: fix phpstan failure
2020-05-06 22:00:11 +01:00
0b6d6306cf
LoginPacket: fixed error handling edge case with malformed chain data JSON
2020-05-06 21:46:35 +01:00
ed757c7207
consolidate some JWT handling into one class
2020-05-06 21:32:22 +01:00
5d154e43a9
LoginPacket: removed an old hack that's no longer used
2020-05-06 21:18:05 +01:00
a92580b993
StartGamePacket: remove unused imports
2020-05-06 21:14:57 +01:00
acd37b95b8
Merge branch 'next-minor'
2020-05-06 20:41:48 +01:00
88c6dcf46d
ChunkCache: clean up handling of cache cleanup on world unload
2020-05-06 13:41:36 +01:00
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
ff53ddd3ad
PrepareEncryptionTask: fix wrongly-specified nullability of serverPrivateKey
2020-05-06 13:29:58 +01:00
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
218f32f5b8
De-duplicate code used by legacy <-> string ID mapping classes
2020-05-06 13:15:54 +01:00
dbd51610c3
TypeConverter: use SingletonTrait
2020-05-05 19:22:20 +01:00
9cf410d484
Player: fixed broken behaviour of entity spawning on chunk send, closes #3355
2020-05-05 18:55:13 +01:00
c2b438ccb6
git you need to stop doing this to me REEEEEEEEEEEEEEEEEEEEEEE
2020-05-04 14:30:01 +01:00
81f982a8d9
remove hardcoded legacy entity type ID mapping, load from resources instead
2020-05-04 13:47:39 +01:00
f0dfa45172
phpstorm fixing EOF newlines that phpstorm screwed up
2020-05-04 13:46:20 +01:00
ba6fb87280
remove unused imports
2020-05-04 13:27:31 +01:00
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
0eec536f97
Spawnable: remove unused field
2020-05-04 13:10:23 +01:00
a73c54bdd0
making tile spawn compound cache use CacheableNbt instead of strings
2020-05-04 12:35:13 +01:00
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
53a33e8c20
World: remove unused import
...
we're getting so close !!!
2020-05-04 11:58:57 +01:00
d3dcb8a4e3
moving entity attack sounds to server-side
2020-05-04 11:50:42 +01:00
d40152e3bb
World: fix time sync
2020-05-04 11:23:44 +01:00
aac017eae4
World: drop unused and very misleadingly named addChunkPacket()
2020-05-04 10:22:39 +01:00
c490bc5a8c
World: drop global packet broadcast
2020-05-04 02:31:19 +01:00
b1021315b0
World: remove protocol-specialized broadcastLevelEvent()
2020-05-04 02:28:34 +01:00
f34753c496
CallbackInventoryListener: fix crash when any of the callbacks isn't provided
2020-05-03 21:48:32 +01:00
6e6fffa461
Inventory: added removeAllListeners()
...
this isn't strictly necessary because it could be done by removeListeners(...getListeners()), but I think developers will appreciate not needing so much boilerplate code.
2020-05-03 21:44:45 +01:00
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
9615186afd
rename PunchBlockParticle -> BlockPunchParticle
2020-05-01 12:36:31 +01:00
2964a4be35
making BlockPunchSound server-controlled
2020-05-01 12:23:00 +01:00
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
6f38031121
Liquid: do not schedule delayed blockupdate when hardening occurs on nearby blockupdate
...
fix #3390
fix #3392
2020-04-30 09:35:55 +01:00
b74f177958
ChunkCache: destroy cache when world is unloaded
2020-04-29 18:50:33 +01:00
3ce9a4801f
World: allow registering unload hooks
...
this will be used for cache management when worlds get unloaded.
2020-04-29 18:48:16 +01:00
bb11cbd89c
World: relocate packet stuff for time and difficulty behind NetworkSession API
2020-04-29 18:31:54 +01:00
c8c0a1533c
NetworkSession: seal up actor removal behind API
2020-04-29 17:00:47 +01:00
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
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
d1b28ce17a
NetworkSession: allow sending an arbitrary set of attributes for an entity
2020-04-29 16:45:09 +01:00
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
f35b7bf80b
NetworkBinaryStream: remove stale @throws from getAttributeList()
2020-04-29 16:32:56 +01:00
ad70a9e3dc
NetworkSession: allow provision of a custom list of players to syncPlayerList()
2020-04-29 16:27:34 +01:00
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
1122f2a29f
phpstorm can't infer these types :(
2020-04-29 13:26:49 +01:00
549940d8a7
remove NullPacketHandler
...
this is a waste of LOC
2020-04-29 13:14:23 +01:00
b6214744d5
NetworkSession: inject PacketPool instead of hardcoding it
...
this will make it slightly easier for multi version implementations, but handlers are still quite a big problem.
2020-04-29 12:48:28 +01:00
09e994a026
NetworkBinaryStream: swap BadPacketException for PacketDecodeException
2020-04-29 11:39:44 +01:00
098a5518a6
phpstan: ignore another trait override bug
2020-04-29 11:35:12 +01:00
f6f1d31112
do not mess with cached data directly in packets
2020-04-29 11:34:25 +01:00
aa57d05e12
update to a non-broken build of RakLib
2020-04-29 10:36:28 +01:00
8093a94e5d
do not hardcode data deserialization into CraftingManager
2020-04-28 18:56:27 +01:00
f9a587d40e
imports cleanup
2020-04-28 17:27:38 +01:00
81044d6aea
updated to latest RakLib
2020-04-28 16:30:29 +01:00
3be9548b1e
net: compressors are now fully dynamic (or at least the potential to be)
...
the compressor used by RakLibInterface when opening a session is still
hardcoded, but that's because we have no way to select the correct
compressor at that point in the login sequence, since we aren't
propagating the protocol information up from RakLib right now.
2020-04-28 16:21:18 +01:00
d9e4783b24
start making network compressors dynamic
...
this will facilitate future multi version support where compression types are different between versions
2020-04-28 14:47:01 +01:00
fe258740e3
SingletonTrait: added setInstance()
2020-04-28 14:31:56 +01:00
a97cafd4f6
moving serializers into protocol namespace
2020-04-27 13:54:39 +01:00
0397204c68
network/mcpe: imports cleanup
2020-04-27 12:56:28 +01:00
15c744b0d7
protocol: specialize exception used for bad packets
2020-04-27 12:55:00 +01:00
f91e2f41e0
move SendUsageTask to stats namespace
...
maybe separate this out into a library?
2020-04-26 11:42:48 +01:00
ac5cf2443e
convert TileFactory to singleton
2020-04-26 01:11:30 +01:00
2d55b2db1b
Merge branch 'next-minor'
2020-04-26 00:38:20 +01:00
2a4d936fd4
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2020-04-25 12:36:24 +01:00
040fdc2875
Merge commit '8e1b3ed'
...
# Conflicts:
# phpstan.neon.dist
# resources/vanilla
# tests/phpstan/configs/phpstan-bugs.neon
# tests/phpstan/configs/phpunit-wiring-tests.neon
# tests/phpstan/configs/pthreads-bugs.neon
# tests/phpstan/configs/runtime-type-checks.neon
2020-04-25 12:35:30 +01:00
bb8ef3ff6d
Merge commit 'da9731e'
...
# Conflicts:
# phpstan.neon.dist
# resources/vanilla
# src/PocketMine.php
2020-04-25 12:20:23 +01:00
45bed454f2
Merge commit '3d2ca45'
2020-04-25 12:14:45 +01:00
a178a14732
Merge commit '34a3e0d'
2020-04-25 12:13:03 +01:00
d3da485278
fix phpstan analyze failure
2020-04-25 10:43:06 +01:00
b1eff87ad1
fix incorrect conversion of CreateItemAction, close #3436 ( #3437 )
2020-04-25 10:21:40 +01:00
1f7f33d35d
NetworkSession: privatise setAuthenticationStatus()
...
this is accessed via a closure proxy, so it doesn't need to be exported anymore.
2020-04-25 03:33:44 +01:00
80680f15f4
seal up resource pack completion callback visibility
2020-04-25 03:31:13 +01:00
6dd31cc3f5
break cycle between block and inventory packages
2020-04-24 23:53:49 +01:00
4fbf4dcdc6
Rename InventoryChangeListener -> InventoryListener
2020-04-24 23:44:38 +01:00
c869a7f099
HandshakePacketHandler no longer depends on NetworkSession
2020-04-24 23:18:29 +01:00
7d9df6af6f
Convert EntityFactory to singleton
2020-04-24 22:43:02 +01:00
a75241ef03
RuntimeBlockMapping: use SingletonTrait
2020-04-24 21:32:47 +01:00
3a42c21cc1
wrap up block_id_map in a class
2020-04-24 21:28:27 +01:00
1df345ba6f
tools/convert-world: do not redefine RESOURCE_PATH
...
this is now defined automatically when including the autoloader.
2020-04-24 20:55:57 +01:00
ff915b829c
StartGamePacket: remove hardcoded cache, move to RuntimeBlockMapping
2020-04-24 20:50:56 +01:00
287bf4274f
move RuntimeBlockMapping to convert package
2020-04-24 12:42:43 +01:00
08ac6a3c43
Convert CreativeInventory to singleton
2020-04-24 00:38:18 +01:00
5cc03775d3
added a SingletonTrait to reduce code duplication
2020-04-24 00:31:55 +01:00
a5441e009d
remove "resource/" suffixed to DiskResourceProvider::$file ( #3433 )
2020-04-24 00:21:00 +01:00
5a94af40e2
Convert ItemFactory to singleton
2020-04-24 00:18:31 +01:00
13d784cd0c
Convert BlockFactory to singleton
2020-04-23 23:45:13 +01:00
accc0da0cb
Chunk no longer depends on BlockFactory
...
really this light population crap shouldn't be in the chunk to begin with, but that's a bit more complicated.
2020-04-23 21:31:28 +01:00
aa1828aa98
RuntimeBlockMapping is now a singleton instead of static class
...
this prepares for a fully dynamic block mapper, as well as allowing a small performance improvement to chunk encoding by eliding the constant lazy-init checks.
2020-04-23 21:09:58 +01:00
f3fed60d57
crafting: ditch MultiRecipe, it's a network-only thing
...
MultiRecipes are really nothing more than feature toggles at the network layer, and they don't belong in the main core code.
2020-04-23 19:45:59 +01:00
b2636161f7
PrepareEncryptionTask: move a bunch of stuff out of the AsyncTask class
2020-04-23 16:27:49 +01:00
095a21ea5a
PacketPool is now non-static
...
this allows greater flexibility for customisation, and will facilitate future multi version support.
2020-04-23 16:11:47 +01:00
f3d7c320a1
move SkinAdapter stuff to convert package
2020-04-23 15:46:37 +01:00
ebcfab4b61
NetworkInventoryAction: move type translation to TypeConverter
2020-04-23 15:40:23 +01:00
33f899f2fc
protocol: imports cleanup
2020-04-23 15:38:17 +01:00
1b26cf1df9
break the hard cycle between mcpe\handler and mcpe\protocol
...
preparing to move mcpe\protocol to a separate library
2020-04-23 15:38:11 +01:00
18d48869a0
the great airgapping of recipes and itemstacks
2020-04-23 14:11:48 +01:00
843993f02b
Throw a specific exception for zlib decompression failure
2020-04-22 13:45:29 +01:00
35d656c6e5
ProcessLoginTask no longer depends on NetworkSession
2020-04-22 13:30:37 +01:00
dd37d286f0
use a dedicated exception class for throwing exceptions on decrypt failure
2020-04-22 09:40:26 +01:00
5a33dbd4c6
Player: drop isAdmin from kick(), closes #3275
2020-04-19 18:27:37 +01:00
67247b2e81
fix make-release
2020-04-19 13:53:06 +01:00
766a2178a0
Merge branch 'next-minor'
...
# Conflicts:
# composer.lock
# resources/vanilla
2020-04-19 12:56:44 +01:00
c6d6afe65e
bring RakLibInterface up to speed with latest RakLib
2020-04-19 12:27:44 +01:00
c097188a97
Merge branch 'next-minor'
...
# Conflicts:
# composer.json
# composer.lock
# resources/vanilla
2020-04-19 12:22:39 +01:00
86f67445c6
fix merge error
2020-04-19 11:19:06 +01:00
163c3855eb
Merge branch 'next-minor'
...
# Conflicts:
# resources/vanilla
# src/plugin/PluginBase.php
# src/plugin/PluginDescription.php
# src/pocketmine/Player.php
# src/pocketmine/network/rcon/RCON.php
# src/pocketmine/network/rcon/RCONInstance.php
# src/pocketmine/scheduler/AsyncTask.php
# src/pocketmine/tile/Spawnable.php
# src/scheduler/AsyncPool.php
# src/utils/Config.php
# src/utils/Timezone.php
# src/utils/UUID.php
# src/utils/Utils.php
# src/world/format/io/region/RegionLoader.php
2020-04-19 11:13:41 +01:00
86e051b7bf
Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'
2020-04-18 17:33:05 +01:00
49a71ff4f8
Merge commit '6422ed7'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/RakLibInterface.php
2020-04-18 13:55:35 +01:00
d4594d6114
Merge commit '06a9c98'
...
# Conflicts:
# resources/vanilla
2020-04-18 13:48:26 +01:00
9bfc1df486
Merge branch 'stable'
2020-04-18 13:19:31 +01:00
ab62a792e1
Merge commit '7a072931d'
2020-04-18 12:10:02 +01:00
35be36961d
Merge tag '3.11.7'
2020-04-18 11:29:47 +01:00
3d3a487422
PrepareEncryptionTask: remove cyclic dependency on NetworkSession
2020-04-18 11:25:29 +01:00
e86c243db5
NetworkSession: do not expose setPlayerInfo()
2020-04-16 01:55:52 +01:00
9ba47f90d1
LoginPacketHandler: account for failure to correctly parse UUID
...
this will still crash in some circumstances, pending merging bug fixes from stable.
2020-04-16 01:45:00 +01:00
d3a6da1b3a
NetworkSession->getPing() now returns null when no measurement of ping has yet been completed
2020-04-04 23:33:30 +01:00
1d9cb174b6
updated RakLib dependency
2020-04-04 23:30:55 +01:00
f5bf93455a
update to latest RakLib
2020-04-01 20:16:21 +01:00
f5cd87ac95
MainLogger: implement BufferedLogger
2020-04-01 20:09:42 +01:00
64d5320ac9
update for pthreads-free raklib
2020-03-31 19:41:37 +01:00
37701267f0
Merge branch 'stable'
2020-03-31 19:40:54 +01:00
00cc2ee092
one more RakLib update for the day ...
2020-03-30 00:22:45 +01:00
927872ce08
Updated to latest bleeding-edge RakLib
2020-03-29 23:53:00 +01:00
abd1ed7352
RakLibServer: make onRun() protected
2020-03-29 18:45:48 +01:00
d89cdfc18e
Relieve RakLibServer of more responsibilities
...
at this point it's really not much more than just a thread-safe way to transmit parameters from main to thread. Maybe we can ditch it in favour of a generic closure-based thread implementation.
2020-03-29 18:42:15 +01:00
4e54e54421
Updated RakLib dependency
2020-03-29 18:18:39 +01:00
f779881b6a
Updated to latest RakLib bleeding edge
...
this version brings quite a few inter-thread communication improvements.
2020-03-29 16:52:36 +01:00
eb7c31d3ff
RakLibInterface: remove useless shutdown check from tick()
...
the thread should never be shutdown during an update cycle, because we stop the interface from being ticked when it gets shutdown.
2020-03-29 16:26:22 +01:00
2e75594c34
updated RakLib dependency
2020-03-28 13:28:12 +00:00
641dfe6892
Merge remote-tracking branch 'origin/stable'
2020-03-28 13:27:48 +00:00
0691a40204
UpdateBlockPropertiesPacket: expose nbt field
2020-03-24 11:06:58 +00:00
da7ff9b1fe
Airgap Attribute, fix decoding of non-registered attributes for protocol debugging
2020-03-24 00:43:44 +00:00
83a3adecff
LoginPacket: use netresearch/jsonmapper for login data decoding
...
this makes retrieval static analysis friendly without extra steps.
2020-03-23 22:00:13 +00:00
3e5d3a646b
Make use of BadPacketException::wrap()
2020-03-23 21:28:38 +00:00
2d46ae4476
Added BadPacketException::wrap()
2020-03-23 21:27:08 +00:00
a95426c373
Merge branch 'stable'
2020-03-18 13:17:38 +00:00
af3f22efd6
Merge commit '310de5a2b211d31cf775d42c38a3e70cf251554c'
2020-03-18 13:09:55 +00:00
d930abce2d
ChunkSerializer: improve palette writing performance with one weird trick
...
this optimization relies on the fact that palette entries are always unsigned, and positive zigzag varints are just the same as their non-zigzag counterparts, except shifted left by 1 bit. This eliminates some function call overhead, making the encoding slightly less agonizingly slow.
2020-03-17 21:16:43 +00:00
093a7c239e
CraftingDataPacket: fix variable name collision
2020-03-14 14:24:50 +00:00
a3edbc31ae
Merge branch 'next-minor'
2020-03-14 14:13:50 +00:00
522ec3f4cd
Merge branch 'next-minor'
2020-03-14 13:33:19 +00:00
7b3c2a3703
Merge commit '3907a2b6ba58fa49022e3e7c8256731dfa2e0d00'
2020-03-14 13:32:35 +00:00
c9e8598510
InGamePacketHandler: do not handle inbound ActorEvents that are not for self
2020-03-13 15:19:32 +00:00
ea9bff6a65
Merge branch 'next-minor'
2020-03-13 15:17:21 +00:00
af53c85e6a
Merge branch 'next-minor'
2020-03-12 11:48:26 +00:00
899d05c6ec
DataPacket: strip some whitespace
2020-03-10 13:06:16 +00:00
ca909ebc1d
Merge branch 'next-minor'
2020-03-10 13:05:37 +00:00
2a97c7032e
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2020-03-09 14:39:02 +00:00
b4b1877ce5
Merge branch 'next-minor'
2020-03-09 14:38:15 +00:00
12e4e92894
Inventory: Pass old item(s) to inventory change listeners, closes #3323 ( #3337 )
2020-03-09 13:52:15 +00:00
995309424e
updated pocketmine/nbt dependency
...
this is going to need work on exception handling, but right now it's so inconsistent that it doesn't matter anyway.
2020-03-04 17:53:37 +00:00
6e39e34c1e
Merge branch 'stable'
2020-03-03 12:35:11 +00:00
2ca10bf84b
Merge branch 'next-minor'
2020-02-27 17:08:59 +00:00
78394a336c
Merge branch 'stable'
2020-02-25 20:45:39 +00:00
5c2ae0257c
DataPacket: inject buffer via parameter instead of class field (packet & stream separation, step 2)
...
this is not complete yet, but the final change (having the binarystream actually come from outside) is a little more disruptive, and some extra changes need to be made. This will grant some sanity in the meantime without breaking too much stuff.
2020-02-25 16:19:11 +00:00
a633e415ef
FastChunkSerializer: use machine endianness for pack() (thanks @Frago9876543210)
...
this is faster due to not having to reverse bytes. Since we don't use this format for persistence, it's OK to use machine byte order for this.
2020-02-25 15:08:53 +00:00
bd00ee5038
Merge branch 'stable'
2020-02-24 22:11:13 +00:00
e279672d45
updated pocketmine/nbt dependency
2020-02-24 22:00:03 +00:00
8a770d837e
Merge branch 'stable'
2020-02-24 20:32:43 +00:00
ce0af8b040
DataPacket now encapsulates NetworkBinaryStream instead of extending it
...
ultimately the goal is to remove the NetworkBinaryStream crap entirely, but this change has most of the same benefits and is less disruptive.
2020-02-24 18:59:54 +00:00
7c2741e4f5
Inventory: eliminate remaining $send parameters
2020-02-23 21:59:51 +00:00
36685001bd
ContainerOpenPacket: fixed entityInv() not initializing x/y/z fields
...
these are written even when not used, so they have to be initialized.
2020-02-23 20:59:53 +00:00
95eddbdd74
InventoryManager: move add/remove logic to separate functions
2020-02-12 17:36:29 +00:00
55e3b9ed91
InventoryManager: avoid feedback loop when closing inventory
2020-02-12 16:35:57 +00:00
b108fb61bf
Inventory: drop $send params from setItem() and clear()
2020-02-12 13:34:35 +00:00
1c06438cbb
Inventory: remove final usage of $send parameter of setItem() and clear()
2020-02-12 13:33:23 +00:00
4014f9a4f2
InventoryManager: be aware of client-side state when syncing slots
...
this eliminates feedback loops during client-initiated slot changes, and also makes it possible to have a SlotChangeAction anonymous from its initiator.
2020-02-11 21:12:18 +00:00
cd71a6204f
Revert "PopulationTask: do not populate light in chunks out of the gate"
...
This reverts commit 42148f0d15 .
2020-02-11 19:43:25 +00:00
42148f0d15
PopulationTask: do not populate light in chunks out of the gate
...
this is a relic from when we needed to store light on disk. Now we can just calculate lighting as-needed instead.
2020-02-11 19:14:01 +00:00
9b6fa8c25b
Merge branch 'stable'
2020-02-11 19:12:39 +00:00
e8bb6b8625
Command: fix output translation regression caused by 4c51f1dda3
2020-02-10 11:42:21 +00:00
7ad44d8403
ChunkRequestTask: do not copy light information when sending chunks
2020-02-09 17:49:15 +00:00
d360439c92
FastChunkSerializer: expose a method to disable lighting serialization
...
this is useful for copies which don't care about lighting, such as chunk sending.
2020-02-09 17:48:30 +00:00
ce42ca958e
InGamePacketHandler: do not execute use-item action if already using item, fixes #3246
...
the useHeldItem() sets the using-item flag back to true immediately after consumeHeldItem() sets it to false, which caused this bug.
stable has the same problem, but the effects don't show due to a well timed MobEquipmentPacket (a happy accident).
2020-02-09 12:13:15 +00:00
4c51f1dda3
Scrap TextContainer, make TranslationContainer immutable
...
TextContainer provided zero real value as a base of TranslationContainer, given that it required its own logic to be handled wherever accepted. As such, it's no better than a simple string.
Removing it also allows fixing an ambiguity when embedding translations inside other translations, allowing it to be made immutable.
2020-02-08 13:38:27 +00:00
2375e9519d
RegionWorldProvider: fix CS
2020-02-08 09:34:22 +00:00
bfdfa4184b
Merge branch 'stable'
2020-02-08 09:33:56 +00:00
17fc49db8a
Player: fix regression in disconnect caused by 66a1134ca1
2020-02-08 09:07:09 +00:00
2e3a9f251f
missed one
2020-02-07 22:17:33 +00:00
2d461251ed
phpstan: ignore more errors reported by strict-rules
2020-02-07 22:14:51 +00:00
66a1134ca1
Player: avoid another empty() usage
2020-02-07 22:13:43 +00:00
ec9ece56f5
Player: fetch world via location
...
this code caters for the possibility of the world being null.
2020-02-07 22:11:14 +00:00
04a3e71047
ChunkSerializer: avoid using loop vars outside loop scope
2020-02-07 22:10:23 +00:00
ee36ac9875
ProcessLoginTask: use strict base64_decode()
2020-02-07 22:09:46 +00:00
bc60bb9462
remove useless type asserts on Entity->getWorld()
2020-02-07 22:08:38 +00:00
85f3dca11b
HandlerListManager: make resolveNearestHandleableParent() a little easier to follow
...
and also sidestep phpstan complaining about using loop vars outside of loop
2020-02-07 22:07:36 +00:00
fd675449e9
BlockFactory: fill blastResistance with float(0)
...
technically there wasn't anything wrong with this code, but it caused the type inference to report incompatibility, and I can't be bothered to report a PHPStan bug.
2020-02-07 22:06:34 +00:00
d2aca6023b
add native return types to closures (for phpstan)
2020-02-07 22:05:15 +00:00
aac7da6c96
eliminate remaining empty() usages
2020-02-07 21:51:50 +00:00
1ffabbb567
fixed ignoreError for registerEvent()
2020-02-07 20:25:08 +00:00
347b94b284
Merge branch 'stable'
2020-02-07 20:18:17 +00:00
3a9e6bb612
CallbackInventoryChangeListener: fix use of tab instead of space
2020-02-07 19:28:43 +00:00
31405f7587
EnumTraitTest: use @doesNotPerformAssertions
2020-02-07 18:35:55 +00:00
31fcd8e5fa
ItemTest: use the proper method to explicitly fail a test
2020-02-07 18:35:26 +00:00
95896eb911
tests/phpunit: fill in some phpstan types
2020-02-07 18:34:57 +00:00
091873ca51
HandlerListManagerTest: fix phpunit 8.x compatibility
2020-02-07 18:14:43 +00:00
5e85705ec8
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2020-02-07 18:14:10 +00:00
fb1126797a
Merge branch 'stable'
2020-02-07 18:13:55 +00:00
93671d8bfe
fixed broken tests from level->world rename
...
how did this not get noticed before ???
2020-02-07 17:22:49 +00:00
4140af459e
travis: cache leveldb artifacts to reduce build time
2020-02-07 14:05:11 +00:00
f713cf25b1
travis: update leveldb version, only build sharedlibs targets on travis
2020-02-07 13:54:22 +00:00
e1eb9186fe
Merge branch 'stable'
2020-02-03 19:57:21 +00:00
092933105a
Merge branch 'stable'
2020-02-02 18:14:51 +00:00
afeb9838e4
Merge branch 'stable'
2020-02-02 16:47:19 +00:00
7cb363d6e7
Merge branch 'stable'
2020-02-01 23:00:07 +00:00
1b50a2d8d4
updated composer dependencies
2020-02-01 22:59:52 +00:00
3df9aaa916
Merge branch 'stable'
2020-02-01 22:19:34 +00:00
80dc0eb8b8
rename BedrockData submodule
2020-02-01 22:14:53 +00:00
d48597ec5d
move BedrockData submodule to resources/
2020-02-01 22:14:24 +00:00
aad1a3400f
Merge branch 'submodule-conflict-stable' into submodule-conflict-master
2020-02-01 22:13:43 +00:00
fed03fd535
Merge branch 'submodule-conflict-stable' into submodule-conflict-master
2020-02-01 22:02:44 +00:00
e3833ba4f0
Merge branch 'stable'
2020-02-01 21:03:21 +00:00
b59dc1ef16
Merge commit 'b11c350b2b0b0cd38114e4240e056c3aa2028707'
...
# Conflicts:
# composer.json
# composer.lock
# resources/vanilla
2020-02-01 21:00:03 +00:00
c19b21db91
Merge commit 'f624e36faf2214fef76ad3b7148c17f7f7ff641f'
2020-02-01 20:59:23 +00:00
e8f31adc02
Merge commit '14ce9c10bb0895974008d415a3fb66ead1ab2361'
2020-02-01 20:55:31 +00:00
54604398f2
Merge commit 'f1083bd9c402c1456f4fc7dce8271c33360dc227'
2020-02-01 20:54:54 +00:00
38b7a9b76b
Merge commit '199fa61aef50ee731bbf08e23616b6087e267992'
2020-02-01 20:54:27 +00:00
356ed5f1de
DyeColor: fix PHP 7.2 compatibility
2020-02-01 20:50:16 +00:00
f02f45f248
Merge commit 'af82a6bbe1e4c37564ce1e0932a8177d31750b7d'
2020-02-01 20:45:16 +00:00
269066b2d0
added unit test for Enum lazy initialization
2020-02-01 20:42:04 +00:00
9c33ea8dd1
EnumTrait: use a better method to initialize enums
...
this method is simpler, and is also safe at the native type level.
Coincidentally, it also eliminates 30 PHPStan false-positives.
2020-02-01 20:33:30 +00:00
cc33c8155f
Language: specify key type for lang and fallbackLang fields
2020-02-01 20:20:39 +00:00
ff63f6d055
fill in more iterable types (master)
2020-02-01 20:19:57 +00:00
200209b76c
RegistryTrait: provide an explicit phpstan type for __callStatic arguments
2020-02-01 17:20:36 +00:00
3688f78986
Merge commit '004f7ef82e9613d60c3614dbf634836b7e2f3774'
2020-01-31 22:09:20 +00:00
c372f27e06
Empty merge of commit '89ebd2b88049d264cfa94543520f3af6e303a071'
2020-01-31 22:08:40 +00:00
89c6da13ac
phpstan: use more class-string
2020-01-31 22:05:33 +00:00
f65bf76fd8
Merge commit '799183e13e61e89cc6820ad3132a4147454017c6'
...
# Conflicts:
# resources/vanilla
# src/Server.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/level/format/io/LevelProviderManager.php
# src/pocketmine/tile/Tile.php
# src/world/generator/GeneratorManager.php
2020-01-31 21:26:40 +00:00
cb16f5c142
Merge commit '260ac47588c76a2e6814cfba46773a990fb8c5da'
...
# Conflicts:
# resources/vanilla
# src/Server.php
# src/lang/Language.php
# src/network/mcpe/protocol/AddItemActorPacket.php
# src/network/mcpe/protocol/AddPlayerPacket.php
# src/network/mcpe/protocol/SetActorDataPacket.php
# src/network/mcpe/serializer/NetworkBinaryStream.php
# src/permission/Permission.php
# src/pocketmine/block/Leaves.php
# src/pocketmine/entity/DataPropertyManager.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/item/Banner.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/io/LevelProvider.php
# src/pocketmine/level/format/io/LevelProviderManager.php
# src/pocketmine/network/mcpe/protocol/AddActorPacket.php
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
# src/pocketmine/tile/Banner.php
# src/scheduler/BulkCurlTask.php
# src/updater/AutoUpdater.php
# src/utils/Config.php
# src/utils/Utils.php
# src/world/generator/Flat.php
# src/world/generator/Generator.php
2020-01-31 21:07:34 +00:00
96ac95798b
Merge commit '4ff4434a220813e446efde4a38e48a0416476dba'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/item/Banner.php
# src/pocketmine/item/Item.php
2020-01-31 20:11:29 +00:00
ee4757303b
Merge commit '9eebfa7cc30c8a5ac39f192c79023131623ad4b4'
...
# Conflicts:
# resources/vanilla
# src/Server.php
# src/pocketmine/Achievement.php
2020-01-31 20:07:21 +00:00
721bd8f02b
Merge commit 'd3021c628134293c2b8af505806efc2fba4fe947'
...
# Conflicts:
# resources/vanilla
2020-01-31 20:03:27 +00:00
3401504bab
Merge commit '9097d6c4d35b05576181f91bda68d316809f28b9'
...
# Conflicts:
# resources/vanilla
2020-01-31 20:02:59 +00:00
3a68f5e3d0
Merge commit 'da43ae82fe3b8839a4d153b0365f815cf9859d77'
...
# Conflicts:
# resources/vanilla
# src/utils/Config.php
# src/utils/Timezone.php
# src/utils/Utils.php
2020-01-31 20:02:39 +00:00
3e80850938
Merge commit '60b405d944254c940f818ebd0b7aa2603d7968a7'
...
# Conflicts:
# resources/vanilla
# src/updater/AutoUpdater.php
2020-01-31 19:55:43 +00:00
1ae7960fc4
Merge commit '92a752053df598e5fe9366601bef070d967374fc'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/tile/Banner.php
# src/pocketmine/tile/Sign.php
# src/pocketmine/tile/Tile.php
2020-01-31 19:50:33 +00:00
9b9b955762
Merge commit '0537c66849b307465159306981bad78ba902f30b'
...
# Conflicts:
# resources/vanilla
# src/scheduler/BulkCurlTask.php
2020-01-31 19:47:59 +00:00
19a6fb35e7
Merge commit 'd94995e161d71659e2fe6ec1df47621f2de4b494'
...
# Conflicts:
# resources/vanilla
2020-01-31 19:46:28 +00:00
b46712fbe9
Merge commit '58bc08838ba18df6361cede4b420d87d5973090a'
...
# Conflicts:
# resources/vanilla
# src/permission/Permission.php
2020-01-31 19:45:31 +00:00
20d39846b7
Merge commit 'fc0619ee6e4fa08aba2719e58a9289edd11f0b6e'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/AddItemActorPacket.php
# src/network/mcpe/protocol/AddPlayerPacket.php
# src/network/mcpe/protocol/SetActorDataPacket.php
# src/network/mcpe/serializer/NetworkBinaryStream.php
# src/pocketmine/network/mcpe/protocol/AddActorPacket.php
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
2020-01-31 19:42:07 +00:00
465d8cda79
Merge commit 'a5764b3ae98a70fe8f20f9b403a4ab84b51b11d8'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/format/io/LevelProvider.php
# src/world/generator/Generator.php
# src/world/generator/GeneratorRegisterTask.php
2020-01-31 19:32:38 +00:00
301460a0ea
Merge commit '8bf469f7fcd428ebc8c3c9b9ab777c79e2824c67'
...
# Conflicts:
# resources/vanilla
# src/lang/Language.php
2020-01-31 19:22:14 +00:00
8262633820
Merge commit '3b9a5c5ccc22170499b686f59ea55e8be231407a'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/item/Item.php
2020-01-31 19:21:03 +00:00
09b24d3c32
Merge commit '4c36ca58e2710c8fd03eec1f50a885fb97fd9b68'
...
# Conflicts:
# resources/vanilla
2020-01-31 19:19:06 +00:00
f66efa1aa2
Merge commit 'a67fa5c007de3a5e7e689c63955849ceba9d7541'
2020-01-31 19:18:35 +00:00
eb6bb1aae1
Merge commit '839a789180cb3acd2e16006afa9b787903ffbbcd'
2020-01-31 19:16:09 +00:00
dedf81a9af
Merge commit 'e61c3e8bf697e5c5c6cddb4843b24279faaf25cb'
2020-01-31 19:12:32 +00:00
25ead18369
Merge commit '7ce6c8aa13bd1e8eb5aa3fe267a0116ab43e9313'
2020-01-31 18:55:49 +00:00
1388a2287a
Merge commit '5c8a625d88e511a6ebad765714b75f1a86dfd37f'
2020-01-31 18:50:23 +00:00
5be45dd793
Merge commit '259f0425a9657befcc8ef5f474ecc24ec78042fa'
2020-01-31 18:43:47 +00:00
86f866de37
Merge commit '9cdea437947ed233feab875b2a6d30a68b8648fe'
2020-01-31 18:21:32 +00:00
9311437d42
Utils: add some phpstan docs to fix analyse failure
...
fuck, I wish we had real generics :(
2020-01-30 12:07:14 +00:00
9492325eef
Merge branch 'stable'
2020-01-29 20:01:30 +00:00
5c4487c980
added some callable prototypes for phpstan
2020-01-29 19:56:16 +00:00
68bea6d4aa
ChunkRequestTask: fix @var for error hook fetch
2020-01-29 19:36:52 +00:00
a604176ac2
Merge branch 'stable'
2020-01-29 16:11:51 +00:00
9a5d3e3d4f
Merge branch 'stable'
2020-01-28 14:35:50 +00:00
f68452a5d9
updated composer deps
2020-01-28 14:28:03 +00:00
ded0f5c80e
network: added some missing native closure return types
2020-01-28 11:10:01 +00:00
85fdb7ec05
CallbackInventoryChangeListener: provide signature information for closures
2020-01-27 18:08:59 +00:00
42014311c5
BrewingStand: added missing void return type
2020-01-27 18:08:08 +00:00
35c23ea89a
com_exception is no longer missing from phpstan stubs
2020-01-27 09:35:27 +00:00
67e54d6fd6
Merge branch 'stable'
2020-01-27 09:34:48 +00:00
588ff8acf6
Merge branch 'stable'
2020-01-25 18:11:02 +00:00
e66197036d
InGamePacketHandler: drop transactions with 0 actions without trying to execute them
...
often we throw out actions that have no value, which can lead to an empty transaction and re-syncing the inventory. This happens every time we interact with the creative inventory in 1.13+, which causes items to appear to vanish when taking them from the creative menu.
The correct fix for this is to resend only the slots affected by SlotChangeActions, but this fix will suffice for now without rewriting everything.
2020-01-25 18:10:37 +00:00
5955ff5393
fix phpdoc spacing screwed up by phpstorm
2020-01-22 15:20:50 +00:00
8efc4d12ec
trim phpdoc lines
2020-01-22 15:18:37 +00:00
0b423c5b96
Merge branch 'stable'
2020-01-22 15:16:10 +00:00
055b13a6cf
strip extra blank lines (php-cs-fixer)
2020-01-22 15:14:10 +00:00
8d7a364b29
Empty merge of 'f624871b3fdd04c983c3d37e42b9862ef8f03b68'
2020-01-22 15:09:03 +00:00
a3bffd375b
master-specific addendum to cd55cdf5c6
2020-01-22 15:07:47 +00:00
cd55cdf5c6
Merge commit '9cd6b3e1c7cd81d0a4b0da68d9b3ff026c9f6495'
2020-01-22 15:04:06 +00:00
4481474d41
Merge commit 'aad1eb5b3e9b2e3b3db968a000e5454152195d7f'
2020-01-22 15:01:46 +00:00
7f06002027
Merge commit 'bff5bf25aea5cf56bbbfaeaa89f5e1f0ac920c90'
2020-01-22 15:00:13 +00:00
1b33143f4f
pass 2, manual removal of incorrect non-nullable phpdoc types
2020-01-22 12:06:47 +00:00
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
4bae3baa74
Empty merge of stable
...
easier to reapply these changes than to resolve conflicts
2020-01-22 10:56:43 +00:00
ccdf003c8d
ResourcePacksPacketHandler: fixed chemistry being applied to top of stack instead of bottom
...
it seems like the stack order is reversed, so all 'regular' in-memory stack behaviour goes out of the window.
2020-01-22 08:26:44 +00:00
757f5b2fbf
Merge branch 'stable'
2020-01-20 18:12:58 +00:00
f44c9adbb0
Merge branch 'stable'
2020-01-20 17:33:43 +00:00
545f04b2c8
Utils: apply phpstan generics to cloneObjectArray()
2020-01-20 17:28:26 +00:00
01016d7e17
Merge branch 'stable'
2020-01-19 19:59:56 +00:00
3ee6887792
populate remaining missing return types, using native returns where possible
...
this is done separately to stable so that stable changes can be integrated easily using an empty merge.
2020-01-19 10:26:35 +00:00
3cf0b50b4a
update pocketmine/log and pocketmine/classloader dependencies
2020-01-19 09:58:40 +00:00
b4e6608e9f
Merge branch 'stable'
2020-01-18 20:13:54 +00:00
df2551ed4d
NetworkSession: add missing return type for syncAttributes()
2020-01-18 20:00:05 +00:00
c0a45083b6
Packet: specify void return type in phpdoc (native return type not possible yet)
2020-01-18 19:58:14 +00:00
2b4ce3ea6d
Merge branch 'stable'
2020-01-18 19:41:17 +00:00
69673e689b
Merge commit '97b618340400a93b6f1d56a138ce607450d31c48'
2020-01-18 18:26:51 +00:00
2c1a0ca076
Merge commit 'c7f1b605f25d6945d4f3eea91492e5701c6292fb'
2020-01-18 18:26:20 +00:00
3317c2a52d
Merge commit 'f069df65a8e2e8461be9ffa76f97911622fa19cf'
2020-01-18 18:25:19 +00:00
799db6efed
Merge commit '1e624e7bb95bee7083dd6fb8f6e94b29e06a2b3a'
2020-01-18 18:24:43 +00:00
0c19b4e4dd
Merge commit 'f16a53084931eaee7f2768071763548a785c8960'
2020-01-18 18:24:12 +00:00
9d42e50ae7
Merge commit '7137b8a8a4aadf9841e99a0a305c3c39b68051b6'
2020-01-18 18:23:38 +00:00
886ac4b788
Merge commit 'ab57914322d8e93790a88604b9bb3046a759da22'
2020-01-18 18:22:57 +00:00
ebce102167
Merge commit '260869c0d5904401178419c99e1f26e32b6ba07e'
2020-01-18 18:22:12 +00:00
835383b3c4
Merge commit '9135877da1e4a859ccc356fb914eca3f4a8f0cb8'
2020-01-18 18:20:33 +00:00
47ceb7fee2
Merge commit '07cb603231d143314c2bb69d6e3ee0dc281523a0'
2020-01-18 18:19:13 +00:00
489a1470dc
Merge commit 'c22576a2668af4fb90d06f11d8b188a40d004832'
2020-01-18 18:16:04 +00:00
987e69bf1b
Merge commit 'bac788fd00f02ca17591c8c34deae420defefc36'
2020-01-18 18:15:26 +00:00
a79021a83a
Merge commit 'f6d96c58276bffe20d2444eeb5f4a638b0d78c02'
2020-01-18 18:15:00 +00:00
48a9e2a7ae
Merge commit '2d2c9379cd482938026d65a6d6df8bcac0af30e9'
2020-01-18 18:14:15 +00:00
cd5b32c5b2
Merge commit '3400771770f820bd0936234d7081b1408afb18a8'
2020-01-18 18:12:40 +00:00
f97bdf64d9
Merge commit 'e12ecaf62960dfc71871520e52787589447346ee'
2020-01-18 18:11:53 +00:00
be821ea15e
Merge commit '1303cbfe02bb6b5d36700f01f6b478a9be760470'
2020-01-18 18:10:32 +00:00
7762b73647
Merge commit 'd9bbab54f4608954a8ac0fffa88c2f32c07669f1'
2020-01-18 18:07:45 +00:00
00869e81ba
NetworkBinaryStream: fix server crash on wrong skindata size, close #3276
2020-01-15 19:48:25 +00:00
a4b810977a
Merge commit '651ef500a3be530f5bf1f72990c711706eab3ca7'
2020-01-13 19:29:38 +00:00
f2f4715d97
Merge commit '30f2e7527818e3275ceb0ff26093c4f26a84c51c'
2020-01-13 19:17:54 +00:00
0e1cea043a
added some phpstan-specific generic type annotations
2020-01-13 15:05:02 +00:00
acaa34785f
Merge commit '2cfc25b4f8f084c155a871934a10cc9010b05f7d'
2020-01-13 11:02:01 +00:00
724ce2a674
Merge commit '5bded9cff86e7814af34b9799953685bdc88240e'
2020-01-13 11:00:45 +00:00
eba246eab3
SignText: provide typeinfo for checkLineIndex
2020-01-11 22:39:42 +00:00
9c06c1a06f
Merge branch 'stable'
2020-01-11 22:36:57 +00:00
56a459ccee
updated composer dependencies
2020-01-11 22:13:07 +00:00
9c8095b0b4
Merge branch 'stable'
2020-01-11 21:51:17 +00:00
96b91af66a
Merge branch 'stable'
2020-01-11 21:41:38 +00:00
43601e57bf
Merge branch 'stable'
2020-01-09 21:08:16 +00:00
05a450df87
Merge branch 'stable'
2020-01-09 20:16:17 +00:00
715a5c55f4
Merge branch 'stable'
2020-01-09 20:02:22 +00:00
16bab02b13
actually use the DisallowEnumComparisonRule (derp)
2020-01-09 17:54:52 +00:00
aba71762e9
master-specific @var annotations
2020-01-09 17:50:01 +00:00
cda1143a79
Merge branch 'stable'
2020-01-09 17:17:42 +00:00
e0ed123236
Merge commit 'cda3e6f4dcc5a642c6c2597b77df7f29ecbb9397'
2020-01-09 16:49:04 +00:00
c73001d65e
Merge commit 'e6a58e269099a7942d157a214beacc6c30f5617d'
2020-01-09 16:46:58 +00:00
220b28dd27
Merge commit '27350c4673dff62eed6d52633f4a0c776fdbd60c'
2020-01-09 15:29:39 +00:00
a733f094ac
phpstan: added a custom rule to disallow strict equality operators on enum members
...
comparing enums with equality operators is unreliable because there is no guarantee that the enum objects won't be somehow duplicated, through serialization, cloning or ext-parallel dumb object copying. This means that two equal enum objects may not be thw same object.
2020-01-08 19:45:05 +00:00
e76cc8eb33
RakLibPacketSender: fixed session leak on server-side disconnect
2020-01-07 11:32:23 +00:00
fde888bf59
Merge commit 'f3550446267f975b33219bdde6aec8fbea614cb2'
2020-01-04 16:36:33 +00:00
40936c42f2
Empty merge of commit '4794ba236a551bd839bbb8565474c19f93d97c30'
2020-01-04 16:26:29 +00:00
305b4007d2
Merge commit '6490a49c702d0a3a9f62ffb915ffa22272f17b08'
...
# Conflicts:
# resources/vanilla
# tests/travis.sh
2020-01-04 16:25:40 +00:00
dd5be9692c
Merge commit '5cd7e11b298a35bf796b41b577c28441e41ff411'
2020-01-04 16:24:29 +00:00
0050e12515
Merge commit '9232f4509c4b74718bce2d8f33ba71ca74b38d97'
...
# Conflicts:
# resources/vanilla
2020-01-04 16:21:31 +00:00
d25e0c3d98
Merge commit 'cef77907c6b21e1fb167bc3085d00a5b1e740813'
...
# Conflicts:
# resources/vanilla
# src/timings/TimingsHandler.php
2020-01-04 16:21:05 +00:00
2cfb7000ae
Empty merge of '06ec8b83978fcc52a7964d678a97c73b50a97aa8'
...
this change has been reverted, so this is just to bring the branches
inline.
2020-01-04 16:18:44 +00:00
cbc6bb29bc
Merge commit 'ee08286ecaf76cd11914c5a3e914093b991c32db'
2020-01-04 12:08:47 +00:00
aaa81fb346
Merge commit 'a83211f96a64167f4334a83b12bef31b4b7d55d2'
2020-01-04 12:00:57 +00:00
9336b963a6
Merge commit '0b3c4ee4964faba76e1880abcf237fe6860f5248'
2020-01-04 12:00:20 +00:00
79aa4959b8
Merge commit 'a9081979071ec8ad56d14474cfbc48b5c60fb440'
2020-01-04 11:28:21 +00:00
9204b11948
phpstan: 0.12.3 fixes for master
2019-12-29 17:55:03 +00:00
cccade9ade
Merge branch 'stable'
2019-12-29 15:31:10 +00:00
6968a4232e
Merge commit 'd83820477fe905a85a4d1fd11bad1dba211f0f4f'
2019-12-25 14:20:38 +00:00
0f718ea28b
Merge commit '8726604899d1a371567141e0831ed570d3233356'
2019-12-25 14:19:35 +00:00
27fa73a4d2
Merge commit '216138a37e52e545abdba5a3600eabbcced867be'
...
# Conflicts:
# resources/vanilla
2019-12-25 13:53:25 +00:00
e845415b17
Merge commit 'b08c38f8f9615e47ae3e5df8267b8986aadabead'
...
# Conflicts:
# resources/vanilla
2019-12-25 13:52:50 +00:00
b6071bff36
Merge commit '911b6feaf927a7dd9f54240d9bf6b0f7684df692'
2019-12-25 13:52:21 +00:00
e214ef0d13
Merge commit '2cb6990698e2575e0b64fef7e5172d9dd9694ff6'
2019-12-25 13:45:33 +00:00
bfc2a9107c
Merge commit 'f7d66613df87f5bd3586daf02922af0a64efdce5'
2019-12-25 13:41:31 +00:00
f7eea9bebb
Merge branch 'stable'
2019-12-13 18:23:01 +00:00
7c15fd6b00
Merge commit '9e1f6a24868823ad06edb6a79d0cb391e637bcb8'
2019-12-13 18:21:57 +00:00
bcc3e20c31
DiskResourceProvider: do not arbitrarily suffix /resources/
2019-12-13 17:58:53 +00:00
81620441a4
CompoundTagMetadataProperty: fix unhandled exception when decoding
2019-12-12 20:27:40 +00:00
0a4a1f634f
Item: fixed possible type violation in jsonDeserialize()
2019-12-12 20:26:26 +00:00
771ccbb727
Server: require a DynamicClassLoader instance
2019-12-12 20:13:51 +00:00
c36377ea5a
Merge branch 'next-minor'
2019-12-12 19:47:12 +00:00
1c6d3cd580
master: green on phpstan level 4
2019-12-12 15:25:15 +00:00
6ace4733ce
DataPacket: fixed var_dump() buffer bin2hex not working
...
in BinaryUtils new versions, BinaryStream->buffer is private.
detected by phpstan level 4
2019-12-12 15:02:42 +00:00
9a31cbf5ef
ChunkCache: fixed possible undefined offset crash in restartPendingRequest()
2019-12-12 13:55:30 +00:00
137245ed7b
ItemFactory: fix var type doc in get()
2019-12-12 13:54:44 +00:00
89458660cf
VanillaEffects: return null instead of throwing on invalid effect ID
...
we don't expect plugin devs to be using this any more, and it doesn't make sense to throw on data deserialize. This throw was unchecked and a potential server crash might have occurred in Living on data load.
2019-12-12 13:54:05 +00:00
a9c09e4517
Merge branch 'next-minor'
2019-12-12 13:52:14 +00:00
6935030e0c
entity: use 0 for no-target a la vanilla 1.13, fix player arms bug
...
I have no idea why this was changed, -1 is still used for every other property, but packet traces confirm this is correct.
2019-12-12 00:20:09 +00:00
80917692c1
Merge branch 'stable'
2019-12-11 23:37:36 +00:00
a1610500e9
Merge tag '3.11.1'
2019-12-11 23:35:20 +00:00
c926674d07
Merge commit '95683642774b1896c5de6f09dd528c1d3766d04d'
2019-12-11 23:26:40 +00:00
4651bcf8c3
master: imports cleanup
...
it was easier to make an empty merge and re-run php-cs-fixer afterwards.
2019-12-11 23:23:03 +00:00
62f9991e17
Merge commit '73d4ff6b52189c0a15ea7a2c9bd57af178d234f2'
2019-12-11 23:18:00 +00:00
19f75768ed
Merge commit '1a99938e4b5af0295e449379dbdb0a3ffe703efd'
2019-12-11 23:15:48 +00:00
2714c7ab59
Merge tag '3.10.1'
...
it looks like the changes were already integrated by the previous merge,
which I screwed up with a stash.
2019-12-11 23:13:02 +00:00
c85c1c3c3f
Merge commit '82d9e481d2a0a389fbbc6dfd3672fc366127febc'
2019-12-11 23:06:35 +00:00
0e1321933f
ScriptCustomEventPacket: added missing interfaces
2019-12-10 10:41:36 +00:00
97866cd8f6
updated RakLib dependency
2019-12-09 11:27:00 +00:00
3fa628f259
updated NBT dependency
2019-12-09 11:26:43 +00:00
ab628d0254
Merge tag '3.9.8'
2019-12-08 17:49:39 +00:00
705228f427
Chunk: remove useless field defaults
2019-12-08 11:08:07 +00:00
6b21f160bd
Chunk: fix type docs for NBTentities and NBTtiles
2019-12-08 11:07:14 +00:00
af6cb605c5
Chunk: fix data loss caused by d3d7709ead
2019-12-08 11:02:40 +00:00
ff5aedaf6b
master: green on phpstan level 3
2019-12-05 14:35:02 +00:00
a5e8419d5b
Merge branch 'next-minor'
...
# Conflicts:
# phpstan.neon.dist
# resources/vanilla
# src/item/WritableBookBase.php
# src/pocketmine/metadata/MetadataStore.php
# src/world/Position.php
2019-12-05 14:11:59 +00:00
7d89f91fea
Leaves: fixed decay
...
detected by phpstan level 4
2019-12-04 23:21:01 +00:00
48e2473696
Position: mark world field as nullable (equivalent to 39c607cbd5)
2019-12-04 22:58:55 +00:00
59793d4b68
Player: mark networkSession field as nullable
...
while we do null this to break cycles, we also null it for other purposes, and it's null-checked in a few places.
2019-12-04 22:54:04 +00:00
fb78ec1f62
AsyncTask: mark threadLocalStorage static field as nullable
2019-12-04 22:50:30 +00:00
908aa20eff
EntityFactory: fixed type doc of knownEntities
2019-12-04 22:49:25 +00:00
0e3ce7ff39
Merge branch 'next-minor'
2019-12-04 19:59:57 +00:00
b43bd5fb67
PluginCommand: separate CommandExecutor param
...
looking at the code now it's clear that this class combines two jobs into the same class.
closes #3203
2019-12-04 19:14:52 +00:00
2ff25dfbd2
Color: make mix() first parameter mandatory, closes #3204
2019-12-04 18:39:14 +00:00
60154d8127
SubChunkIteratorManager: assert type of subchunk to make PHPStan happy
...
we know this should be a SubChunk, even though it doesn't.
2019-12-04 18:26:18 +00:00
e35a92d8e8
tile\Banner: fixed bad default value for patterns field
...
detected by PHPStan on level 3
2019-12-04 18:25:08 +00:00
850dbb38c6
phpstan-bugs: remove false positive that is fixed in 0.12.0
2019-12-04 11:38:01 +00:00
c0ea871599
updated rules for master on PHPStan 0.12
2019-12-04 11:35:57 +00:00
117e46f639
LevelDB: fix doc comment handling for deserializeLegacyExtraData()
2019-12-04 11:29:41 +00:00
66aa940ed1
Item: fixed foreach doc comment in deserializeCompoundTag()
...
detected by PHPStan 0.12.0
2019-12-04 11:28:59 +00:00
dc5d985cf4
Merge branch 'next-minor'
2019-12-04 11:23:30 +00:00
f302517a2d
Door: fix deserialization of top flag
...
it's not clear what bugs this caused, if any, but nonetheless it is incorrect.
2019-12-03 21:04:04 +00:00
962e6162eb
Merge branch 'next-minor'
2019-12-03 20:00:08 +00:00
29ce829247
fix error counts for UPnP
2019-12-03 17:45:23 +00:00
5b91be81cc
Entity: rewrite dbbe1f2d5c for master
2019-12-03 12:16:10 +00:00
54c2778e56
phpstan: update split configs for master branch
2019-12-03 12:08:56 +00:00
5f9ce78814
WorldProviderManager: removed incorrect param doc
...
this was used to trick phpstorm, but PHPStan doesn't like it, and it isn't consistently used anyway.
2019-12-03 12:08:04 +00:00
fede6b8234
protocol: fixed static analysis warnings in MetadataProperty::equals() implementations
2019-12-03 12:06:57 +00:00
e110ea5aea
LoginPacket: fixed param doc for validate()
2019-12-03 11:59:28 +00:00
d3d7709ead
Merge branch 'next-minor'
2019-12-03 11:55:45 +00:00
02c1dabc3d
update pocketmine/nbt dependency
2019-12-02 19:24:00 +00:00
0bff5d9bff
sync composer deps
2019-11-29 20:20:13 +00:00
994781494f
Merge branch 'next-minor'
2019-11-29 12:06:27 +00:00
8ee3d4486a
update build/php submodule to pmmp/php-build-scripts@7e985c932a
2019-11-29 11:56:36 +00:00
7276eda0e5
Moved SetTitlePacket usage to NetworkSession ( #3186 )
2019-11-09 19:56:06 +00:00
92700b2e18
phpstan.neon: remove error patterns that don't occur on 4.0
2019-11-09 18:10:53 +00:00
c16337a80f
Merge branch 'stable' with changes
2019-11-09 18:01:04 +00:00
cbef2bbc51
move ThreadException to pocketmine\thread namespace
2019-10-29 12:42:38 +00:00
2e446e4df3
added pocketmine/classloader dependency (extracted from pocketmine/spl)
2019-10-28 12:29:48 +00:00
c8cf329c94
Plugin::getLogger() interface no longer depends on PluginLogger ( #3160 )
...
The Plugin contract now typehints the relied on AttachableLogger contract rather than the concrete PluginLogger implementation.
2019-10-24 20:26:42 +01:00
46e005543f
update pocketmine/log
2019-10-24 19:49:53 +01:00
0a751857cc
added pocketmine/log dependency
2019-10-24 19:39:58 +01:00
e4d2a4d911
canary: update build/php submodule
2019-10-24 13:30:05 +01:00
466580197d
Merge branch 'stable'
2019-10-24 13:29:44 +01:00
15762b03f8
EntityMetadataCollection: fixed wrong parameter doc type on set()
2019-10-24 13:27:38 +01:00
ec13cd695d
travis: use ds 1.2.9
2019-10-24 13:19:29 +01:00
dbc4f84bcb
travis: add igbinary
2019-10-24 13:18:42 +01:00
043f1a5577
ext-igbinary is mandatory since e1352668d1
2019-10-24 13:17:04 +01:00
acdcb99566
fixed 2cac7331f5 merge error
2019-10-24 11:46:47 +01:00
2cac7331f5
Merge branch 'stable'
2019-10-24 09:35:57 +01:00
9aab97578b
World: clean up lighting update API
2019-10-23 21:52:39 +01:00
3768f3008e
World: group light-related functions
...
i don't know why these were dumped between getBlock() and setBlock() to begin with.
2019-10-23 21:29:00 +01:00
f01b7b74ba
World: remove setBlockLightAt() and setBlockSkyLightAt()
2019-10-23 21:25:29 +01:00
a3b73d95a7
LightUpdate: allow providing effective light levels for propagation, fix #2999
2019-10-23 21:01:19 +01:00
f3f9ebf312
SubChunkIteratorManager: added isValid()
2019-10-23 20:21:09 +01:00
21e9bca64a
World: remove getHeightMap() and setHeightMap()
...
these are too specialized to be of any use to plugin developers, and they are also misleading - plugin devs often think this refers to the highest block Y coordinate, but it doesn't.
2019-10-23 19:30:06 +01:00
eedc9eaee1
Chunk: move protocol-specific getSubChunkSendCount() to network chunk serializer
2019-10-23 18:34:47 +01:00
23e2e7c320
Chunk: remove useless instanceof check from collectGarbage()
2019-10-23 18:29:01 +01:00
f71eecfe56
Chunk: clean up internals that were designed for variable subchunk stack size
...
this exposed a few bugs in lighting updates too.
2019-10-23 18:27:30 +01:00
508c53b53a
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
2019-10-22 23:01:35 +01:00
dddc3e8407
FastChunkSerializer: remove legacy code, simplify encoding
...
this is also faster than the old technique (theoretically).
2019-10-22 23:00:49 +01:00
02ff8d671b
Mostly phase out EmptySubChunk
...
copy-on-write and zero-layer SubChunk objects are much easier to manage and have less cognitive overhead.
obviously, the goal is to get rid of EmptySubChunk completely, but right now it does still serve a purpose (filling in dummy values for reading out-of-bounds on chunks), and that's a problem that takes a little more work to fix.
2019-10-22 23:00:49 +01:00
b7d1d11eb4
Chunk: remove useless field "height"
2019-10-22 23:00:49 +01:00
295d14e0d9
Chunk: make setSubChunk() throw exception on invalid Y instead of returning false
2019-10-22 23:00:49 +01:00
b8c857df64
World: prevent getHighestAdjacentBlockLight() and getHighestAdjacentBlockSkyLight() trying to exceed world bounds
...
this creates a problem for sky light above y=256, but this problem exists in lots of other places already anyway.
2019-10-22 23:00:49 +01:00
9d3637c999
Chunk: remove useless proxy field emptySubChunk
2019-10-22 23:00:49 +01:00
e1352668d1
LightPopulationTask: Don't overwrite the whole chunk on completion
...
this is more efficient (less data copied for ITC), fixes #2873 , and also fixes terrain changes during task run getting overwritten.
This still leaves the problem that the light information provided may be out of date by the time the task completes, but this is nonetheless a step forward.
2019-10-22 23:00:21 +01:00
296825b87e
LightArray: collect garbage on unserialize
...
serialize/unserialize don't preserve const refs, so this is necessary to reassign global refs post-unserialize
2019-10-22 20:09:51 +01:00
bf0e855a9b
updated composer dependencies
2019-10-22 19:07:42 +01:00
ebbb99b96b
Merge branch 'next-minor'
2019-10-22 19:05:11 +01:00
b7665fd906
remove unused imports
2019-10-20 21:26:22 +01:00
6d24760174
Merge branch 'stable'
2019-10-20 21:25:39 +01:00
d456cb2419
Filesystem: added some documentation for createLockFile() and releaseLockFile()
...
[ci skip]
2019-10-07 10:03:29 +01:00
37763685aa
LiquidBucket: add getLiquid() ( #3123 )
2019-10-04 09:34:14 +01:00
b1de973d96
changelog: world save performance is improved
...
[ci skip]
2019-10-03 10:51:33 +01:00
464b2116a6
Merge remote-tracking branch 'origin/stable'
2019-10-01 14:41:54 +01:00
735efeaa13
Merge branch 'stable'
2019-09-26 11:30:36 +01:00
262dbc0346
ParticleCommand: fixup for 6e9d2e1c8a
2019-09-23 11:54:17 +01:00
6e9d2e1c8a
InstantEnchantParticle: add Color into constructor ( #3118 )
2019-09-23 11:43:06 +01:00
15694279c7
Merge branch 'stable'
2019-09-18 13:30:58 +01:00
ec0558597b
CommandParameter: change byte1 field to "flags" ( #3115 )
2019-09-18 11:10:42 +01:00
1866de269b
OfflinePlayer: fix reading wrong NBT type in getFirstPlayed(), close #3112
...
This bug was introduced by 65927e6965 .
2019-09-04 07:59:28 +01:00
f755ea6043
DestroyBlockParticle: keep block reference around instead of runtimeID
...
we'll need this for protocol abstraction
2019-08-27 19:25:55 +01:00
1de5d35dfc
add a CLI tool for conversion
2019-08-26 19:03:48 +01:00
f720a58013
RegionWorldProvider: don't assume that path has a trailing directory separator
2019-08-25 19:50:51 +01:00
a53f698d38
PocketMine.php: remove useless set_time_limit() call
...
this is hardcoded to zero in the PHP core anyway.
2019-08-25 19:41:53 +01:00
c4376d13ae
update to latest SPL
2019-08-25 19:32:20 +01:00
6e692d76d5
make lock-file code more reusable
2019-08-25 18:50:33 +01:00
5c1f1f00cb
move assert.exception to PocketMine.php with the other stuff
2019-08-25 18:18:14 +01:00
2bcb720668
Server: get rid of \pocketmine\DEBUG
2019-08-25 18:11:10 +01:00
d1a8bef1e6
fix test
2019-08-25 17:52:39 +01:00
8b40a8f217
PocketMine.php: move INI entry setting to a separate function
2019-08-25 17:50:45 +01:00
0c31b8731f
PocketMine.php: use main logger to emit force-kill debug
2019-08-25 17:48:13 +01:00
9d1239ed67
PocketMine.php: get rid of redundant LOCK_FILE_PATH constant
2019-08-25 17:39:57 +01:00
3eea2442a7
move filesystem-related functions to pocketmine\utils\Filesystem
2019-08-25 17:36:50 +01:00
40da5059c9
PocketMine.php: remove \pocketmine\DATA dynamic constant
2019-08-25 16:55:24 +01:00
51ed564c5e
SetupWizard: remove non-obvious dependencies on dynamic constants, require path in constructor
2019-08-25 16:46:01 +01:00
fdfbaf4e95
make startup performance warnings a little more coherent
2019-08-25 16:34:26 +01:00
ad0f100f8e
remove \pocketmine\START_TIME, add Server->getStartTime()
2019-08-25 16:25:27 +01:00
647f86a5b8
PocketMine.php: remove redundant ini_set()
...
this is overridden later on by MemoryManager.
2019-08-25 16:14:35 +01:00
39d5903c3e
Remove INT32_MIN and INT32_MAX global constants
2019-08-25 16:09:51 +01:00
95a4081d24
update composer dependencies
2019-08-25 16:04:51 +01:00
42ffc45c1c
world providers: don't assume that getPath() has a trailing directory separator
2019-08-25 15:45:40 +01:00
aa006cca0e
WorldProviderManager: added getAvailableProviders()
...
this will be used by standalone CLI conversion tool
2019-08-24 19:59:57 +01:00
6a4ae4cb94
remove position parameters from BlockFactory::get() and BlockFactory::fromFullBlock()
2019-08-24 17:19:27 +01:00
c9cd6ee038
ExperienceOrb: fix passing invalid argument to multi-signature Vector3::subtract()
...
I knew I should have scrapped these multi-signature functions years ago...
2019-08-24 15:58:06 +01:00
75a2d79671
convert more constant interfaces to final classes, close #2885
2019-08-24 15:39:23 +01:00
ef8eba43d7
RegisteredListener: validate priority at a more sensible time
2019-08-23 19:54:41 +01:00
4b0b923ca0
turn EventPriority into final class instead of abstract class
2019-08-23 19:12:55 +01:00
b2cd13daac
Merge branch 'master' of https://github.com/pmmp/PocketMine-MP
2019-08-23 17:16:37 +01:00
e5b02ee5e0
make logic for fetching handler lists more consistent
2019-08-23 17:16:07 +01:00
aa60aa69ee
World: fix bug in getNearestEntity()
...
fuck you PhpStorm
2019-08-21 18:51:08 -04:00
7e5193355e
Remove old entity movement hack
...
This was intended to try and mitigate player movement clipping through blocks triggering anti cheat. Now that the anti cheat is gone, this code is no longer needed.
2019-08-21 18:46:39 +01:00
dbdcabcc56
Player: get rid of CID requirement from player info, CID is still available via extradata if supported by client impl
...
this is useless for PM and it doesn't have any fit purpose for plugin use either, so it doesn't make sense to expose it to the API.
2019-08-21 18:17:31 +01:00
018a4467bf
fix bug in LoginPacketHandler (incorrect metadata array in PlayerInfo)
...
this was intended to make available things like the deviceOS, input method etc without placing an API requirement for custom implementations to provide such information.
2019-08-21 18:06:18 +01:00
e9fd57275a
remove LevelEventSound, remove pitch from sounds that don't support it (most of them)
2019-08-21 17:59:00 +01:00
ea2c418a77
update dependency versions
2019-08-20 19:48:06 +01:00
122238d57e
add NetworkSession->onEnterWorld() hook
2019-08-20 16:25:20 +01:00
3a41a798ad
move forced overflow of SetTimePacket to SetTimePacket::create()
2019-08-20 16:24:47 +01:00
794c7b2469
clean up imports
2019-08-20 15:59:27 +01:00
ea374f5c37
[ci skip] update changelog
2019-08-20 15:52:50 +01:00
6b22f68674
Player: remove sendDataPacket()
2019-08-20 15:50:34 +01:00
965177fb74
Server: drop redundant proxy function broadcastPacket()
...
this is just making it harder to search for broadcast usages, and we want to get rid of all packet broadcasting shit from Server anyway.
2019-08-19 19:30:57 +01:00
8557c93f04
remove GenericParticle, work on isolating network crap in particles
2019-08-19 19:26:26 +01:00
4dfa335ae7
convert ParticleIds to final class with private constructor
...
I got tired of auto complete suggesting this shit every time I typed `implements Particle`
2019-08-19 19:05:59 +01:00
e52ba7201c
add LevelEventPacket::standardParticle() sugar
2019-08-19 19:01:09 +01:00
3274db3ddc
DustParticle constructor now uses Color object
2019-08-19 18:57:26 +01:00
1262b06797
[ci skip] update changelog
2019-08-19 17:22:22 +01:00
2d4a32fc77
first look at separating Entity and Location
2019-08-19 17:20:34 +01:00
591d35889e
make use of EnumTrait->id()
2019-08-17 16:37:36 +01:00
a7d51a273d
EnumTrait: add a numeric runtimeID field for arrays and switches
2019-08-17 16:36:05 +01:00
69e23998f4
Merge branch 'stable'
2019-08-16 19:06:36 +01:00
9321eef683
Merge branch 'stable'
2019-08-16 16:49:24 +01:00
4898a35613
cleanup block dual bounding box clusterfuck
...
"bounding box" serves no tangible purpose, only collision boxes do right now.
2019-08-15 17:23:55 +01:00
d58339b2fd
fix doors being considered 3 blocks tall by collision detection in some cases
2019-08-15 16:54:14 +01:00
73b2669712
remove World->isFullBlock(), add Block->isFullCube(), clean up some BB mess
2019-08-15 16:22:54 +01:00
e29ac514d7
Block->getBoundingBox() and Block->getCollisionBoxes() are now final
...
Force usage of Block->recalculateBoundingBox() and Block->recalculateCollisionBoxes()
2019-08-15 16:16:08 +01:00
6dd1cdc413
sync php submodule version
2019-08-14 18:22:08 +01:00
200bcb485e
Merge branch 'stable'
2019-08-14 18:20:55 +01:00
d04793145c
Remove usages of AxisAlignedBB->setBounds() and AxisAlignedBB->setBB()
...
these usages make no sense in the contexts they are used in, because their uses require another BB to be created anyway. It makes more sense to simply destroy the old one instead of having it mutable.
2019-08-14 17:28:06 +01:00
e9ed46a9c7
Entity: avoid bad hack on high load which causes bugs on entity move
2019-08-13 18:08:56 +01:00
47b905007e
add more legacy metadata constants
2019-08-13 18:01:24 +01:00
2b38098243
Explosion: fix pos refactor mess
2019-08-12 19:05:21 +01:00
514f395280
SubChunk: reduce visibility of blockLight and skyLight fields
2019-08-10 19:47:41 +01:00
399f9242e0
InventoryManager: avoid use of PlayerHotbarPacket
...
it doesn't work so well when the selected slot is empty.
2019-08-10 18:09:38 +01:00
85ad78dda8
DataPacketSendEvent: remove setters
...
these create unnecessary complexities in the internals.
2019-08-10 18:00:46 +01:00
d1775030c3
Remove DataPacketBroadcastEvent, DataPacketSendEvent now supports multiple recipients & packets in one swoop
...
this makes it simpler to consistently process outbound packets from a plugin. Previously it was necessary to handle 2 events to do 1 job.
2019-08-10 17:59:02 +01:00
4c694c57f4
DaylightSensor: Avoid triggering useless block updates if calculated power is unchanged
2019-08-10 17:49:31 +01:00
774e6fe8a3
Make chemistry textures always enabled
2019-08-10 17:38:00 +01:00
fae6289eb8
protocol: move resource-pack related types to their own subnamespace
2019-08-08 19:58:24 +01:00
d87b6f9ff7
Remove resource pack packets dependency on ResourcePack, now supports decoding
2019-08-08 19:36:54 +01:00
a52e4f0392
AsyncPool: Return whether there are tasks left to be collected from collectTasks()
...
this allows a while($pool->collectTasks()); style code.
2019-08-08 18:48:58 +01:00
bce126b6d0
fix BB of daylight sensor
2019-08-07 19:51:52 +01:00
c533f6a0bd
Implemented partial chunk saving on LevelDB ( #3078 )
2019-08-07 17:39:36 +01:00
9598af7683
commands: remove some nonsensical isValid() checks
...
a player who doesn't have a valid world has no business sending commands anyway.
2019-08-06 15:42:17 +01:00
dec6f73f2f
Remove unnecessary BannerPattern copying on block clone
2019-08-06 10:18:02 +01:00
9671b4d5cb
fix improper cloning of some blocks, closes #3079
2019-08-06 10:07:16 +01:00
4e5b296c8c
Tiles now encapsulate positions instead of extending them
2019-08-05 19:33:34 +01:00
d355d5b5b5
Remove hack to break cyclic dependency on double chests
...
Since these now reference positions instead of tiles, the cyclic dependency is removed.
2019-08-05 19:01:21 +01:00
f0505c0284
Remove dead comments from PlayerInventory and PlayerCursorInventory
...
these aren't overrides anymore.
2019-08-05 18:53:46 +01:00
9353f616a2
All BlockInventory descendents now have a Position as holder
...
this allows multiple problems to be solved:
1) Cycle between tile and inventory is now removed.
2) BlockInventory now provides a consistent API for plugins to get the block holding an inventory.
2019-08-05 18:50:29 +01:00
358fea9645
Move Location to Entity namespace
2019-08-05 17:20:48 +01:00
927e05d038
[ci skip] update changelog
2019-08-05 17:15:10 +01:00
53ab860db5
first shot making Block not extend Position
...
this makes some stuff a lot less pretty, but this seems to be the bare minimum necessary to do this task. It can be enhanced later.
2019-08-05 16:44:09 +01:00
cf271dab2b
Entity: fixed undefined variable in getTargetEntity()
2019-08-05 16:19:49 +01:00
1fcec87b98
Block: remove unused function
2019-08-03 17:13:02 +01:00
1cd955c216
Entity: added getEyePos()
2019-08-02 17:29:32 +01:00
e03f918806
AttributeMap: drop ArrayAccess interface
...
this makes no sense because it isn't type safe and isn't used anywhere. It's just extra maintenance cost for no good reason.
2019-08-02 17:19:14 +01:00
c1ef5ba8ab
Entity: remove redundant check from spawnToAll()
2019-08-02 17:10:58 +01:00
cc4b2959a7
Player: ditch deprecated dataPacket()
...
it doesn't make sense to deprecate this on a major version, particularly given all the other changes that plugin devs will have to accommodate.
2019-08-02 16:43:45 +01:00
56dc3ce6ee
Human: remove obsolete comment from sendSpawnPacket()
...
the referenced function doesn't exist anymore.
2019-08-02 16:41:30 +01:00
aa5395d6ed
Merge branch 'next-minor'
2019-08-02 16:35:17 +01:00
2e806d8a6c
[ci skip] changelog update
2019-08-02 16:26:04 +01:00
58e9728710
Removing useless armour descendent classes, move armour slot to ArmorTypeInfo
2019-08-02 16:17:04 +01:00
056c5ed6cd
ItemFactory: break down init() a little
2019-08-01 20:01:29 +01:00
135a2f520c
add some UTF-8 validation
2019-08-01 19:51:31 +01:00
399ef13069
WritableBookPage: add missing EOF newline
2019-08-01 19:39:32 +01:00
7e4236a3ec
add a more flexible hook system to EffectManager
2019-08-01 19:36:13 +01:00
d09e79e682
Player: update properties when assigning game mode, fixes #3005
2019-08-01 19:02:06 +01:00
4818e04540
Player: fix possible comparison bug in setGamemode()
2019-08-01 18:57:47 +01:00
eaf5226f08
[ci skip] update changelog
2019-08-01 17:53:42 +01:00
5c95e25326
Enchantment: use a simple array instead of SplFixedArray
2019-08-01 16:03:08 +01:00
28c9a2c0cd
fixed Protection enchantments being dropped from items, closes #3066
2019-08-01 16:02:05 +01:00
296061d25d
reduce boilerplate around attribute handling
2019-07-31 16:41:09 +01:00
dc33b9e573
VanillaEffects: add some TODOs
2019-07-31 16:37:25 +01:00
b4c55a8c37
fix incorrect power calculation of daylight sensor
2019-07-31 15:44:53 +01:00
bf5519b0cf
fix travis
2019-07-30 19:40:27 +01:00
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00
7a77d3dc30
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
2019-07-30 19:00:50 +01:00
ece28e5d7b
World: avoid triggering light updates when the target block light level/filter haven't changed
2019-07-30 18:01:23 +01:00
3eb1a56985
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/world/World.php
2019-07-30 15:38:38 +01:00
cf1b140d57
fix chunks with entities & tiles not being saved after first autosave
...
this bug was introduced by 211836274f , which did not take into consideration that the dirty flag is cleared after the first time the chunk is saved, meaning that later entity and tile changes wouldn't be saved.
I considered this fix more elegant than reverting the bug commit.
2019-07-29 19:38:47 +01:00
2ecdea2cc6
LevelDB: increase default block size to 64KB
...
this might be a little too big, but it's definitely better than the leveldb default 4KB, since most of our data is bigger than 4KB.
2019-07-29 18:54:27 +01:00
334d15339f
updated Math dependency
2019-07-29 18:25:32 +01:00
c40074d0bf
Entity: remove unused import
2019-07-29 18:25:05 +01:00
96d8790028
rename Entity->propertyManager -> Entity->networkProperties
2019-07-29 18:24:29 +01:00
452cfe2f59
World: drop getChunkEntities(), use getChunk()->getEntities()
...
everywhere this function is used, it should be assumed/expected that the chunk in question is already present and loaded.
2019-07-29 18:20:33 +01:00
a4042e5d18
World: fix more implicit chunk loading bugs (getCollidingEntities(), getNearbyEntities(), getNearestEntity())
2019-07-29 18:07:17 +01:00
1111d0d4c7
World: remove dead function getChunkTiles()
2019-07-29 18:00:23 +01:00
17a3ca066e
fix wrong type for Fuel tag on brewing stand
2019-07-29 17:50:02 +01:00
52412e9c21
remove remaining dependencies on Bearing
2019-07-29 17:45:23 +01:00
a621bf66ff
Remove implied dependence on Facing/Bearing constant values
...
this introduces mapping tables for redundancy for when those things change or disappear.
2019-07-29 17:43:36 +01:00
18d05f57b5
Merge branch 'next-minor'
2019-07-29 17:33:08 +01:00
f3f8cd98de
World: fixed scheduled updates causing chunk loading
...
this probably needs to be backported.
2019-07-29 17:17:05 +01:00
b98dad6f63
Fixed WritableBook PC format deserialization
2019-07-29 16:37:40 +01:00
e06ab0869a
mostly rewrite internal entity metadata handling
...
- Only sync the metadata set when needed for sending
- Don't use metadata set for storing data, add properties instead
- Use objects inside metadata sets instead of arrays
2019-07-28 19:40:47 +01:00
6c0ae6bf0b
fuck off PhpStorm
2019-07-27 19:22:33 +01:00
379a40c13a
break up the pocketmine\network\mcpe\protocol\types namespace
...
this namespace nesting is getting out of hand, but it's more manageable this way.
2019-07-27 19:19:48 +01:00
c9ecd04353
rename DataPropertyManager -> EntityMetadataCollection
2019-07-27 19:10:18 +01:00
34ed2980e5
Merge branch 'next-minor'
2019-07-27 14:59:38 +01:00
7275952fc2
added some missing legacy ID constants
...
i'm not sure why my script missed these
2019-07-26 19:08:50 +01:00
a91a86bf1d
Removing achievements
2019-07-26 18:07:31 +01:00
b543744534
Rename Solid -> Opaque
...
the old naming was misleading, particularly in conjunction with isSolid().
2019-07-22 19:56:01 +01:00
e95b9fa432
Block: use isSameType() in some places
2019-07-22 19:23:28 +01:00
72c0af2e82
Merge branch 'stable'
2019-07-22 17:39:44 +01:00
80d277f1b5
removed return value of ChunkManager->setBlockAt() and World->setBlock()
2019-07-21 18:55:22 +01:00
703ae3a172
Merge branch 'master' of https://github.com/pmmp/PocketMine-MP
2019-07-21 18:53:25 +01:00
6fdcb09891
fix PhpStorm's screwup with World->setBlock() doc comment
...
it's not the first time i've seen it do this, and i still have no idea why it does this.
2019-07-21 18:52:33 +01:00
a9c6489e08
updated consistency check for e388ac9c8b
2019-07-21 13:11:59 +01:00
e388ac9c8b
implemented lantern
2019-07-20 17:48:09 +01:00
08a654760c
Allow PlayerInfo to contain additional metadata
2019-07-20 15:19:17 +01:00
1e057394c0
Utils: added cloneCallback() and cloneObjectArray() to reduce list copying boilerplate
2019-07-19 19:19:04 +01:00
47b120fa0e
crafting: avoid unnecessary recipe mutability
2019-07-19 19:11:36 +01:00
556beacdbf
make PlayerAchievementAwardedEvent less useless
2019-07-19 18:59:06 +01:00
b4df1ac547
Remove Achievement::broadcast(), remove cyclic dependency, inline code in Player
2019-07-19 18:47:18 +01:00
3965c9419d
Merge branch 'stable'
2019-07-19 18:20:38 +01:00
14d79c205b
TranslationContainer: remove redundant setters
...
i'd like to make this completely immutable, but there are some problems to solve first.
2019-07-19 18:09:00 +01:00
99bba66f13
Block no longer implements BlockLegacyIds
2019-07-19 17:49:59 +01:00
1fee70abfb
Item no longer implements ItemIds
2019-07-19 17:43:06 +01:00
ac12911561
move network entity IDs to network namespace
...
we're going to need a dedicated data package, because this stuff isn't just network-specific.
2019-07-19 15:33:30 +01:00
0ebd3e6ca2
fix /effect crash
2019-07-19 14:10:19 +01:00
5a5ce84ebc
yucky fix for crash on invalid keychain
2019-07-19 14:01:21 +01:00
a4c7744188
[ci skip] changelog updates
2019-07-19 13:53:44 +01:00
c5ebc12f1a
Merge remote-tracking branch 'origin/stable'
2019-07-19 13:45:53 +01:00
5e8c92b1da
Fix test failure #3047
2019-07-19 13:42:03 +01:00
a8fa3ba434
Add test for whether item retains it's display properties after deserialization ( #3047 )
2019-07-19 13:06:07 +01:00
b5b4133c5d
Item: fixed always-false null checks on getNamedTag() result
2019-07-18 19:45:59 +01:00
e22986f065
EffectCommand: Remove support for internal MCPE effect IDs
2019-07-18 19:30:20 +01:00
3632e07cdb
EffectCommand: Remove internal ID from translated message
2019-07-18 19:29:43 +01:00
64948f38d0
Separate effect registry from base Effect class
2019-07-18 15:49:58 +01:00
728aa8aae7
RegistryTrait: Alias internal methods by default
...
it's always necessary to wrap these methods with the appropriate typehints.
2019-07-17 19:59:28 +01:00
1a1feefd3e
Pull tier info out of TieredTool, create ToolTier enum
2019-07-17 18:06:49 +01:00
7954a81602
fixing finality and constructor visibility on some enums
2019-07-17 18:04:15 +01:00
ccf165b107
mark some assumed-immutable classes as final
2019-07-17 16:24:29 +01:00
6aba9fadfc
Encapsulate Item enchantment handling parts within a trait for scope isolation
...
as a happy side effect, this makes the Item class smaller, makes the code easier to read, and also makes the code more easily testable.
2019-07-17 16:12:13 +01:00
af73c5f2b1
Make EnchantmentInstance immutable, remove enchantment clone from Item
...
it doesn't make sense to set the level of an existing enchantment instance because under the old API it would have no effect anyway (if it was returned from an itemstack) or you had access to the constructor (if applying a new enchantment). Allowing this to be mutable creates needless complexity and performance headaches.
2019-07-17 16:03:08 +01:00
fec8c75fd8
[ci skip] changelog: document more misc API changes
2019-07-17 15:55:28 +01:00
74572fde08
[ci skip] changelog: add some information about NBT handling changes
2019-07-17 15:52:52 +01:00
ad4ed1c95c
[ci skip] expand changelog on item changes
2019-07-17 14:46:43 +01:00
382d97a178
Merge branch 'stable'
2019-07-17 13:58:43 +01:00
b57dcebb6f
Living: tighten validity checks on health NBT, don't use generic getValue() (it could return anything)
2019-07-16 19:59:15 +01:00
711ea3185d
update composer dependencies
2019-07-16 19:53:47 +01:00
ff21977461
Item: simplify equals()
...
getNamedTag() can't return null anymore.
2019-07-16 18:11:09 +01:00
49a6821195
fix @return hints on Item fluent methods
2019-07-16 18:06:21 +01:00
8f64d6b053
Don't mess with NBT when creating signed books
2019-07-16 17:59:39 +01:00
73a847123b
WritableBookBase: Make setPages() fluent
2019-07-16 17:59:01 +01:00
3d0e47ba14
WritableBookBase: Don't expose page deque on the API
...
putting this stuff on the API creates a nightmare because DS structures are both mutable and by-reference, so they have to be manually copied everywhere.
2019-07-16 17:52:58 +01:00
27352486a0
Remove item NBT runtime usage, marginalize to serialize/deserialize
...
this is a more tame version of my initial attempt to firehose item NBT. It marginalizes the use of item NBT to the places where it's needed on interfaces, leaving the internals clean to operate on whatever they like.
2019-07-16 16:51:45 +01:00
d624c38ab1
Remove dead proxy functions Item::get(), Block::get() and Item::fromString()
...
with the introduction of the VanillaBlocks and VanillaItems API, it's expected that plugins will no longer need these methods.
2019-07-16 14:31:04 +01:00
52de5a6e49
Removed remaining usages of Item::get()
2019-07-16 14:27:32 +01:00
484f2f43c0
fixed merge error, close #3030
2019-07-14 19:29:16 +01:00
0ba3121c43
Merge branch 'stable'
2019-07-14 19:19:33 +01:00
f637f14e4a
VanillaItems: fixing gold -> golden
2019-07-13 19:24:17 +01:00
1391e4826f
ItemFactory: fix name consistency gold -> golden, close #3020
2019-07-13 19:21:00 +01:00
544bbf849d
Merge branch 'stable'
2019-07-13 18:17:04 +01:00
6a93eb8361
Merge branch 'stable'
2019-07-13 18:08:45 +01:00
12ee885432
Bookshelf: fix drop count
2019-07-11 14:14:01 +01:00
39bcd2ec3d
added VanillaItems static interface and start using it where possible
2019-07-10 14:44:55 +01:00
e8fe3d0664
Replace some ItemFactory blockitem fetches with VanillaBlocks::THING()->asItem()
2019-07-09 18:30:02 +01:00
41705db687
fix banner block picking
2019-07-09 18:21:08 +01:00
08e1f6405c
implemented Carved Pumpkin
2019-07-09 17:56:09 +01:00
b6efb33b91
improved VanillaBlocks registry
2019-07-09 17:33:00 +01:00
c07396442c
Merge branch 'stable'
2019-07-09 15:57:02 +01:00
5f959a148f
chunkutils: remove dead legacy code
2019-07-09 14:44:01 +01:00
5a2e84eb9f
LightArray: added fill(), remove duplicated code
2019-07-09 13:49:54 +01:00
4264923f4f
SubChunk: get rid of dead light getters and setters
...
these were here for fast access, but that fast access path now goes through getBlock(Sky)LightArray() instead.
2019-07-09 13:43:01 +01:00
c1212eab8e
EmptySubChunk: get rid of useless allocations
2019-07-09 13:38:26 +01:00
bda9bd2f2d
Merge branch 'experimental/vanilla-block-registry'
2019-07-08 19:38:09 +01:00
9ef5f9518c
generator: prevent access to chunks that don't exist on this thread
...
the generator shouldn't be creating chunks that it wasn't given.
2019-07-08 18:29:19 +01:00
fe3a4baddb
added StairShape enum
...
this has no practical value to plugins yet, but it will in the future.
2019-07-08 18:08:52 +01:00
c42817f02f
optimizing lighting performance a little
2019-07-08 15:39:57 +01:00
007aee72f8
SubChunk: remove BlockLegacyIds dependency, allow parameterising default block
2019-07-08 15:01:11 +01:00
4e2f430f06
shift default left instead of set value right
...
don't remove metadata bits for block comparison, because they could be part of the ID.
2019-07-08 14:53:19 +01:00
cdab3e967a
Extract a LightArray unit from SubChunk
2019-07-08 14:37:48 +01:00
2cab22fd38
Merge branch 'stable'
2019-07-07 18:10:19 +01:00
f9bfaa0c6a
Merge branch 'stable'
2019-07-06 19:41:00 +01:00
5274a0fe3c
Extract an ExperienceManager unit from Human
2019-07-06 19:31:39 +01:00
da0358529a
Extract a HungerManager unit from Human
2019-07-06 18:50:34 +01:00
4d7c18f65b
first look at a giant static interface for block fetching
2019-07-06 17:29:40 +01:00
119cb083bf
[ci skip] update changelog
2019-07-06 15:22:27 +01:00
5c25f770c2
World: reduce legacy id/meta dependencies
2019-07-06 15:21:45 +01:00
f3995f7cb0
Destroy EffectManager <-> Living cyclic reference on close ( #2993 )
2019-07-06 15:18:09 +01:00
a2bb6a41d9
World: some cleanup to random blocktick registry
2019-07-06 15:16:03 +01:00
ce77e283ab
Revert "fix race condition between chunk generation and light population"
...
This reverts commit 80747814fb .
2019-07-05 19:56:58 +01:00
13de99315b
fixed some artifacts getting cut in half
2019-07-05 19:56:31 +01:00
80747814fb
fix race condition between chunk generation and light population
2019-07-05 19:40:33 +01:00
bda3631c24
Merge branch 'stable'
2019-07-05 19:21:49 +01:00
124640737a
Explosion: make use of fromFullBlock()
...
this is in preparation for out-phasing legacy IDs.
2019-07-05 17:58:15 +01:00
ceeed57118
Player: remove iusername premature optimization
2019-07-05 17:28:37 +01:00
45b0cbc796
Human: remove getRawUniqueId() premature optimization
...
this is never used in a hot path and presents a potential for inconsistency.
2019-07-05 17:17:48 +01:00
2e01bd1029
cleanup imports from f356bf0893
2019-07-05 16:34:22 +01:00
77919b70b2
Stop cloning Color objects
...
since these are now immutable, there's no need to clone them.
2019-07-05 16:20:56 +01:00
f356bf0893
Extracted an EffectManager unit from Living
2019-07-05 16:15:58 +01:00
fe850a184c
deal with fern mapping properly
2019-07-05 15:14:03 +01:00
2bd2e1125c
Block: don't be stupid in getSide()
2019-07-05 15:04:13 +01:00
b021cc2138
ItemFactory: add PhpDoc for getAllRegistered()
2019-07-05 13:46:06 +01:00
453c5a329d
Tile: remove useless code
2019-07-05 13:41:18 +01:00
ceb6529ee3
encapsulate light recalculation logic inside LightUpdate classes
...
now we can do a standard light recalculation from anywhere.
2019-07-04 19:55:48 +01:00
3d118a415c
Merge branch 'stable'
2019-07-04 18:48:53 +01:00
3bdf740597
formatting
2019-07-04 18:04:23 +01:00
9ed13bf112
Color: make use of intdiv()
2019-07-04 18:03:45 +01:00
a125980ada
utils: Color is now immutable
...
as is always the case with mutability, allowing this creates lots of complications that aren't worth the hassle.
2019-07-04 18:00:48 +01:00
062e692069
AAAAAAAAAAAAAAAAAAAA
2019-07-03 20:02:33 +01:00
1d96c1810f
wtf PhpStorm
2019-07-03 19:20:24 +01:00
4c5d8c12dd
[ci skip] more updates to changelog
2019-07-03 18:32:20 +01:00
134a87ec7d
BlockFactory: regenerate TODOs
2019-07-03 18:26:01 +01:00
ee885bb725
shorten BlockToolType constants
2019-07-03 17:57:11 +01:00
85051554c4
disallow logins from players with phony XUIDs
...
this simplifies XUID handling.
2019-07-03 16:47:02 +01:00
e07523056d
Merge branch 'stable'
2019-07-03 16:35:29 +01:00
4a6d4953f2
updated consistency check for previous commit
2019-07-03 16:19:24 +01:00
80b29250c8
added all the element blocks
2019-07-03 16:17:17 +01:00
02bbf50dbe
Make DragonEgg::teleport public ( #2992 )
2019-07-03 15:04:17 +01:00
5b02ca8a64
InGamePacketHandler: return unhandled for command requests without a leading /
...
some clients send things without the /, f.e. websocket stuff, and we aren't ready to handle that properly yet. The result is that the command gets dumped directly into the chat instead of being unhandled.
2019-07-03 14:34:22 +01:00
720254f64f
fix crash on falling block above the height limit, closes #2803
2019-07-02 19:56:26 +01:00
d23eeff832
FallingBlock: remove useless check
2019-07-02 19:54:56 +01:00
206b397ee1
Living: drop useless knockBack() parameters, closes #2634
2019-07-02 19:52:51 +01:00
b0a85155d7
[ci skip] add inventory changes to changelog
2019-07-02 14:06:11 +01:00
b90be8dc5f
fix PhpStorm's screwups
2019-07-01 18:49:07 +01:00
7aa4d974ef
move crafting stuff to pocketmine\crafting namespace
2019-07-01 18:47:09 +01:00
601ba4264d
[ci skip] added incomplete changelog for 4.0
2019-07-01 17:42:18 +01:00
a325b1f3a1
Merge branch 'next-minor'
2019-07-01 17:19:57 +01:00
b1ef1026ee
WorldManager: Use the world's own logger to report tick overload
2019-07-01 15:24:45 +01:00
1156d5bdba
batch optimize imports
2019-06-30 14:51:44 +01:00
5e5f43242e
Extract a HandlerListManager unit from HandlerList
2019-06-30 14:49:09 +01:00
68bff6cf69
moved RegisteredListener to event namespace
2019-06-30 14:31:53 +01:00
80d4eeaa3c
fix some occurrences of terrain truncation during generation
2019-06-29 11:14:34 +01:00
0d769aab48
Removed anti-noclip checks
2019-06-29 11:10:20 +01:00
44a205b1cc
Remove MainLogger singleton and remaining MainLogger hard-dependencies
2019-06-28 16:36:17 +01:00
a4b50e57a4
move player arm swing processing to server side
2019-06-28 15:08:51 +01:00
e7733718b6
divide network\mcpe namespace into more subnamespaces
2019-06-27 19:39:59 +01:00
872b6ed708
Switch back to using fast-serialize for chunk send prepare
...
network serialize on the main thread is 3-5x more expensive than fast-serialize right now.
2019-06-27 19:28:47 +01:00
0e4966dfdf
Split ProcessLoginTask into two tasks: 1) verify, 2) server handshake
2019-06-27 18:09:43 +01:00
193a41566d
NetworkSession: Show the correct name on the player list
2019-06-27 17:04:36 +01:00
1749b57a83
ChunkManager: drop light-related methods
...
these were added in 2017 with the intent of async'ifying light updates. However, light updates now use an optimized code path which bypasses these functions completely, rendering them useless.
2019-06-27 16:56:46 +01:00
6da2bd4bb3
SimpleChunkManager: implement last-access performance optimization
...
this improves performance of writing blocks by ~30%.
2019-06-27 16:53:24 +01:00
45f5f112dd
SubChunkIteratorManager now accepts $create as a moveTo() parameter instead of in the constructor
2019-06-27 16:22:56 +01:00
6f087190f4
SimpleChunkManager: added $create parameter
2019-06-27 16:13:14 +01:00
a279648c68
FastChunkSerializer: optimize palette writing
2019-06-27 15:42:10 +01:00
6838a1e07a
BossEventPacket: fix crash in ::unknown6()
2019-06-27 15:16:06 +01:00
f3882dd658
Entity: remove more useless classes
...
these were slated for removal some time ago, but it never happened because they were used in the API. This is no longer the case on 4.0, so these classes are now entirely useless.
2019-06-27 14:23:24 +01:00
2ba76bd97d
Convert UPnP into network interface
...
closes #2710 , closes #2751
2019-06-27 13:41:58 +01:00
7f56f27505
some cleanup to held item handling
2019-06-26 19:40:40 +01:00
61d443bf4e
Living: remove sendPotionEffects() network crap
2019-06-26 19:17:38 +01:00
9fe073fa73
move RakLib-specific components to mcpe\raklib namespace
2019-06-26 18:36:42 +01:00
3f9493bcd0
Remove another NetworkSession <-> NetworkInterface cyclic dependency
2019-06-26 18:22:32 +01:00
7eaca6bbaa
Separate packet-sender functionality from NetworkInterface, break cyclic dependency between NetworkInterface and NetworkSession
2019-06-26 18:19:29 +01:00
9cedfeb2b2
Use the appropriate synchronization for held item rollbacks
2019-06-26 17:56:39 +01:00
f62d9cbb99
Player: rename equipItem() to selectHotbarSlot()
2019-06-26 15:52:01 +01:00
7bdb99ae8b
Player: fixed consumable relying on undefined network behaviour to set using-item flags
2019-06-26 15:47:16 +01:00
eee039a490
Player: don't fire events on equipItem() when sending the same slot
2019-06-26 15:32:57 +01:00
ee72680f44
Removing "metadata": overengineered useless Bukkit copy-pasta
...
the intentions of this are good, but the usability is terrible and it's not fit for purpose. Since there are a total of zero plugins on Poggit which use this garbage, it makes more sense to eliminate the technical debt. See #2766 for discussion about replacing this.
2019-06-26 14:43:21 +01:00
26178b4435
InventoryManager: remove redundant cyclic dependency
2019-06-26 13:57:52 +01:00
9bebc6c69d
PreSpawnPacketHandler: drop useless sending time
...
this is already sent in StartGamePacket.
2019-06-26 13:46:53 +01:00
4448919a8b
Consider unknown chunk formats as corrupted
...
the reasoning for this is that the world version number should have accounted for a chunk format change. If it didn't, then we assume any chunk with a wrong version number is corrupted, since the handling of unknown formats is the same as that of corrupted chunks.
2019-06-26 13:22:45 +01:00
42b1c45fa5
Player: remove deprecated parameter from sendPopup()
2019-06-25 19:41:00 +01:00
a6395c9ac7
allow use of any iterable for enum initialization
...
this allows possible use of generators
2019-06-25 19:37:31 +01:00
44b7239847
SetDefaultGameTypePacket: added ::create()
...
not using this yet, but it was in my workspace and it might come in useful
2019-06-25 19:28:30 +01:00
e8d9acb59f
added NoteSound and NoteInstrument enum
2019-06-25 19:26:18 +01:00
73938486fc
added PaintingPlaceSound
2019-06-25 18:39:02 +01:00
6bbae4b2df
SetDifficultyPacket: added create()
2019-06-25 18:34:12 +01:00
ec25a71396
Merge branch 'stable'
2019-06-25 18:16:36 +01:00
ff55f5e9ac
Make BlockInventory non-abstract
2019-06-25 17:45:07 +01:00
8c2ca098e1
updated BedrockData submodule
2019-06-25 17:31:10 +01:00
f152ae9cbf
EntityFactory: Allow registering entities without legacy numeric IDs associated
...
this shit really ought to be broken up into factories for each world format.
2019-06-25 17:23:41 +01:00
c19c42a934
PlayerBlockPickEvent: pre-cancel the event when picking would fail in survival
2019-06-25 16:30:07 +01:00
edccce1419
added ChunkListenerNoOpTrait to reduce chunklistener boilerplate
2019-06-25 16:23:43 +01:00
d85a27c5b2
BanList: remove useless Server dependency
2019-06-25 15:54:26 +01:00
8ec25b59a3
Remove useless $items parameter from inventory constructors
2019-06-25 15:43:55 +01:00
94ee33e47b
Moved common Thread parts to trait
2019-06-25 14:57:40 +01:00
75a4136ab2
Player: fix bug in unloadChunk() causing entity artifacts on world change
2019-06-25 14:17:56 +01:00
de10e401bf
Fixed wrong chunks being sent to players post-teleport or post-world-change
2019-06-25 13:41:03 +01:00
d15284e638
work on moving inventory network functionality to network layer
2019-06-25 13:28:01 +01:00
9f09dc3dd7
Player: Log a debug message when GC kicks in
...
I use this frequently to identify leaks. This isn't expected to appear immediately after disconnect, but it shouldn't take long to appear.
2019-06-24 17:46:30 +01:00
91580ce321
fix bug in InventoryCloseEvent
2019-06-24 17:27:12 +01:00
181cfef731
Remove a whole bunch of useless crap from PluginLogger
...
this is pretty much just an implementation of a NTS attachable logger now. It should probably be converted into a trait.
2019-06-23 19:39:40 +01:00
197a56e3e1
move BookEditPacket handler out of Player
2019-06-23 19:23:20 +01:00
3103579ba6
Merge branch 'stable'
2019-06-22 20:26:21 +01:00
6db2a3a0fb
Merge branch 'next-minor'
2019-06-22 19:49:18 +01:00
0273bd4f53
Merge branch 'next-minor'
2019-06-22 16:05:17 +01:00
ce74549ba3
Use 10 bits for Y coordinate in blockhash
...
fixes #2553
2019-06-22 15:53:56 +01:00
ff8ca99c9f
CrashDump: revert removal of RCON password redact in 738e310798
...
there's guaranteed to be some plant pot who uses 4.0, leaks his RCON password, downgrades back to 3.x, and then gets hacked.
2019-06-18 19:53:43 +01:00
c5707f6174
update DevTools submodule
2019-06-18 18:58:53 +01:00
2559f5ec2b
Moved Player-related classes to pocketmine\player namespace
2019-06-18 18:51:36 +01:00
e82a40b2ba
forgot to stage this for b18bd4f33c
2019-06-18 17:37:38 +01:00
c66af4648c
Move thread-related classes from pocketmine to pocketmine\thread namespace
2019-06-18 17:36:25 +01:00
075f49aef0
don't send double disconnect messages
2019-06-18 16:22:41 +01:00
709963f90a
shut up PhpStorm
2019-06-18 16:07:43 +01:00
b18bd4f33c
rename SessionHandler -> PacketHandler
2019-06-18 16:02:46 +01:00
87c3636d44
ResourcePacksSessionHandler: moar debug
2019-06-18 15:10:58 +01:00
94299534b3
NetworkSession: fix some blind spots on logging
2019-06-18 15:01:44 +01:00
9df2ca3655
fixup some formatting issues
2019-06-18 14:12:37 +01:00
bb675ac99b
Set parallel bootstrap file if the extension is loaded
2019-06-18 14:05:39 +01:00
7b049b6db1
NetworkSession: use a better check for timeout
2019-06-17 17:30:42 +01:00
e0a9ea2573
Player: clean up some crazy spawn logic in constructor
...
this was probably a leftover from some old code, I guess
2019-06-17 17:07:31 +01:00
db3305cb16
Remove Entity->isClosed() checks from places where they don't make sense
...
in all of these cases, this is just potentially concealing bugs. Closed entities should never appear at these points.
2019-06-17 16:39:46 +01:00
92e81e3298
Player: move some respawn net sync logic to NetworkSession
2019-06-17 16:27:04 +01:00
3c677bd3ec
added PermissibleDelegateTrait to cut down boilerplate in Player and ConsoleCommandSender
2019-06-17 16:10:13 +01:00
20f092a685
Living: Do not use spl_object_id() for identifying effects
...
it's possible for these to have different IDs if they were cloned, serialized or copied between threads.
2019-06-17 15:58:33 +01:00
fe98b6c765
EnumTrait: rename getEnumName() -> name()
...
this is more concise and brings it more in line with Java.
2019-06-17 14:55:25 +01:00
c45c1c930e
SetEntityMotionPacket: Mark as garbage serverbound
2019-06-17 14:22:08 +01:00
b344427a30
Added a hack to allow dropping garbage serverbound packets sent by a buggy client
2019-06-17 14:20:29 +01:00
698193622a
WorldManager: rename get/setAutoSaveTicks() to get/setAutoSaveInterval()
...
this is less ambiguous.
2019-06-16 18:23:13 +01:00
4878fc4c93
Merge branch 'stable'
2019-06-16 17:18:17 +01:00
b71bb867f4
DefaultPermissions: remove pocketmine.command.reload
2019-06-16 16:52:47 +01:00
94180cda72
Merge branch 'next-minor'
2019-06-16 16:42:05 +01:00
5d3b4f23a3
Merge branch 'next-minor'
2019-06-16 14:52:37 +01:00
4e734989bc
fixing add/remove items from anvil & enchanting table
...
the functionality of these don't work yet, but the inventories work more correctly now.
2019-06-15 18:56:42 +01:00
93b83b4189
Player: Window system now only allows 1 window at a time
2019-06-15 18:19:09 +01:00
312a755a27
Player: rename $windows to $inventoryNetworkIdMap
2019-06-15 15:51:43 +01:00
a94541c531
Split CreativeInventoryAction into two new action types
2019-06-15 14:40:15 +01:00
4bbf1d56dc
NetworkInventoryAction: shorten exception message
...
This is logged with the network session's logger, which provides context information already.
2019-06-15 14:27:11 +01:00
50a7fc0ba3
Rework inventory window open/close handling
...
- This fixes InventoryOpenEvent and InventoryCloseEvent being fired for persistent windows. Close #2950
- The ability to specify a custom network ID to assign the inventory to in addWindow() has been removed.
- The ability to assign a non-removable window in addWindow() has been removed.
- The ability to remove non-removable windows in removeWindow() and removeAllWindows() has been removed. This was previously needed for internal purposes.
2019-06-15 14:23:02 +01:00
c77e75fa93
FastChunkSerializer: fix typo
2019-06-14 19:42:50 +01:00
468340d55b
this was stupid
2019-06-14 19:41:19 +01:00
8356285b66
Consistently call InventoryCloseEvent
...
this wasn't being fired when a plugin did the removal.
2019-06-14 19:39:35 +01:00
f671f2ebfa
Inventory: drop useless proxy functions
2019-06-14 19:37:45 +01:00
787d305c2a
Player: call InventoryOpenEvent consistently
2019-06-14 19:32:38 +01:00
2cb6fda286
Moved network chunk serializing code to network\mcpe namespace
2019-06-14 18:25:06 +01:00
08de657c8d
Extract FastChunkSerializer unit from Chunk
...
this functionality doesn't directly pertain to Chunk functionality.
2019-06-14 18:19:46 +01:00
92035ac2ec
Chunk: drop premature optimizations
2019-06-14 18:07:13 +01:00
722da5e88d
Simplify hasChanged handling for chunk init
...
we always want chunks to be saved if they have tiles or entities
2019-06-14 18:00:37 +01:00
c8eefddfc0
Chunk: fix tiles not being loaded from NBT in some cases
2019-06-14 17:59:00 +01:00
211836274f
World: remove redundant checks
...
when entities are added and removed which are savable, the dirty flag is set anyway, so these checks aren't needed.
2019-06-14 17:47:39 +01:00
9e9de1e8ba
Log a debug message when receiving a mismatch transaction
2019-06-13 19:52:53 +01:00
da4c646d27
Simplify InventoryAction implementation
...
none of these action types are able to fail now.
2019-06-13 18:35:05 +01:00
44be2179c4
SlotChangeAction: fix feedback loop
2019-06-13 18:31:25 +01:00
8551d1e282
Remove Inventory->sendSlot() and Inventory->sendContents()
...
the plan is to remove this from inventory entirely and use listeners for this.
2019-06-13 18:14:11 +01:00
7ba1dd3242
BaseInventory: remove setSize()
...
no inventory is designed to deal with this. Changing this can break transactions, specialized logic like double chest / furnace and more.
2019-06-13 17:24:17 +01:00
f128fc1849
Merge branch 'stable'
2019-06-13 16:07:00 +01:00
6bd67730eb
AsyncWorker: use a shorter name on logs
2019-06-13 14:00:26 +01:00
e95d81e04b
Server: fix possible comparison bug in load orders
2019-06-12 19:50:27 +01:00
31f0576725
Server: remove useless constructor assignment
2019-06-12 19:47:51 +01:00
8afea36919
Clean up some internal commands protocol handling
2019-06-12 19:35:14 +01:00
4364d2a942
AvailableCommandsPacket: Clean up internals
...
this is still disgusting, but it's a little more bearable now.
2019-06-12 16:54:30 +01:00
9765d78a5d
Merge branch 'stable'
2019-06-11 19:19:32 +01:00
858f440bcf
TimingsHandler: return the result of $closure() for easier usage
...
this isn't type safe, but it doesn't matter a whole lot, and there's nothing we can do about it without generics.
2019-06-11 15:04:30 +01:00
de6053de11
TimingsHandler: use a try/finally block in time()
2019-06-11 14:54:54 +01:00
f349a58f2b
TimingsHandler: added time(Closure) function
...
I find myself often using try/finally blocks to avoid accidentally forgetting to stop a timer. This allows a cleaner more concise way of doing it.
2019-06-11 14:46:19 +01:00
1c69226187
NetworkSession: add an extra debug
2019-06-11 09:55:32 +01:00
8e6f21afad
clean up gamemode net sync
2019-06-10 19:58:14 +01:00
f0d56f25b6
Moved creative inventory sync to NetworkSession
2019-06-10 19:54:24 +01:00
dd45753fa9
NetworkSession: add some more debug
2019-06-10 19:47:02 +01:00
3ac0c98199
De-spaghettify spawn notification handling
2019-06-10 19:31:54 +01:00
714393820f
MainLogger: Use millisecond precision on log timestamps
2019-06-10 19:14:08 +01:00
3175a319a2
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/VersionInfo.php
2019-06-10 18:20:01 +01:00
419fc418fe
SubChunk: reduce memory usage on fast-deserialized chunks
...
this saves about 25MB RAM on an idle server on HEAD commit with 856 chunks loaded.
2019-06-10 15:52:21 +01:00
261ba017a6
Merge branch 'stable'
2019-06-10 11:15:17 +08:00
c1f900ab18
Start using transactions for block placement
2019-06-08 18:56:27 +01:00
f84040a7ad
FlowerPot (tile): Allow BlockFactory to determine id/data validity
2019-06-08 17:55:50 +01:00
1b629d7ac0
implement daylight sensor power recalculation
2019-06-08 17:52:47 +01:00
73964e6e2f
Always do chunk relighting for unlit chunks on load
...
this is necessary because we stopped saving light info some time ago, so it has to be calculated on load for things to work properly.
2019-06-08 17:47:55 +01:00
ad1b9e5cdd
fix item pickup animation
2019-06-08 17:35:56 +01:00
43dfc8ae0f
Remove update mechanism for tiles, delegate to block instead
...
block handles triggering tile update on furnace for now.
2019-06-08 15:44:38 +01:00
fefc9b5278
wtf PhpStorm
2019-06-07 19:36:56 +01:00
5e88fda824
added BrewingStand tile (implementation incomplete)
...
since we already have a partial implementation of brewing stand, we should also have the corresponding tile so that PM doesn't create any more busted blocks.
2019-06-07 19:29:26 +01:00
3bc8244673
proper remapping for the old all-sided-log bug block
2019-06-07 19:25:44 +01:00
659cad0eff
BlockFactory: added a hacky method to allow block state remapping
...
we need this for fixing old data in some cases
2019-06-07 18:31:37 +01:00
f30cee15ca
added Dried Kelp block
2019-06-07 18:03:17 +01:00
a2274429ab
Chest: constrain pair positions to immediately horizontally adjacent blocks
...
under normal circumstances a chest will never pair with a chest which isn't directly next to it anyway.
2019-06-07 17:24:59 +01:00
cc6296b019
Furnace: give some properties clearer names
2019-06-07 15:41:32 +01:00
7eb9b33fd6
Extract a CreativeInventory unit from Item
...
this will probably undergo further changes, but I'm primarily interested in just encapsulating the existing functionality for now.
2019-06-07 14:24:03 +01:00
41039cecc1
Furnace: remove redundant network properties
...
these properties are continuously updating when the furnace is active, but they never trigger cache destruction, which means this is sending outdated garbage over the network, which is entirely unnecessary anyway.
2019-06-07 14:15:47 +01:00
857092cf65
Furnace: Use the correct method to sync furnace fuel max burn time to the client
2019-06-07 14:06:17 +01:00
741d2a7380
devtools rollback
2019-06-07 10:49:58 +01:00
b0071ed703
Revert "remove PluginBase->getFile()"
...
This reverts commit 67321bb3f6 .
2019-06-07 10:44:52 +01:00
b5805c2d0a
Extract a ResourceLoader unit from PluginBase
...
this will allow addressing the resource accessing crash issue for script plugins, once fully implemented.
2019-06-06 19:32:23 +01:00
67321bb3f6
remove PluginBase->getFile()
...
this is in preparation for opening the doors to more exotic kinds of plugin loaders, such as eval()d or web plugins.
2019-06-06 18:35:47 +01:00
d176f6f1ca
update DevTools submodule
2019-06-06 18:35:05 +01:00
f8a7766880
PluginBase: remove useless function
...
it's possible to check the loader instance instead of doing this, and we're gunning to get rid of the path from the plugin base.
2019-06-06 18:22:20 +01:00
44c791f03e
Thread/Worker run() are now final, to set up common environment things
2019-06-06 16:44:32 +01:00
e07f3e8e65
fine, variadics are annoying and this is easy to break ...
2019-06-06 15:12:46 +01:00
5c5fbf9b78
fixed oopses in 287c8c2dd4
2019-06-06 15:09:35 +01:00
32c832c87e
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Server.php
# src/pocketmine/item/Item.php
# src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter.php
# src/pocketmine/network/mcpe/RakLibInterface.php
# src/pocketmine/network/query/QueryHandler.php
# src/pocketmine/utils/Utils.php
2019-06-06 15:04:05 +01:00
61afc7b62c
NetworkSession: report the zlib error that happened
2019-06-06 14:16:04 +01:00
9f0a184a5d
Packet: Remove mayHaveUnreadBytes()
...
this was an old hack to prevent debug spam being emitted when we halted decoding of logins over breaking protocol changes. Since then, we've gone back to trying to decode the packet regardless, so this property is useless.
2019-06-05 15:37:35 +01:00
3b5df90b0b
BossEventPacket: add some functions to ease creation
2019-06-05 15:14:37 +01:00
287c8c2dd4
Added static create() functions for many packets
...
There are a few motivations here:
1) Less boilerplate code (this can be written inline)
2) It's possible to provide multiple constructors for different packet variations to reduce the chance of errors.
3) It makes things catch fire on updates in ways that static analysers can understand.
2019-06-05 15:00:08 +01:00
09afb8e772
Living: don't create MobEffectPacket directly
2019-06-04 19:53:08 +01:00
cda565ba8c
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/inventory/ArmorInventory.php
2019-06-04 18:19:47 +01:00
6f29fe063f
move PlayerListPacket sending responsibility to NetworkSession
2019-06-04 18:02:36 +01:00
89d4f596bd
World: add and use a prefixed logger in some places
2019-06-04 14:23:40 +01:00
3c3e5a9850
ConsoleCommandSender: Do not hard-depend on MainLogger
...
this dependency makes it impossible to swap out.
2019-06-04 14:06:45 +01:00
5d16a48361
FormatConverter: Follow the standard format for log prefix
2019-06-04 14:04:29 +01:00
0ae3c734ea
RakLibInterface: remove unused variable
2019-06-04 14:00:01 +01:00
f5b149a022
RakLibInterface: Use the session's own logger to report handling errors
2019-06-04 13:56:52 +01:00
6743234461
AutoUpdater: add a prefixed logger
2019-06-04 13:51:17 +01:00
e69ab60034
MemoryManager: use prefixed loggers
2019-06-04 13:49:07 +01:00
3569f8dfbe
QueryHandler: move to a prefixed logger
2019-06-04 13:44:35 +01:00
df0acea2f4
Player: add a prefixed logger
2019-06-03 19:30:26 +01:00
56a4e8c032
Hopper: add more boilerplate code to fix inventory leak
2019-06-03 19:17:13 +01:00
7a05c46ff6
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
2019-06-03 18:21:49 +01:00
8e24e5655a
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/entity/Attribute.php
2019-06-03 17:45:25 +01:00
087df45a3c
added some effect ID constants
2019-06-03 16:17:36 +01:00
9d42bc3c0c
updated consistency check for ad79e6cd8e
2019-06-01 12:12:55 +01:00
ad79e6cd8e
partial implementation of hopper (just enough to load/save all data)
2019-05-31 19:32:19 +01:00
e091cfe1de
interface Container extends InventoryHolder
2019-05-31 18:59:18 +01:00
df8db3b8e3
Merge branch 'stable'
2019-05-31 17:13:13 +01:00
efe30ffb07
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
2019-05-31 15:31:32 +01:00
1049ffecc9
Sound->encode() now accepts Vector3|null
...
this will be needed for proper no-relative sound support.
2019-05-30 19:51:27 +01:00
77ace57985
BlockEventPacket: added a ::create() method
2019-05-30 19:44:29 +01:00
790c2cd4b7
added missing Monster Spawner tile
2019-05-30 19:26:16 +01:00
1bf5c74053
added missing DaylightSensor tile
2019-05-30 19:00:38 +01:00
f18da8d879
Added missing tile for Note Block
...
this doesn't come with a full impl because that requires some further changes like adding materials, which is out of the scope of this commit. This is here to prevent additional data loss in imported worlds.
2019-05-30 18:53:20 +01:00
ece4d99c1e
fix crash on invalid NBT during itemstack decoding
2019-05-30 09:53:20 +01:00
3d8cd54f16
Update composer dependencies
2019-05-30 04:26:06 -04:00
f3daf612ee
Merge branch 'stable'
2019-05-27 19:12:29 +01:00
bcff124953
BaseRail: move reconnect attempt to post-place hook
2019-05-27 17:55:19 +01:00
28f3322337
Block: add onPostPlace() hook
2019-05-27 17:30:57 +01:00
11d21448fc
Utils: remove dead function
2019-05-27 17:12:33 +01:00
7eb8d8e366
Require Closures in more places instead of callable
...
Non-closure callables have strange context-dependent behaviour and are slower to call than a closure. It's possible to use Closure::fromCallable() in the origin scope, which guarantees that the callable will remain callable no matter where it's used.
2019-05-27 17:11:35 +01:00
2720ff9607
Skin: debloat geometry in constructor directly
2019-05-27 16:45:55 +01:00
89242543b9
Clean up Skin error handling, close #2926
...
Skin->__construct() now does all the validation.
2019-05-27 16:20:46 +01:00
0a891f5408
Move some things out of LoginPacket and into the handler
2019-05-27 16:06:53 +01:00
3902a3c28c
Require opting into receiving cancelled events instead of opting out ( #2906 )
...
Warning for plugin developers: This is a silent BC break. It won't raise any errors.
This alters the default behaviour of event handlers to **not** receive cancelled events by default.
It is now required to opt into receiving cancelled events by using the @handleCancelled directive (or the handleCancelled parameter where it's appropriate).
The ambiguous @ignoreCancelled directive is now ignored.
Ramifications:
- The majority of handlers with `if($event->isCancelled()) return;` no longer need such checks.
- Handlers with `@ignoreCancelled true` or `@ignoreCancelled` annotations can have them removed.
- Handlers which want to receive cancelled events need to use `@handleCancelled`.
2019-05-27 15:47:58 +01:00
2eb498b84c
ItemFactory: add getAllRegistered()
2019-05-26 19:45:47 +01:00
c1a7d86670
leveldb: more historical versions
2019-05-26 19:35:18 +01:00
e6048e115e
leveldb: add more chunk versions
2019-05-26 18:01:24 +01:00
2c40fbfe11
add some TODOs for tiles
2019-05-26 16:27:20 +01:00
33d1203bfd
Player: move sendAllInventories() to network layer
2019-05-26 15:58:03 +01:00
85718e2750
Clean up a bunch of garbage in Furnace
2019-05-26 15:43:46 +01:00
32e03cd92d
DoubleChestInventory: remove duplicated code
2019-05-26 15:01:32 +01:00
685f5d562b
DoubleChestInventory: fixed use of void result
2019-05-26 14:48:52 +01:00
d23dbc69f1
BlockFactory: Alias some classes to improve readability
2019-05-25 19:59:24 +01:00
a44d47fd3c
BlockFactory: Consistently use aliases to refer to tiles
2019-05-25 19:25:42 +01:00
b329cac3d2
Move pocketmine\tile\* to pocketmine\block\tile\*
2019-05-25 19:23:43 +01:00
066eadd687
Move responsibility of copying block-picked item NBT to Block instead of Player
2019-05-25 19:00:11 +01:00
c29523baf4
added a bunch of new blocks
2019-05-24 19:59:03 +01:00
54216c2fee
Block: Blow away a bunch of useless classes
2019-05-24 19:38:43 +01:00
d25ecbebd4
Merge branch 'stable'
2019-05-24 17:33:51 +01:00
3ea8da2dd3
Use EnumTrait->equals() instead of direct comparison
...
It's not guaranteed that objects provided are the same as those in the enum registry, so they can't be directly compared.
Implementing comparison with === would require some kind of __equals() implementation or an extension to hook into such functionality.
2019-05-24 17:21:44 +01:00
9ce1e29a17
Player: fixed bow shooting, closes #2931
2019-05-24 15:58:00 +01:00
1c99602a3f
Player: give some inventory vars clearer names
2019-05-20 19:38:53 +01:00
297ca25123
remove usage of inventory network IDs for marking permanent windows
2019-05-20 16:45:46 +01:00
cd0f0cb66c
missed this in previous commit
2019-05-20 16:45:00 +01:00
d6ce3f82b1
Inventory: remove redundant return values
2019-05-20 16:30:00 +01:00
c21a25efb9
move more rollback handling to network handlers, out of Player
2019-05-20 16:13:14 +01:00
04d0b6c054
don't spam listeners with slot-change notifications when doing a content change
2019-05-20 15:45:15 +01:00
c13b352b76
fix armour not being set correctly on entity spawn
2019-05-20 15:31:23 +01:00
d9bc48bb01
CraftingGrid: Remove redundant overrides
...
the network session knows not to send this stuff because it's not associated with any window ID.
2019-05-20 15:15:20 +01:00
bca0833035
Clean up handling of armour sync
2019-05-19 16:56:10 +01:00
cd103cefcc
Redesign inventory listening API
...
given that inventory listeners are no longer allowed to fiddle with the outcome of changing contents, it's now possible to allow having multiple listeners receiving events.
It's likely that this will be used for network inventory sync in the near future.
2019-05-19 16:36:38 +01:00
dec6c9f49b
Removed EntityInventoryChangeEvent and EntityArmorChangeEvent
...
there is nothing that these events do that can't be fulfilled by transactions. They complicate the internal implementation and produce unexpected behaviour for plugins when cancelled.
TL;DR: Use transactions. That's what they are there for.
2019-05-19 16:02:03 +01:00
67affcea32
move more packet logic to net session
...
it seems like net session is turning into a giant dumping ground for sending API ... this needs to be cleaned up somehow.
2019-05-19 15:48:01 +01:00
57219abc9d
fix test failure
2019-05-18 20:20:33 +01:00
c3c2dd3988
Rename SimpleSessionHandler -> InGameSessionHandler
...
the "simple" name comes from the early days of this refactor before I started splitting everything up into their own units. This handler is now in good enough condition to have a proper name.
2019-05-18 19:13:41 +01:00
fa9fcea189
SimpleSessionHandler: Do not read blocks from world in onFailedBlockAction()
...
the world will do this anyway, so we can reduce our code burden here.
2019-05-18 19:11:23 +01:00
d44ec702b0
Added BlockDataValidator::read5MinusHorizontalFacing()
2019-05-18 17:42:03 +01:00
b11d3b0401
CraftingDataPacket: Fixed uncaught exception in decode
...
this is not exploitable because it's not a serverbound packet, but it should be fixed nonetheless.
2019-05-18 17:19:44 +01:00
cd8645ff20
Removed PalettedBlockArray stub
...
the SubChunkConverter stub was accidentally removed in dd914e0752 , but no great harm done ...
2019-05-18 15:15:20 +01:00
6de0b48c1f
PacketBatch: Always encode packets freshly, never reuse buffers
...
this causes bugs when a packet is modified during events and then re-sent to a player. Since we can't control this, we can't allow this kind of buffer reuse.
The only notable case where this will cause loss of performance is when broadcasting a series of packet(s) which accumulate to less than 256 bytes, which is reasonably cheap to encode anyway.
In addition, removing this caching is one roadblock to moving this serialization to native code, which will make it vastly faster.
2019-05-17 18:04:51 +01:00
64f7f558a4
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/entity/Human.php
2019-05-17 17:43:30 +01:00
0f398bbe66
LevelDB: Added conversion of legacy extradata -> 4D subchunk block layers
2019-05-17 17:15:45 +01:00
f7a9da4e92
PillarRotationTrait: Allow axis shift to be defined by the includer
2019-05-16 18:02:03 +01:00
dd914e0752
Block: move all legacy metadata constants into a dedicated class
...
this makes it easier to see what is using metadata (and makes it easier to get rid of later).
2019-05-16 16:55:44 +01:00
1898db840d
BlockFactory: more collapsible region things
2019-05-16 14:36:02 +01:00
642c16dfe7
added some //region ... //endregion
2019-05-16 14:35:34 +01:00
ff2600a0d0
Regenerated TODOs for BlockFactory and ItemFactory
...
also added //region and //endregion for IDE collapsibility
2019-05-16 14:20:51 +01:00
5024de38b8
added more types of stone slab
2019-05-15 18:15:25 +01:00
9ea684581f
Merge remote-tracking branch 'origin/stable'
2019-05-13 18:17:42 +01:00
fd413b512e
Remove useless Dandelion class
...
this class is line-for-line identical to the Flower class.
2019-05-12 18:42:49 +01:00
10831821be
Anvil: fix wrong visibility for recalculateBoundingBox()
2019-05-12 17:58:45 +01:00
85c6eb5003
Fence: cleanup some BB handling
2019-05-12 16:22:41 +01:00
166d821bcf
Stair: some BB handling cleanup
2019-05-12 16:22:20 +01:00
d6b720b55d
Wall: minor BB calculation cleanup
2019-05-12 16:21:52 +01:00
a19651a8dc
Painting: reduce complexity of getPaintingBB()
...
this makes it easier to unit-test.
2019-05-12 16:15:31 +01:00
adf4639625
Painting: Clean up painful BB calculation code
2019-05-12 16:10:51 +01:00
db4dac6d45
World: Remove incorrect isSolid() check for placement collision check
...
isSolid() != can be collided with. That's decided by the collision boxes provided, if any.
2019-05-12 16:00:38 +01:00
90e6073202
Vine: Clean up awful bounding-box calculation
...
the logic here is deceptively simple, just obscured by a lot of really nasty code.
2019-05-12 15:58:28 +01:00
41d754de5a
Vine: fix bug when reading state multiple times
2019-05-12 15:03:44 +01:00
c99846e069
Unify Item constructor style
...
this exposed a few more dead classes.
2019-05-11 18:24:21 +01:00
51f96b195e
ItemFactory: fix wrong typehint
2019-05-11 18:02:18 +01:00
0bf7fd2c0d
Partially revert "Separate block break-info to a separate dynamic unit"
...
This reverts commit 9e72bc91a2 .
2019-05-11 09:46:20 +01:00
650e186481
Removed bad assumption that every Flowable descendent is an instant-breaking block
...
I'm wondering if there is even a point to Flowable at this point. Half of the blocks inheriting from it do not break instantly, or have some other modification to tool requirements.
2019-05-10 17:00:01 +01:00
01ad568256
Air: use BlockBreakInfo::indestructible()
2019-05-10 16:30:14 +01:00
9e72bc91a2
Separate block break-info to a separate dynamic unit
2019-05-10 16:24:59 +01:00
3be5de4570
Separate WoodenTrapdoor from Trapdoor, fixed iron trapdoors being valid furnace fuel, closes #2914 for bleeding-edge
2019-05-09 19:30:18 +01:00
5eb3c52a37
added PunchBlockParticle, encapsulate more network logic
2019-05-09 15:40:58 +01:00
51a8c2be9d
Player: Move rollback responsibility to network for interact/break block
...
Custom player implementations might not need rollbacks (f.e. Specter).
2019-05-09 14:54:56 +01:00
ca7c23c137
Player: remove dead functions
...
these functions belong in the network session, and they are currently just proxies for them. In the future we might have players who don't have IPs at all depending on how they connected (for example Specter) so this stuff shouldn't be in here.
2019-05-08 19:47:25 +01:00
4634baeb02
Player: don't repeat yourself
2019-05-08 19:38:57 +01:00
cf73c7f5c1
Cleanup to world provider exception handling
2019-05-08 18:26:41 +01:00
a51c06116a
Merge branch 'stable'
2019-05-08 17:04:37 +01:00
19ac0811f4
Player: remove deprecated title functions
2019-05-08 16:44:18 +01:00
a331c5e13f
Player: reduce SetTitlePacket creation boilerplate
...
it's better to encapsulate all this logic in one place so that third party developers can more easily understand this, and also to reduce the amount of crap we have in Player.
2019-05-08 16:43:05 +01:00
9fbf41b9a1
Merge branch 'stable'
2019-05-08 15:41:17 +01:00
fc90cdcc95
fix #2910 WorldManager->getLevel() missed in refactor
2019-05-08 14:05:42 +01:00
cf0c0e72a9
Assume the player is online when they are, uh, assumed to be online
...
the checks removed here should never be hit under normal circumstances. If they were hit, they'd just conceal bugs which would cause a crash to happen later anyway.
2019-05-07 19:49:06 +01:00
78bb6f4a0c
Reduce complexity of chunk sending system
2019-05-07 19:26:01 +01:00
51548d1a27
World: remove useless internal function
...
this just complicates the logic for no reason. It had a purpose once, but no longer.
2019-05-07 18:51:26 +01:00
c1a483a36d
move entity spawning logic back to Player
2019-05-07 18:35:04 +01:00
d7a7ab5102
Move Entity despawn logic back to Player
...
this is not network-session specific, and different implementations will need to do this.
2019-05-07 18:01:23 +01:00
66481fedeb
Entity: Protect internal methods setPosition() and setPositionAndRotation()
...
teleport() should be used instead (or setRotation() for rotation-only changes).
2019-05-07 17:38:33 +01:00
00944eff72
Removed EntityWorldChangeEvent
...
there's nothing that can be done with this event that can't be done with EntityTeleportEvent. Having this extra event needlessly increases system complexity.
2019-05-07 17:37:10 +01:00
cb3a225d45
Merge remote-tracking branch 'origin/stable'
2019-05-07 17:28:07 +01:00
3cd6e12e71
Renaming "Level" -> "World" ( #2907 )
...
This has been a pain point for a long time due to the misleading nature of the name "level". It's also confusing when trying to do things like getting the XP level of the player or such, and also does not translate well to other languages.
This transition was already executed on the UI some time ago (language strings) and now it's time for the same change to occur on the API.
This will burn a lot of plugins, but they'll acclimatize. Despite the scary size of this PR, there isn't actually so many changes to make. Most of this came from renaming `Position->getLevel()` to `Position->getWorld()`, or cosmetic changes like changing variable names or doc comments.
2019-05-07 14:47:28 +01:00
427e334426
rename PacketStream to PacketBatch
2019-05-06 19:58:02 +01:00
ce61c6e0fd
PacketStream: added fromPackets() sugar
2019-05-06 19:54:42 +01:00
3415edf600
PacketStream: add @throws
2019-05-06 17:46:37 +01:00
c2771eba88
use the appropriate API for decoding packet batches
2019-05-06 17:46:17 +01:00
82974e0271
NullSessionHandler: possibly premature optimization
2019-05-06 17:28:56 +01:00
685481b172
NetworkSession: improve GC performance without crashing everything
...
this is necessary because some handlers have circular references to the session, which causes GC lag collecting them. This change allows them to be collected immediately without nuking internal state.
2019-05-06 16:43:05 +01:00
5250a432d1
NetworkSession: add a dedicated PrefixedLogger, clean up some boilerplate code
2019-05-06 16:32:34 +01:00
7ae84944ca
protocol: add some missing interfaces for new packets
2019-05-02 17:35:54 +01:00
6b4c11febb
Merge branch 'next-minor'
2019-05-02 17:26:02 +01:00
af07ffb292
Merge branch 'next-minor'
2019-05-02 16:44:50 +01:00
0317b0f22d
Merge branch 'next-minor'
2019-05-02 15:07:38 +01:00
1730415643
Player: remove useless checks from spawnTo(), closes #2897
...
this was caused by changes on 4.0, but this code is nonetheless useless.
2019-05-01 14:43:11 -04:00
293311569d
Merge branch 'next-minor'
2019-05-01 18:55:49 +01:00
67e75d6c0a
Moved DataPropertyManager to network namespace
...
this is _extremely_ network-focused code.
2019-04-26 18:57:44 +01:00
854a2f5135
Move a giant heap of network garbage out of Entity
2019-04-26 18:52:38 +01:00
ea8c723092
EntityFactory: added some documentation
2019-04-26 18:15:31 +01:00
854c3a816c
LevelManager::generateLevel(): avoid multiple return points
...
this could cause unexpected results if additional code is added after background generation in the future.
2019-04-26 18:05:34 +01:00
7c7f42eba6
Added API method to get & set autosave interval
2019-04-26 18:01:40 +01:00
6aa8276532
Revert "Player: removed useless addActionBarMessage()"
...
This reverts commit 7d22b2a6d7 .
2019-04-26 15:41:19 +01:00
6a2d1fbdda
Merge branch 'stable'
2019-04-26 15:06:46 +01:00
4ca40a21ae
Merge remote-tracking branch 'origin/stable'
2019-04-26 06:24:07 -04:00
7ec926867f
Merge branch 'stable'
2019-04-25 20:54:23 +01:00
7d712d68c4
Merge branch 'stable'
2019-04-25 18:31:22 +01:00
c5ca623124
Merge branch 'stable'
2019-04-25 15:27:13 +01:00
a3dea09e2a
sync with latest codegen changes
2019-04-25 15:19:15 +01:00
ffb0ed80a2
resync RakLib dependency
2019-04-22 22:29:54 +01:00
6af84caba6
Merge branch 'stable'
2019-04-21 17:52:57 +01:00
0dac982f16
Merge branch 'stable'
2019-04-21 16:56:53 +01:00
86cc151e60
Revert "Network: Each interface now keeps its own statistics"
...
This reverts commit 7720a0534e .
2019-04-18 15:45:03 -04:00
7720a0534e
Network: Each interface now keeps its own statistics
...
this allows more detailed analysis.
2019-04-18 19:57:40 +01:00
f933ce31dd
Merge branch 'stable'
2019-04-18 19:40:22 +01:00
752e398970
AsyncTask: TLS now supports storing multiple values (now requires a key/value pair)
2019-04-18 18:58:31 +01:00
a4c7ec077b
Fixed possible crash in ChunkRequestTask
2019-04-18 17:45:14 +01:00
5913d5038b
Cleaned up Entity->close() handling
2019-04-18 17:23:48 +01:00
cc01dfe8df
Player: protect usedChunks
2019-04-18 16:20:56 +01:00
d68501c748
fixed spawn-radius: 0
2019-04-18 16:12:20 +01:00
939dfd9269
First look at separating chunk sending from Level
2019-04-17 19:33:37 +01:00
0973e39697
Level: Fixed ChunkListeners not receiving some events when no loaders are using a chunk
2019-04-17 16:13:40 +01:00
3468f006a2
Use AsyncTask->onError() for chunk task crash tracking
2019-04-17 16:00:17 +01:00
e62bbd4754
AsyncTask: added onError() main thread hook, closes #2512
2019-04-16 17:44:14 +01:00
b4f6c1e1a6
Merge branch 'stable'
2019-04-15 18:58:53 +01:00
209ae51a67
Merge branch 'stable'
2019-04-15 16:11:49 +01:00
e506c7f7de
Call BlockTeleportEvent when dragon egg teleports ( #2840 )
2019-04-14 17:46:22 +01:00
cfd4580388
sync NBT network string length cap
2019-04-14 17:14:44 +01:00
9b0b8b9a0c
Sync NBT dependency
2019-04-14 17:11:56 +01:00
8a1c362db7
Server: remove dead function getDefaultGamemode()
...
this was functionally identical to getGamemode() and is now just a red herring.
2019-04-13 14:31:58 +01:00
6428ca2a42
Merge branch '3.7'
2019-04-13 14:27:14 +01:00
c4b4575c74
Refuse to load plugins with ambiguous minAPI versions
...
closes #2381
2019-04-12 19:51:43 +01:00
bf2851f324
Move API checking to its own class so it can be unit-tested
2019-04-12 19:45:41 +01:00
5f23fffdda
Merge remote-tracking branch 'origin/3.7'
2019-04-12 18:33:13 +01:00
342b48b758
VersionString: Use the correct bitwise operators
2019-04-12 18:32:15 +01:00
c310a0c50c
Merge branch '3.7'
2019-04-06 15:35:58 +01:00
c49ead1a4c
Merge branch '3.7'
2019-04-05 18:49:02 +01:00
e07b3f534b
Merge branch '3.7'
2019-04-05 09:36:57 +01:00
86a5a50330
Generator: remove more useless functions
...
these are red herrings for plugin developers since they are not used.
2019-04-04 17:53:25 +01:00
5a989d82bb
Generator: remove useless function getName()
2019-04-04 16:43:04 +01:00
e6a1f0eb8d
Command: remove duplicated code
2019-04-03 18:06:22 +01:00
0e3e984db9
Player: Disconnects no longer nuke player internals, (mostly) fixes #1239
...
there are some problems that haven't been accounted for yet, but this fixes all the direct crashes.
2019-04-03 17:44:34 +01:00
a0b8d9a64e
Merge branch '3.7'
2019-04-03 17:39:45 +01:00
f901c2a612
Player: move some functions to a more sensible place
...
let's keep disconnect-related logic grouped together.
2019-04-02 19:57:10 +01:00
f332550e52
Player: move toggle* rollback handling to network session
...
this allows network sessions to react to it how they want, or (in the case of things like Specter) perhaps ignore it.
2019-04-02 19:49:53 +01:00
80a6fc5dd1
BlockFactory: remove deprecated functions
2019-04-02 19:15:29 +01:00
b6e453a5f4
LegacyAnvilChunkTrait: remove obsolete TODO
2019-04-02 19:13:41 +01:00
7d22b2a6d7
Player: removed useless addActionBarMessage()
...
this is exactly the same as sendTip().
2019-04-02 18:43:14 +01:00
e5756dbf0b
Move a whole bunch of packet crap to NetworkSession
2019-04-02 18:31:16 +01:00
2c4f2810d2
AsyncTask: Remove misleading methods getFromThreadStore(),saveToThreadStore(),removeFromThreadStore()
...
These methods are commonly mixed up when we talk about thread-local storage. What these things actually do is store persistent data on the worker thread.
2019-04-02 14:57:11 +01:00
6214a9398d
Player: remove sendWhisper()
...
this can be done with a standard translated message, and with more customizability.
2019-03-31 19:25:09 +01:00
f0b85936cf
Improved /tell
2019-03-31 19:08:35 +01:00
c59a2d1b93
More hasFiniteResources() usages
2019-03-31 16:51:43 +01:00
f8ce7797db
Player: add hasFiniteResources()
2019-03-31 16:40:54 +01:00
42a263a9df
GameMode is now an enum
2019-03-31 16:19:36 +01:00
0017c0087a
oopsie woopsie
2019-03-31 16:17:01 +01:00
8c19f6cac8
EnumTrait: throw InvalidArgumentException from fromString()
...
this is more in line with expected behaviour, since this might be used to process arbitrary user input. Only calling an undefined magic static method should throw an Error.
2019-03-31 16:07:42 +01:00
cdeb3ea5a6
Sync NBT dependency
2019-03-30 19:53:24 +00:00
aff2e0c86c
Merge branch '3.7'
2019-03-30 19:19:02 +00:00
004e81ea35
XpLevelUpSound: fixed crash on non-multiples of 5
2019-03-30 18:44:30 +00:00
3ea5260935
Sync composer dependencies
2019-03-30 18:28:42 +00:00
1fd4077907
MainLogger: Always use CRITICAL for logException()
2019-03-29 15:28:11 +00:00
f638845ef6
Merge branch '3.7'
2019-03-29 15:16:27 +00:00
260fa50db4
Register Edu compound items
2019-03-28 14:23:42 +00:00
de193d41a0
Server: fixed console not receiving user broadcast channel messages
...
I'm not entirely clear how this managed to work to begin with really, but it's now fixed properly.
2019-03-27 23:53:39 +00:00
649ce5080b
StatusCommand: don't use config for reading global limit
2019-03-27 19:24:06 +00:00
0e806854b9
Server: clean up startup order a little
2019-03-27 19:16:39 +00:00
3de08bf452
Convert PluginLoadOrder into enum
2019-03-27 18:28:40 +00:00
2091354927
UUID: add type docs
2019-03-27 15:39:41 +00:00
d8c81c0a11
UUID: remove useless default values
...
these are overwritten by the constructor, so they have no use here.
2019-03-27 15:39:06 +00:00
7b2b43c0ca
....................
2019-03-26 19:56:03 +00:00
0aebb3f4fb
Clean up LevelSoundEvent handling
2019-03-26 19:53:40 +00:00
e1504c668e
LevelSoundEventPacket: more helpers
2019-03-26 18:23:02 +00:00
10db57655e
clean up some direct LevelEvent usages for sounds
2019-03-26 18:06:12 +00:00
37b5ad8350
Remove remaining direct protocol usages for particles
2019-03-26 17:00:00 +00:00
1bf0802275
LevelEventPacket: added create() to reduce boilerplate code
2019-03-26 16:49:00 +00:00
7333e7118e
Server: remove useless function
2019-03-26 15:52:34 +00:00
c98801402b
Network: silence unhandled packet message on bad raw packet
2019-03-26 15:13:36 +00:00
a9c76c2424
NetworkInterface: remove unused function
2019-03-26 15:09:43 +00:00
161d5bd6b8
Merge branch '3.7'
2019-03-26 15:02:17 +00:00
01e048c4d1
Move networkStart message to where we actually start network
...
i.e. the point at which a normal user can reasonably expect to be able to connect to the server ...
2019-03-26 14:07:32 +00:00
ca22223b62
PlayerDeathEvent: fixed constructor signature, closes #2835
...
can we ban multi-type parameters already? this is tiresome...
2019-03-25 14:55:25 +00:00
999174b0a7
Server: Delay RakLib start until after world loading
...
fixes #2816
2019-03-25 14:49:12 +00:00
0811ce81e5
Query: remove useless noise
...
why do we need 3 log messages for something that does ... basically nothing?
2019-03-24 19:53:20 +00:00
23071d257e
Extract process-related functions from Utils into a separate Process class
2019-03-24 18:57:32 +00:00
1ea5316a37
Whose idea was it to make this public...
2019-03-24 18:38:26 +00:00
97ccc6e880
Network: Don't ignore retval of raw handlers
2019-03-24 18:31:32 +00:00
d0940e4be2
Fixed raw packets in the buffer pre-ban still getting processed post-ban
2019-03-24 18:26:52 +00:00
6990d6239e
Network: Added RawPacketHandler interface, query handler is now a component
2019-03-24 18:02:19 +00:00
a753c1342d
Clean up Query cache handling, remove useless timeouts
...
the timeout was entirely useless, because:
- when shorter than 25.6 seconds (512 ticks) it would cause caches to be needlessly destroyed and regenerated
- when longer than 25.6 seconds, just made outdated caches persist for longer, even after the query info was regenerated.
This now uses a mark-dirty model to deal with caches, which means that plugin modifications to the query data will be reflected immediately, regardless of when they are made. Previously, modifying the result of Server->getQueryInformation() would have inconsistent results.
2019-03-24 17:43:02 +00:00
9c76fb7d96
Implemented plugin loading whitelist/blacklist by config file ( #2783 )
2019-03-24 16:18:13 +00:00
aea775c7c6
TallGrass: fixed seeds never being dropped when support is removed
2019-03-23 19:58:35 +00:00
d9134f28e4
Rename CobblestoneWall -> Wall
2019-03-23 19:50:07 +00:00
2a3e6dcf00
Rename BlockIds -> BlockLegacyIds
2019-03-23 19:46:31 +00:00
79ef8e0803
Replace all legacy blockID references with BlockIds::
2019-03-23 19:44:33 +00:00
f84d7ad70d
sync block TODOs
2019-03-23 19:21:11 +00:00
be0436b2a0
fix consistency check (again)
2019-03-23 19:20:52 +00:00
397713247d
SeaPickle: fix drops
2019-03-23 19:19:38 +00:00
6efdac63d0
added new Wood block
2019-03-23 19:18:25 +00:00
06a37cc462
Fixed "wood" collision
...
why the fuck Mojang...
2019-03-23 19:08:17 +00:00
e088da320c
ItemEntity: fixed mineWood achievement not working for acacia/dark-oak
2019-03-23 19:06:35 +00:00
d51ca0b655
Leaves: use instanceof Wood instead of legacy ID checks
2019-03-23 19:02:07 +00:00
a2f42a7016
Updated block/item ID constants from 1.10
2019-03-23 18:54:45 +00:00
1e096a408a
Cram Nether Portal
...
again, this is here for the state handling and the implementation is unfinished.
2019-03-23 18:38:14 +00:00
74e134136d
Make Infested Stone blocks known
...
this is not remotely a complete implementation, it's just here to make PM aware of these states so that world conversion can be handled correctly. A full implementation will come later.
Any blocks added in this fashion should be marked with a //TODO so future maintainers can find which blocks need work.
2019-03-23 18:28:29 +00:00
a8fa8572e1
partial sea pickle implementation
2019-03-23 18:11:27 +00:00
3c283aa700
fix consistency check (again)
2019-03-23 15:45:39 +00:00
905cb7544a
hack in different wood sign types
2019-03-23 15:44:28 +00:00
765c5963a8
Block: move a function
2019-03-23 15:01:35 +00:00
53bb05a6a7
Fixed different woodtype boats being missing
2019-03-23 14:51:58 +00:00
034bd716c8
Clean up WritableBook hierarchy
2019-03-23 14:36:03 +00:00
a74a4b579d
wtf @sandertv
2019-03-23 12:56:02 +00:00
98f56087de
make composer happy
2019-03-23 12:53:00 +00:00
15c6554d8a
Updated RakLib dependency
2019-03-23 12:52:50 +00:00
d4fe004375
More consistent fluency in Item API
2019-03-23 12:20:35 +00:00
1045088668
Move more packet handling logic out of Player
...
there is now only (1) packet handler remaining in Player. The reason I haven't targeted this is because it needs improvements of its own.
2019-03-23 12:12:30 +00:00
1bc37a1a8a
Player: Clean up movement processing, now API-ified
2019-03-23 11:33:32 +00:00
9cddfdf8ec
Revert "Move core permissions to default_permissions.yml"
...
This reverts commit 5fac5c7281 .
2019-03-23 10:41:50 +00:00
1d1a416afe
Player: Move construction logic to the top
2019-03-23 10:39:19 +00:00
f3309d3aec
Player: remove some field defaults
2019-03-23 10:29:16 +00:00
9ec62643d5
Player construction now happens when we're ready to create the player entity
...
this fixes a wide range of bugs with the initial spawn sequence, and allows to simplify a whole lot of player setup logic.
2019-03-23 10:13:14 +00:00
433dab078b
DataPacket events now use network sessions instead of players
2019-03-23 09:52:03 +00:00
afbd016611
Server: remove useless function
2019-03-22 19:38:33 +00:00
712e077bc1
Server: remove useless debug message
...
leveldb is now mandatory, so this message will always be emitted.
2019-03-22 19:31:10 +00:00
9904810f24
BaseInventory: Remove getDefaultSize()
...
it's possible to want to initialize dynamically-sized inventories which don't have a default size.
2019-03-22 19:21:41 +00:00
60225a378f
Player: fixed block-picking logic
...
this now matches vanilla (with some minor intentional differences) and works in survival.
2019-03-22 18:28:36 +00:00
f84a1729c6
Inventory: added swap() function
2019-03-22 18:11:32 +00:00
8e48c61daf
Merge branch '3.7'
2019-03-22 15:07:46 +00:00
9b11e39efc
use ??
2019-03-22 15:03:46 +00:00
d03f0aab37
Remove /reload ( #2823 )
...
For many years, this has been the cause of many users (particularly plugin devs) confusion. The reality is that /reload has little to no practical value. It does not reload plugin source code (contrary to popular belief).
2019-03-22 15:01:11 +00:00
6ec2a69417
Removed .docker/Dockerfile
...
1. The current Dockerfile is not directly related to the project, but just our very complex highly-coupled full-of-hacks build/release/deploy system.
2. We are no longer using Docker Hub Builder. An internal Dockerfile will be used on our Jenkins server instead, using the correct upstream phar build to prevent race conditions.
2019-03-22 12:51:50 +08:00
3dbed830ef
Fixed entities not loading on imported MCPE worlds
2019-03-21 20:03:10 +00:00
b8d1eb20b0
EntityDeathEvent: add XP amount API, closes #2690
2019-03-21 19:53:14 +00:00
89c0836047
Fixed paintings dropping multiple times, closes #2774
2019-03-21 19:46:43 +00:00
9ad7f74501
Merge branch '3.7'
2019-03-21 19:02:55 +00:00
588ebe446f
Fixed Chunk->setFullBlock() not creating new subchunks, closes #2821
2019-03-21 18:47:24 +00:00
8c536c248d
Updating for latest PocketMine-NBT changes
2019-03-21 15:58:22 +00:00
1ac255f955
fix some formatting issues
2019-03-21 15:46:07 +00:00
2966e87aae
BlockFactory: Regenerate TODO list
2019-03-21 14:33:56 +00:00
2e5ef4ba03
Merge remote-tracking branch 'origin/3.7'
2019-03-20 21:35:13 +00:00
cc78c9ef18
Merge branch '3.6'
2019-03-18 08:58:59 +00:00
8de9e61651
Item: Remove get/set/removeNamedTagEntry()
2019-03-17 17:49:09 +00:00
5830ca958b
Further out-phasing of legacy ID/meta
...
this paves the way for making internal IDs fully dynamic.
2019-03-17 16:01:04 +00:00
6f54b53f7a
thanks for being useless PhpStorm
...
these problems didn't show up in any inspections until I opened the fucking files...
2019-03-17 15:53:59 +00:00
87928038e6
sync deps
2019-03-17 15:19:47 +00:00
7d72b8e756
leveldb: use writebatch for chunk saving (faster I/O)
...
i don't know why this wasn't already using a writebatch, but it should have been.
2019-03-15 16:45:47 +00:00
9205bbaa42
... why is this not saved on provider close...?
2019-03-15 04:43:19 -04:00
a91f49220c
Chunk: Do not mark as changed on lighting updates
...
Since we don't save light to disk anymore, we don't need to care if a light update took place. This improves I/O performance.
2019-03-14 16:34:14 +00:00
62185d476b
RegionLoader: Fixed performance issue converting huge worlds
...
I was big nub when i wrote this code.
2019-03-14 15:22:44 +00:00
1e0f1e5b1a
RegionLoader: Stop unnecessarily writing location header on close
...
Any time a region is modified, the location header is written anyway, so this is entirely unnecessary.
2019-03-14 15:06:13 +00:00
d080d3bae0
RegionLoader: Write location table changes when deleting chunks
2019-03-14 15:02:15 +00:00
41d13b6f06
Player: remove dead condition
...
this can't be reached because the only place it's called is from Level->actuallyDoTick(), where it won't appear until long after the player is logged in.
2019-03-14 14:47:20 +00:00
a1ffaffa7f
Don't record player on stats until they actually exist
2019-03-14 14:46:19 +00:00
ebfe9caca3
Move too-early-send check to NetworkSession
2019-03-14 14:45:30 +00:00
26a5d97499
Some cleanup to player net session handling for connect/disconnect
2019-03-14 14:32:43 +00:00
fa7a4dc22e
Fixed warning of bad default format on new installs
2019-03-13 21:43:07 +00:00
34758e3bc6
RegionLevelProvider: clean up coordinate extraction, fixed a stupid bug
2019-03-13 17:35:09 +00:00
08c399529d
RegionLevelProvider: Unload regions when finished scanning them, fixes running out of file descriptors during conversion
2019-03-13 17:32:34 +00:00
ad19696364
Make Effect and Enchantment functions less verbose
2019-03-13 15:26:21 +00:00
01904adf49
Improve enum implementations, move some components to traits
...
The reason this uses a trait is because `self` refers to the including class in a trait, which offers a small amount of automatic type safety.
If we had templates or generics, this would be a generic class instead.
2019-03-13 15:10:31 +00:00
7f4b76aa86
Implemented blue ice
2019-03-12 19:38:03 +00:00
0e1a88f7e5
Armor: Implement right-click to equip, closes #2641
2019-03-12 19:01:36 +00:00
8b9eeb0b7f
Clean up Armor classes
2019-03-12 18:53:51 +00:00
2e4b3d3d46
Sync legacyID map (thanks @MCMrARM)
2019-03-11 17:38:02 +00:00
1d4f44d259
Updated BlockFactory consistency check data
2019-03-10 19:53:55 +00:00
13bea6c787
Updated Travis configuration
2019-03-10 19:53:55 +00:00
48427290c9
Regenerated BlockFactory TODOs
2019-03-10 19:53:55 +00:00
437750785f
Implemented barrier block
2019-03-10 19:53:55 +00:00
c2a069afd3
Implemented a bunch of new wood blocks
2019-03-10 19:53:24 +00:00
84bbd14a21
fixed wrong generator being set on converted worlds
2019-03-10 19:53:24 +00:00
85e1b77cae
fix crash in getHighestBlockAt()
2019-03-10 19:53:24 +00:00
18e16f8615
Fixed blockID truncation
2019-03-10 19:53:24 +00:00
7aa4c18afa
Fixed assert failure in SubChunk
2019-03-10 19:53:24 +00:00
a858103e6b
Support paletted subchunks, drop all formats except leveldb
2019-03-10 19:53:24 +00:00
dfc26395e2
Fixed missing logger injection
2019-03-10 19:53:23 +00:00
8cb24547ff
Goodbye McRegion o/
2019-03-10 19:53:23 +00:00
8d83d59cf0
Work around collisions in backup names
2019-03-10 19:53:23 +00:00
a0a8026cba
Implemented automatic world format conversion
2019-03-10 19:53:23 +00:00
ae9f57ac28
Revert "Remove hacks for triggering adjacent light refill"
...
This reverts commit 1dca9074d5 .
This change introduced performance issues with transparent blocks.
2019-03-10 19:50:35 +00:00
c266f86b1b
ItemEntity: introduce controls for despawn timers ( #2769 )
...
This opts _not_ to expose item "age" a la #2753 because "age" is a misleading term for it. In addition, further inspection of the problem led me to realize that exposing control of that AND despawn timeout was more complicated than simply having a despawn delay timer exactly like the pickup delay one. Everyone knows a countdown timer stops at 0, so this way we don't need any method to control the limit.
Closes #2667
Closes #2753
2019-03-10 12:05:21 +00:00
c05bc6a53e
Merge branch '3.6'
2019-03-10 12:03:39 +00:00
4c10476b15
Empty merge
2019-03-10 11:43:31 +00:00
3079fd0251
Fixed test failures introduced by 6fe366e1ac
2019-03-09 19:05:32 +00:00
b9208eb1fb
Merge branch '3.6'
2019-03-09 19:04:37 +00:00
2ae09f635b
Add more output to consistency check script
...
this helps catching state mapping bugs.
2019-03-09 17:19:17 +00:00
6fe366e1ac
Added some missing block properties
2019-03-09 16:49:37 +00:00
8f1bc5d497
Flatten wall_banner and wall_sign into single blocks ( #2798 )
...
This comes with some problems, but the problems are more bearable than the previous code.
2019-03-08 16:37:26 +00:00
bb718faa2e
Merge branch '3.6'
2019-03-08 13:57:32 +00:00
c68ee1d9d9
LevelDB: Mark chunks as changed when upgraded from an older chunk format
2019-03-08 13:55:56 +00:00
2b6a62be77
Fixed BlockFactory corruption with signs and banners
2019-03-05 15:32:06 +00:00
3f66600271
RegionLoader: Extract location table validation to separate function
2019-03-05 13:28:56 +00:00
f2404804d7
RegionLoader: clean up lastSector handling
2019-03-05 13:18:14 +00:00
07a9c35ee2
RegionLoader: Use objects instead of arrays
2019-03-05 13:10:17 +00:00
4d9b074641
Merge branch '3.6'
2019-03-05 12:10:16 +00:00
e31603fc45
Merge branch '3.6'
2019-03-05 11:21:55 +00:00
2795ad674b
add boilerplate code to check for generator validity
...
perhaps we should use an enum for this...?
2019-03-05 09:36:22 +00:00
2cad7166b1
GeneratorManager::getGeneratorName() now throws InvalidArgumentException on unregistered generator classes
...
the old behaviour allowed a bug in the world converter to go unnoticed.
2019-03-05 09:30:22 +00:00
3789f4d643
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2019-03-04 12:03:45 +00:00
f87dac7bb2
Merge branch '3.6'
2019-03-04 12:02:36 +00:00
5017e61cb2
ItemFrame: fixed cloning null
2019-03-03 21:12:52 +00:00
f83e5c195c
fixed tiles and entities not getting saved on fast-deserialized chunks
2019-03-03 18:26:05 +00:00
54ef965b2a
Added warnings when unknown entities and tiles are removed
2019-03-03 18:02:34 +00:00
f5dbbea5f5
Utils: added recursiveUnlink()
2019-03-03 17:39:23 +00:00
3509b26751
LevelProvider: added calculateChunkCount()
...
this will be used to provide progress information to the user during world conversion.
2019-03-03 17:32:57 +00:00
1bb9b3d3ab
Discard light information from disk storage
...
this makes world conversion faster and offers the opportunity to correct age-old lighting bugs.
2019-03-03 16:22:44 +00:00
6e00ab2069
Chunk: add getNBTentities() and getNBTtiles()
...
this shit is horrible, but it's needed for now...
2019-03-03 14:00:46 +00:00
93cd00ae8f
Remove dead settings from pocketmine.yml
2019-03-03 13:28:18 +00:00
c3e66e0adc
LevelManager: add debug message when a level takes too long to tick
2019-03-03 13:26:16 +00:00
6bd43a8215
Firehose auto-tick-rate anti-feature, closes #2665
2019-03-03 13:24:53 +00:00
d9880de2ef
LevelManager: improve debug message for autosave
2019-03-03 12:43:02 +00:00
743d91a670
Merge branch '3.6'
2019-03-03 12:38:19 +00:00
fc9a61859a
Item: remove misleading methods & premature optimization
2019-03-03 12:36:46 +00:00
abbdd7efdd
Item: make __toString() use base64 for displaying NBT
2019-03-03 12:33:28 +00:00
1c79d43d88
Merge branch '3.6'
2019-03-03 11:59:53 +00:00
0573838be3
rename submodules
2019-03-03 11:47:00 +00:00
158f81b427
Merge branch '3.6'
2019-03-03 11:15:40 +00:00
2bffd5cc1c
Add timer measurements for autosave
2019-03-02 18:20:25 +00:00
382488dd07
sync locale submodule
2019-03-02 17:20:37 +00:00
808259dccd
Introduce CancellableClosureTask
...
before anyone picks a fight about the naming, take it up with shoghi... let's be consistently wrong at least
2019-03-02 10:45:01 +00:00
6c8fa8ae28
More nullable and void typehints
2019-03-02 10:29:11 +00:00
1f5c901f29
ext-ds is now required
2019-03-01 20:03:16 +00:00
418d0f12fb
Slab: placement logic clean up
...
past me was full of shit, because blockReplace is the same as blockClicked when we click a single slab top/bottom to make a double slab, and the logic is identical to the below block with that in mind.
2019-03-01 19:15:24 +00:00
d961b272c7
Remove Tool <-> Block circular dependency in efficiency calculation
2019-03-01 18:18:56 +00:00
72233a509d
preprocessor fix
2019-03-01 18:08:03 +00:00
e9125af51d
Revamp Banner API (still rather ghetto)
...
this needs more work, like signs do.
2019-03-01 17:57:07 +00:00
80ac0180b3
Remove redundant isAffectedBySilkTouch() overrides
...
this was needed previously to prevent dropping blockitems when these blocks were destroyed. Now the item form is always yielded instead.
2019-03-01 13:34:32 +00:00
12dfcc9eb6
Banner: Sort lines lexicographically ascending
2019-03-01 11:06:42 +00:00
1e9e179ec0
Fixed Block consistency check failure since 943906cc6b
2019-03-01 08:24:25 +00:00
741d061415
NoteBlock: added //TODO
2019-02-28 19:59:33 +00:00
943906cc6b
Partial comparator implementation
...
this supports placement, toggling compare/subtract mode, simple stuff. No redstone functionality yet.
This is needed for blockstate mapping in blockfactory.
2019-02-28 19:26:47 +00:00
7b23baa020
FlowerPot: yield contained plant when block-picking
2019-02-28 17:49:48 +00:00
97a1d997e8
ItemFrame: yield framed item when block-picking, fixes [1] in #2706
2019-02-28 17:47:32 +00:00
d679fb7546
Block: Rename onActivate() -> onInteract()
2019-02-28 17:35:30 +00:00
c9eb642afd
PacketPool: missing @throws
2019-02-28 17:15:06 +00:00
08e799c35a
Once again... add a missing file...
2019-02-28 17:14:04 +00:00
5cca4b5e31
Revamp Sign API, flatten API into blocks
2019-02-28 17:10:37 +00:00
f680a239f7
NetworkSession: some exception handling cleanup
2019-02-28 16:36:03 +00:00
13b9fd7b66
RakLibInterface: Add error ID to make logs searchable when players report legitimate issues
2019-02-28 16:31:14 +00:00
d528fdddfa
DataPacket: Remove useless abstract function
...
this is declared in the Packet interface, so it doesn't need to be here anymore.
2019-02-28 16:20:58 +00:00
fb02071a9d
Traits suck. Fixed missed getDamage() from 9ad0ea85c7
2019-02-27 16:50:51 +00:00
08673172c7
Grass: Avoid usage of meta
2019-02-27 13:03:23 +00:00
9ad0ea85c7
Rename two misleadingly-named functions
2019-02-27 12:59:12 +00:00
ba616ed8a7
Player: Don't rely on magic numbers for gamemodes
2019-02-27 11:01:26 +00:00
31336a0d09
missed one
2019-02-27 10:37:13 +00:00
2d8480d801
Inventory: remove a bunch of crap from interface
...
some of these (notably the on* methods) are internal and shouldn't be exposed via interface (same crap as Plugin->onEnable() onDisable() etc) and the rest of the stuff is entirely unused.
2019-02-27 10:36:05 +00:00
9b3230aa9c
Merge branch '3.6'
2019-02-27 10:19:58 +00:00
440dd21550
Merge branch '3.6'
2019-02-26 19:59:24 +00:00
ceaf969203
EnderChest: fix hierarchy
2019-02-26 19:41:56 +00:00
cb91afcc00
Added SkullType enum, some cleanup to skull handling
...
this is still more ugly than I'd like it to be because of the way the blockfactory currently works.
2019-02-26 18:27:30 +00:00
edf4a719d5
DyeColor: add RGB colour values
2019-02-26 17:16:35 +00:00
202aef9846
fix failing tests
2019-02-26 16:35:33 +00:00
d7e73705c2
consistency check regen script now emits which states were added/removed
2019-02-26 16:35:14 +00:00
9afcd72fb6
Flatten FlowerPot tile into its block (mostly)
2019-02-26 16:31:38 +00:00
53af7f5da8
Implemented dragon egg
2019-02-26 15:35:37 +00:00
2d51622b12
Implemented frosted ice
2019-02-26 15:34:48 +00:00
6124f93cb4
Player: Clean up item frame drop-item hack
...
This is now re-routed through a newly-created attack-block handler.
Closes #339
2019-02-25 18:40:04 +00:00
fb378d9091
BlockFactory: fixed auto complete
2019-02-24 18:41:12 +00:00
0f7f5362b8
Revert "Block: Get rid of state bitmasks"
...
This reverts commit b7b05e729e .
Apparently this was premature, because we still need these things to deal with default state remapping.
2019-02-24 18:30:18 +00:00
6cb263fcca
BlockFactory: enforce stricter checks
...
this can help catch out variant-related bugs.
2019-02-24 17:59:09 +00:00
b7b05e729e
Block: Get rid of state bitmasks
...
This story dates back to the days when getVariantBitmask() was introduced. The purpose of this function was to allow the variant info to be extracted from the metadata, for use with item drops. This was later changed to state bitmask for reasons I don't clearly recall.
In the great 4.0 refactor, we now store variant magic numbers separately, so we don't need any generic bitmask to split up variant and state information anymore. Variant is now only ever serialized and never deserialized. The same thing goes for blockIDs. States are read from the world by matching the full stateID against a table of prefilled known blocks, so the variant doesn't need to be deserialized - only the state does, and the state metadata readers already do bit fuckery by themselves and don't need this mask - notice how little actual changes were required to get rid of this?
2019-02-24 14:42:53 +00:00
023fecabac
Added an annoying consistency check for BlockFactory
...
This test is intended to enforce that the BlockFactory always has the same blocks in it from one commit to the next. Since there are a lot of changes going on right now around this, it's important that this is checked because bugs can go under the radar when large changes are happening.
The consistency check will need to be regenerated whenever a new block is registered, new states are found or when things are removed.
2019-02-24 13:56:55 +00:00
6edd4fd9c7
BlockFactory: added getAllKnownStates()
2019-02-24 13:40:59 +00:00
73305a7425
oops, formatting issue
2019-02-24 13:22:11 +00:00
899081e1b9
Level: fixed randomTickBlocks, also delete some useless code
...
the randomTickBlocks thing is populated with state IDs anyway, not variants...
2019-02-24 13:10:45 +00:00
369a1e1472
Tripwire: fixed block picking
2019-02-24 12:41:44 +00:00
832ad0501a
Tripwire: added missing flag
...
it's unclear what the purpose of this flag is. It appears to always be set on placement and is never changed at any other time. The result is that the hitbox becomes larger when it is set.
2019-02-24 12:19:15 +00:00
a3907377f5
Merge branch '3.6'
2019-02-24 12:14:40 +00:00
97687f2236
Dye, banner and bed items now store DyeColor objects instead of using magic meta values
2019-02-24 10:48:40 +00:00
0bd1c1529e
Block: Rename getItem() to asItem()
...
this has clearer meaning and is less likely to collide with other things.
2019-02-24 10:23:40 +00:00
ff35736bf9
ItemFrame: added ROTATIONS constant
2019-02-23 18:27:47 +00:00
998dcb421e
Flatten Item Frame implementation into its block (mostly)
...
This exposes nice API on the ItemFrame class, while keeping the tile bullshit out of sight so that we can remove it later on.
2019-02-23 18:19:31 +00:00
878c704597
Remove another dead function
2019-02-23 17:15:50 +00:00
49f9605620
Level: Allow tiles to be sent with regular block updates
2019-02-23 17:01:59 +00:00
eadb1d310e
Level->sendBlocks() now syncs tiles
2019-02-23 16:53:29 +00:00
e1ef52c7c3
TileFactory: remove dead function
2019-02-23 15:57:53 +00:00
991483938c
SubChunk: remove legacy crap
2019-02-23 13:18:37 +00:00
66a1b35767
Merge branch '3.6'
2019-02-23 11:05:23 +00:00
0daf695825
Merge branch '3.6'
2019-02-23 10:51:28 +00:00
f669677d17
BlockTest: fixed failing test
...
this is a bad fix, but it doesn't matter a whole lot. The problem stems from furnace not having a valid 0 variant, so things go haywire when the default mapped 0 variant is registered to LIT_FURNACE because the default state is of course unlit.
2019-02-22 18:56:14 +00:00
707faef0f7
BlockTest: remove redundant name test
...
name is mandatory in the constructor now, so this isn't necessary anymore.
2019-02-22 18:54:21 +00:00
0f2f05fbb9
Merge branch '3.6'
2019-02-22 18:14:17 +00:00
9c085799e6
Removed leftover import from 3d1502c9ad
2019-02-22 12:56:14 +00:00
c26544475e
More PHP 7.1 nullables
2019-02-22 12:55:34 +00:00
73a565355b
Make some forced-optional nullable parameters non-optional, PHP 7.1 style
...
these parameters did not make any sense to be optional, but were forced to be this way because of the way nullable types worked before 7.1.
2019-02-22 12:54:00 +00:00
a5c260352d
Infect remaining places with PHP 7.1 nullable typehints
2019-02-22 12:16:45 +00:00
461233db09
ItemFactory: Sort items lexicographically ascending
2019-02-22 11:52:22 +00:00
3037f45a0c
Implement new dye types, split bonemeal and cocoa beans into their own classes
2019-02-22 11:43:48 +00:00
2bfcd25848
Fixed typo in Repeater name
2019-02-21 18:41:04 -05:00
fd4a441f3a
Level: add unregisterChunkListenerFromAll()
...
it's not expected for chunk listeners to have to track all the chunks they are listening to under normal circumstances.
2019-02-21 14:51:16 +00:00
f9da0f3ece
Sapling: remove dead TODO
2019-02-21 13:09:05 +00:00
eabd8ce026
Fixup pressure plate hierarchy
2019-02-21 13:06:08 +00:00
28d01025b0
Improve consistency of handling coloured and wooden blocks
...
this is ugly, but less ugly than the earlier version.
2019-02-21 12:13:21 +00:00
0120585aee
Block: name is no longer nullable
2019-02-21 11:37:21 +00:00
e063c567be
Merge remote-tracking branch 'origin/master' into block-id-object
2019-02-21 10:41:25 +00:00
6ab171d629
Fixed unit tests
2019-02-21 10:41:06 +00:00
635fb5dde4
Clean up ID flattening hacks
2019-02-21 10:38:29 +00:00
3d1502c9ad
Apparently yaml_parse_file() doesn't respect access protocol
2019-02-20 17:11:26 -05:00
89fce7712a
Block: Clean up internal constructor inconsistencies
...
I don't dare look how big this commit is or how many bugs it introduced...
2019-02-20 19:21:51 +00:00
e93464f318
SnowLayer: fixed 8x layers being replaceable
...
this also fixes some placement bugs.
2019-02-20 16:29:34 +00:00
5fac5c7281
Move core permissions to default_permissions.yml
...
this is one of the few things that is actually better suited to a YAML file than code
closes #2594
2019-02-20 16:22:45 +00:00
7aa263d320
PermissionParser: add emitPermissions()
2019-02-20 16:21:25 +00:00
efc2d72d5f
Move permission parsing to dedicated PermissionParser class
2019-02-20 16:20:48 +00:00
58cafc853f
s/level/world (strings only)
...
we should look at doing this for code too, but for now I'm not planning to break everyone's plugins.
2019-02-20 15:33:46 +00:00
9354929cad
added a whole bunch of tests for enchantment handling
2019-02-20 14:43:57 +00:00
7170d9009d
Enchantment: more static getters, firehose magic numbers
...
This is similar in nature to 646fea5a4e .
On a side note: Migrating this way is a pain in the ass due to lack of types. What the heck is int supposed to mean?!?!?!?! At least if we wanted to go _back_ to magic numbers, it would be easy to locate everything with an Enchantment typehint...
2019-02-20 13:45:50 +00:00
646fea5a4e
Effect: Introduce a bunch of static getters, change a bunch of API to use objects
...
This introduces static getters for every currently-known effect type. At some point in the near future, the magic number constants (which are really network IDs, by the way) will disappear.
Migrating:
- If you used constants (like any sensible person would): for the most part it's just a case of adding a () anywhere you used an Effect constant.
- If you hardcoded magic numbers: ... well, have fun fixing your code, and I reserve the right to say "I told you so" :)
This achieves multiple goals:
1) creating an EffectInstance for application is much less verbose (see diff for examples, especially the Potion class)
2) plugin devs cannot use magic numbers to apply effects anymore and are forced to use type-safe objects. :)
This is a warning shot for plugin devs who use magic numbers. More changes like this are coming in the not-too-distant future.
2019-02-20 12:05:17 +00:00
15d4201c3a
Fixed tests broken by 88c4b836f0
2019-02-20 11:16:08 +00:00
2c8a065b94
Standardise SNAKE_CASE for surrogate enums
2019-02-20 11:14:07 +00:00
36e9db4c07
Generate methods for surrogate enums, nip stupidity in the bud
...
this also allows changing the internal implementation later without breaking plugins.
2019-02-20 11:09:22 +00:00
88c4b836f0
Make factory register methods less verbose
2019-02-20 10:24:44 +00:00
f351a86653
Flatten double slabs into Slab pseudo-variant
2019-02-19 11:14:06 +00:00
18f765338c
Slab: fixed replacing $blockReplace not creating double slab when not clicking on the replaced block itself
2019-02-19 11:09:11 +00:00
bf71ddb0b5
Snow layers now fall as expected
2019-02-19 10:01:57 +00:00
a4c3ee20b2
Extract Fallable into trait + interface
...
Traits are inferior to components in pretty much every aspect imaginable :(
2019-02-19 09:58:10 +00:00
6174f1e0ae
Pumpkin: fix BC issue, fix lit pumpkin rotation
2019-02-18 20:02:23 +00:00
6f4cec6465
add some blocks introduced in 1.9
2019-02-18 20:01:50 +00:00
a95ecb3ff9
FenceGate: implement in-wall checks
2019-02-18 19:00:58 +00:00
6f7c63e2a8
ItemFrame: add has-map bit
...
this makes the frame appear to cover the full block instead of the usual size.
2019-02-18 17:41:15 +00:00
8f26c3a2d4
Fix bonemeal count not reduced by CocoaBlock ( #2773 )
2019-02-18 16:31:07 +00:00
12dd6adfcc
Block: Derive light filter level based on isTransparent() return
...
this might be dynamic.
2019-02-18 13:27:22 +00:00
6cdd716c34
Merge branch '3.6'
2019-02-18 13:12:29 +00:00
b8adfd6948
edu: implement coloured and underwater torches
2019-02-18 11:37:57 +00:00
cd733c658b
Implement hard glass & hard glass pane
2019-02-18 10:50:29 +00:00
ab58d46a7f
Merge branch '3.6'
2019-02-17 16:12:21 -05:00
00b92eaa40
BlockFactory: Sort entries lexicographically ascending
2019-02-17 19:44:48 +00:00
1bc6483608
Fixed Dockerfile permission issues
2019-02-17 18:10:40 +00:00
9b372f8435
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2019-02-17 17:09:13 +00:00
3bbc0b5d5f
Merge branch '3.6'
2019-02-17 17:08:44 +00:00
9137eb0757
Added Dockerfile
2019-02-18 00:52:52 +08:00
c2735286ab
Merge branch '3.6'
2019-02-17 11:35:07 +00:00
7ea1f4fc91
Sign: fixed merge leftovers from 6424dc9c82
2019-02-17 11:10:17 +00:00
84cf7c11e6
Fixed some overlooked returns from dce08b4e88
2019-02-17 06:01:08 -05:00
22a21ecfd6
BlockTransaction: Take world in constructor
2019-02-16 19:57:55 +00:00
0794c94b4b
Rename BlockWriteBatch -> BlockTransaction
2019-02-16 19:53:15 +00:00
b252be1c7a
Added ItemFactory::air() sugar
...
This makes it easier to create air stacks without accidents, and also reduces the amount of throwaway air objects which get created.
2019-02-16 12:19:54 +00:00
0ac7164b16
Inventory: remove dropContents(), remove circular dependency
2019-02-16 12:19:46 +00:00
f49d590794
Level: remove getTiles(), more removal of tiles from user interface
2019-02-15 16:27:00 +00:00
65ce1a7581
Block: fixed correct-type tiles getting overwritten
...
this manifested by crashing the server whenever someone used a furnace.
2019-02-15 13:37:57 +00:00
01255c5368
Updated RakLib to get ITC efficiency enhancements
2019-02-15 12:29:16 +00:00
19f0d7f336
NetworkSession: Don't apply handlers to a disconnected session
...
closes #2756
2019-02-15 10:11:31 +00:00
dce08b4e88
Introduce Item use results - can be success, fail or none
...
closes #2693 , closes #2705 , closes #2734
2019-02-14 19:21:29 +00:00
d9bbe99b83
Merge branch '3.6'
2019-02-14 17:25:21 +00:00
d8a25020f1
Merge branch '3.6'
2019-02-14 16:17:39 +00:00
6424dc9c82
Merge branch '3.6'
2019-02-14 16:04:32 +00:00
205e13d880
Config: add getPath() ( #2758 )
...
Config->getPath() returns the path of the config i.e. the place where the config file is located.
2019-02-14 10:58:19 +00:00
470879c9bf
Merge branch '3.6'
2019-02-13 14:53:20 +00:00
7b6d76871c
Block: add face and clickVector to onActivate() parameters, closes #267
...
this is an old old old issue, i don't know why it wasn't addressed sooner.
2019-02-13 14:29:59 +00:00
55be0716d8
Use DyeColor instead of ints for banners
2019-02-13 13:49:44 +00:00
01e7ebeb5c
Automate creation and deletion of Tiles for appropriate blocks
...
closes #880
2019-02-13 12:27:13 +00:00
260c5dcf00
Clean up tile destruction
2019-02-13 12:02:04 +00:00
1496eefb8b
Regenerated TODOs for item and b,locks
...
this sucks because it doesn't tell us anything about things that are meta values of other things (like dyes), but it's enough to start with.
2019-02-12 19:15:19 +00:00
59b62eaeba
Merge branch '3.6'
2019-02-12 16:59:06 +00:00
d30316101a
Of course, there was a bug in the script...
2019-02-12 16:30:31 +00:00
5227679602
sync item/block magic numbers with 1.9.0.15
2019-02-12 16:01:25 +00:00
7b3993730a
Block: Replace Color and WoodType magic numbers with type-safe objects
...
this provides automatic type safety without the need for magic number value checking everywhere.
2019-02-12 13:52:59 +00:00
18440f612f
Merge branch '3.6'
2019-02-10 17:40:09 +00:00
b6bcb47deb
Network->unregisterInterface() is now less useless
...
Interfaces are now automatically shut down when unregistered.
2019-02-10 17:07:58 +00:00
9ebd559907
Merge branch '3.6'
2019-02-10 13:59:44 +00:00
0c89159cf2
Merge branch '3.6'
2019-02-09 19:22:00 +00:00
1a8a04eab8
Merge branch '3.5'
2019-02-07 17:12:49 +00:00
b7973ef782
Merge branch '3.5'
2019-02-05 16:58:34 +00:00
d23e32622e
Clean up internal inconsistency in Color
2019-02-05 13:52:34 +00:00
c6a5829a92
Entity: remove dead function
2019-02-04 19:54:18 +00:00
c872b120d0
Entity->entityBaseTick() is now protected
2019-02-04 19:54:06 +00:00
acd0a8f2d4
fix possible crash in Projectile
2019-02-04 19:53:55 +00:00
537afbc23b
EffectInstance: Require positive amplifiers, closes #2723
2019-02-04 19:53:28 +00:00
55cd1f263d
SnowLayer: implement layers, closes #2657
2019-02-04 19:53:17 +00:00
923b1ad9a6
Split up ChunkLoader and ChunkListener
2019-02-04 19:53:03 +00:00
2c0f91ce50
Player: clean up chunk selection code
2019-02-04 19:52:36 +00:00
ce8d9fa9f4
Player: load chunks when registering as a loader, closes #2726
...
populateChunk() _sometimes_ does this, but not if the chunk is locked. This means that the empty chunk needed to prevent the shit hitting the fan isn't created when chunks are locked. This change resolves the problem because registerChunkLoader() calls loadChunk() with the create parameter as true when autoload is used. This is a shitty fix but it's the simplest one we have right now, and it works well.
2019-02-04 19:52:03 +00:00
002f030970
EnderPearl: make a hack less messy
2019-02-04 19:51:49 +00:00
dbae667dec
Silence more InteractPacket noise
2019-02-04 19:51:38 +00:00
ad6ae20d6b
Server: fixed getOfflinePlayerData() trying to load terrain (?!?!?!?), closes #2725
...
getOfflinePlayerData() will now return NULL if there is no stored data for a given player. The responsibility of checking the spawn point is now delegated to the Player, after it registers a chunk loader on its spawn chunk.
2019-02-04 19:51:11 +00:00
3e58708130
Add some missing @throws annotations
2019-02-04 19:50:43 +00:00
8387c08db2
Level: remove unused variable
2019-02-04 19:50:24 +00:00
c9f9f551f4
Merge branch '3.5' into master-rollback
2019-02-04 19:47:21 +00:00
c124aae219
Merge branch '3.5'
2019-01-30 13:09:43 +00:00
5c24ac604a
Merge branch '3.5'
2019-01-30 11:14:47 +00:00
90f3cb95d8
Merge branch '3.5'
2019-01-29 17:34:12 +00:00
c5f0665853
Merge branch '3.5'
2019-01-29 14:05:00 +00:00
b6ecab1d49
Merge remote-tracking branch 'origin/3.5'
2019-01-29 12:53:38 +00:00
ceddf6f5d8
Merge branch '3.5'
2019-01-28 17:52:11 +00:00
c3bbb8905c
Human: simplify setFood()
2019-01-28 17:33:58 +00:00
78dfcc5f2d
Move Effect and EffectInstance to entity\effect namespace
2019-01-28 15:41:07 +00:00
a6237958e8
Level: fix another crashy edge case in chunk ticking
...
this also removes a bias towards the chunk that the player is on, because this makes such chunks tick faster than adjacent chunks.
2019-01-27 20:41:47 +00:00
9ec40c421f
Split up Effects into a bunch of classes
...
Server-side levitation now works too.
2019-01-27 19:45:15 +00:00
729ae8bab7
Level: fixed adjacent chunk loading check
2019-01-27 16:20:38 +00:00
ac551cf248
Entity: add addMotion() to allow updating motion vector
...
this allows updating motion without needing to create new objects for the task.
2019-01-27 15:43:57 +00:00
bccc07633c
Entity: Allow disabling gravity for a mob
2019-01-27 15:42:46 +00:00
6f9c4eb8e8
Merge branch '3.5'
2019-01-27 15:08:26 +00:00
0b1bdec3ac
GameMode::fromString() now throws InvalidArgumentException
2019-01-26 17:09:54 +00:00
e86ff7d988
Merge branch '3.5'
2019-01-26 17:00:04 +00:00
d378371cc8
Transition to spl_object_id()
2019-01-26 15:06:38 +00:00
1e708db26c
Server: fixed wrong doc type on broadcastMessage()
2019-01-26 15:03:15 +00:00
d052b1a45f
Server: reduce code duplication in broadcast handling
2019-01-26 15:02:07 +00:00
d6e44c7475
Sync composer dependencies
2019-01-26 14:11:45 +00:00
eac8f639a7
Level: Simplify internal chunk ticking handling
2019-01-26 13:48:43 +00:00
519f6e2668
Merge branch '3.5'
2019-01-26 12:08:21 +00:00
939f3efa3b
Merge branch '3.5'
2019-01-25 19:44:08 +00:00
6ee484e401
ChunkLoader: remove getLoaderId() (take 2)
2019-01-25 18:58:01 +00:00
bb27c76d13
Merge branch '3.5'
2019-01-25 17:12:00 +00:00
8a0f5cd7c9
Merge branch '3.5'
2019-01-25 13:19:40 +00:00
9d69154da5
Merge branch '3.5'
2019-01-24 18:45:06 +00:00
469b24b0a5
Remove built-in spawn protection
...
Users should use the new BasicSpawnProtection plugin instead.
2019-01-24 16:56:15 +00:00
df09b0101a
Merge branch '3.5'
2019-01-24 11:50:19 +00:00
738e310798
Strip out RCON, closes #2686
...
Users should move to the new RconServer plugin instead.
2019-01-23 20:39:16 +00:00
61e04d5284
Merge branch '3.5'
2019-01-23 16:48:12 +00:00
6277787e0a
Convert Particle to interface
2019-01-23 12:18:24 +00:00
d2284d5c47
Move Particle IDs to protocol namespace
2019-01-23 12:16:01 +00:00
23a18a8eb6
Convert Sound into interface
2019-01-23 12:10:24 +00:00
2356991022
Merge branch '3.5'
2019-01-22 22:27:07 +00:00
17fee801e6
RCON: remove unnecessary function
2019-01-22 13:43:55 +00:00
1ebc101ded
fixed crash on dev build self-shutdown
2019-01-22 13:38:50 +00:00
48a99937b9
more exception handling cleanup
2019-01-22 13:37:46 +00:00
053defb7dc
Updated RakLib dependency
2019-01-21 14:19:15 +00:00
4ae6428641
Level: rename getCollisionCubes() -> getCollisionBoxes()
...
these aren't cubes! shoghi, please read the dictionary.
2019-01-20 18:11:20 +00:00
425ad6101f
Block: rename onEntityCollide() -> onEntityInside()
...
this better describes what the hook is for.
2019-01-20 18:09:47 +00:00
d586a18a16
Updated BedrockData submodule
2019-01-20 16:57:25 +00:00
ae7d6cc4a2
Merge branch '3.5'
2019-01-20 15:53:47 +00:00
467caf347d
NetworkSession: Consistently don't use 0x prefix
2019-01-20 11:06:47 +00:00
5d8568b1a4
Add NetworkSession->getDisplayName(), clean up ip/port ad-hoc usages
2019-01-20 11:05:12 +00:00
842eb0200e
Merge branch '3.5'
2019-01-19 19:14:39 +00:00
f9c067db50
Merge branch '3.5'
2019-01-19 17:48:57 +00:00
6df983da3e
Merge branch '3.5'
2019-01-19 16:24:41 +00:00
9d8a70d5cf
Level: use appropriate exceptions
2019-01-19 14:55:09 +00:00
65927e6965
Minor cleanup to Player NBT creation garbage
2019-01-19 14:32:20 +00:00
d3f9d1f3e7
Merge branch '3.5'
2019-01-19 13:57:42 +00:00
179fb9c7cb
Fixed tree trunk generation bug introduced by ac87319aed
...
Blocks were being overwritten in the writebatch which hadn't yet been set, so reading them from the world yielded air blocks instead of trunk, allowing the generation to overwrite blocks which should have been logs.
2019-01-19 13:41:28 +00:00
6b7710e62b
Introduce dedicated NBT data exceptions, fix up some corrupted chunk handling
2019-01-19 12:43:47 +00:00
c5998a92a8
PluginManager: clean up some Throwable abuse
2019-01-17 23:34:59 +00:00
c5df2f6f0d
Remove another Throwable abuse
2019-01-17 22:43:52 +00:00
2dee7e9e0f
Properly handle Query packet errors
2019-01-17 22:22:53 +00:00
38cf8d157d
Max players check now works properly
...
This now includes all connected sessions, whether they are considered online or not.
2019-01-17 21:40:10 +00:00
41676cb4d4
Server: remove some useless methods
2019-01-17 21:01:31 +00:00
bbc8bc4df5
Move some error handling stuff to SPL
2019-01-17 19:16:03 +00:00
e341f3dce2
Level: rename getName() to getDisplayName()
2019-01-17 16:46:56 +00:00
76f1ee1827
Add restrictions on packet send directions with interfaces
...
This prevents plugins sending wrong packets at the compiler level (or would, if we had a compiler). It's more robust than a getter for client/server and throwing an exception since a static analysis tool can detect faults created by sending wrong packets from the server. This is also used to deny service to dodgy clients which send wrong packets to the server to attack it.
2019-01-17 12:51:24 +00:00
b82e00ffdf
Extract a Packet interface from DataPacket
...
this is in preparation for clientbound/serverbound packet separation. I did this already on another branch, but the changeset was dependent on a massive refactor to split apart packets and binarystream which i'm still not fully happy with.
2019-01-17 12:21:56 +00:00
9c0ebb6350
Minor formatting fixes
2019-01-16 22:14:40 +00:00
38afe22b79
Move Event cancellable parts to trait
2019-01-16 22:14:25 +00:00
2e7e56de1e
Merge branch '3.5'
2019-01-16 21:52:03 +00:00
2656993223
AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2019-01-16 21:31:17 +00:00
fc98f4c42b
Address more error cases, some minor cleanup
2019-01-16 21:30:31 +00:00
44ef9fc577
LoginPacket: account for some missed error cases
2019-01-16 21:00:28 +00:00
c9c6a5dc94
Fixed some doc comments
2019-01-16 20:48:26 +00:00
23269da1a6
Fixed the disaster of packet receive error handling
2019-01-16 19:53:48 +00:00
ddc2bed63f
Add an API change request template
2019-01-16 19:21:37 +00:00
8bc33a849a
Remove built-in pcntl support
...
This is a bolt-on feature that can't be disabled and causes serious grief for Unix server users, because it prevents ctrl+c aborting the server the normal way.
Instead, we prefer introducing a plugin to implement this functionality, so that users can opt-in or opt-out.
2019-01-16 14:13:08 -05:00
390501ec35
Merge branch '3.5'
2019-01-16 18:57:17 +00:00
728bc95d73
NetworkSession: remove premature GC optimization
...
The only cyclic references here are both destroyed during normal collection directly (net interface removes from sessions array, player destroys its session reference), so there's no need to destroy them again here. This just causes a giant swathe of potential crashes for no real benefit.
close #2669
2019-01-16 16:50:16 +00:00
acdd0fec5f
NetworkSession: player may be null
2019-01-16 16:19:39 +00:00
f647b1b7a5
Some cleanup to internal sounds handling
2019-01-15 21:32:41 +00:00
c34a4f45d4
Merge branch '3.5'
2019-01-15 14:46:03 +00:00
f882f557fb
Merge branch '3.5'
2019-01-15 10:33:58 +00:00
242c7e3777
Grass: remove premature optimization
...
this is reading full-block from the chunk every access, which is slower than accessing the level block-cache.
2019-01-14 23:14:31 +00:00
797aabdf15
Entity: Protect move() to avoid stupidity
2019-01-14 19:57:46 +00:00
ff5cb84b81
Server: fixed an oops
2019-01-13 21:00:16 +00:00
3e1aa3e2b4
Network: remove Server dependency
2019-01-13 20:41:17 +00:00
9c53b41851
Added PlayerInfo, Player is no longer accessible during PlayerPreLoginEvent
2019-01-13 19:32:30 +00:00
d2082c0383
Explosion: Recalculate light on destroyed blocks
...
this has been a bug for a long long time. I think the reason it was never addressed is because of the performance impact associated with it. However, that performance impact is now gone thanks to light update batching.
2019-01-13 14:22:35 +00:00
1dca9074d5
Remove hacks for triggering adjacent light refill
2019-01-13 14:17:56 +00:00
82788774b0
Level: Queue all block updates until the end of tick
...
this allows deduplicating block updates when lots of adjacent blocks are set on a tick, which has beneficial effects on performance. It also fixes #2659 .
Future scope:
- Use this mechanism to deal with explosions properly.
- Don't execute block updates for air blocks.
2019-01-13 13:24:02 +00:00
d2768188e8
LevelManager: remove unnecessary message
2019-01-12 19:52:28 +00:00
5052b75565
Separate Level management functionality from Server, clean up a bunch of mess
2019-01-12 19:11:05 +00:00
27761ac26e
Fixed casing: Gamemode -> GameMode
...
it's two words, not one.
2019-01-12 16:19:31 +00:00
a756519e6b
Move gamemode constants & functions to their own class
...
future enhancements:
- make gamemode an object containing information about abilities that players have in this gamemode (gamemodes are just predefined ability sets)
- get the magic numbers out of the API
2019-01-12 16:10:14 +00:00
49bdd92faa
LoginPacket: Assert that extradata must exist
2019-01-11 17:56:18 +00:00
e9f023fe69
LoginPacket: fix corruption false-positives in offline mode
2019-01-11 17:55:58 +00:00
19614ed25e
Entity: move some NBT usages out of constructor, fix missing property defaults
2019-01-10 21:01:19 +00:00
f4d07f0c1e
Merge branch '3.5'
2019-01-10 19:31:01 +00:00
1f54760dae
Config: Make load() private
2019-01-10 18:03:15 +00:00
5d8fa2e126
Crash main server thread when RakLib dies
...
this way we get crashdumps and find out what's actually wrong with RakLib in the wild.
2019-01-09 19:04:12 +00:00
cc230034f9
Fixed TransactionData->actions default value, closes #2652
2019-01-09 14:15:06 +00:00
b9ce6537a8
Sync composer dependencies (master)
2019-01-09 00:22:42 +00:00
8452c7bdbd
Sync composer dependencies
2019-01-09 00:18:55 +00:00
2924303169
Sync NBT dependency
2019-01-07 22:38:04 +00:00
9c16caf27b
Fixed an edge-case in AvailableCommandsPacket decoding
2019-01-07 22:23:51 +00:00
4f50119b74
LoginPacket: Cater for more error cases
...
This now doesn't crash unexpectedly at the first sign of broken data.
2019-01-07 14:45:44 +00:00
8663be8504
moar issue templates
2019-01-07 00:59:16 +00:00
78cb6445a5
Introduce TileFactory
2019-01-07 00:20:24 +00:00
7d827a1c65
Introduce EntityFactory
...
This contains all of the static stuff that was previously embedded in the Entity static root. This solves a bunch of problems like circular dependencies between parent and child classes, encapsulating logic and reducing the size of the enormous Entity.php.
2019-01-06 23:54:29 +00:00
b1cef8509a
Revamp Entity construction
...
This is a similar refactor to the one I recently did for tiles.
- Entity::createEntity() is removed. In its place are Entity::create() (runtime creation, use where you'd use a constructor, accepts a ::class parameter, throws exceptions on unknown entities) and Entity::createFromData() (internal, used to restore entities from chunks, swallows unknown entities and returns null).
- Entity::registerEntity() is renamed to Entity::register().
- Added Entity::override() to allow overriding factory classes without touching save IDs. This allows more cleanly extending & overriding entities. This method only allows overriding registered Entity classes with children of that class, which makes code using the factory much more sane and allows to provide safety guarantees which make the code less nasty.
- Entity::getKnownEntityTypes() is renamed to Entity::getKnownTypes().
- ProjectileItem::getProjectileEntityType() now returns a ::class constant instead of a stringy ID.
- Cleaned up a bunch of nasty code, particularly in Bow.
2019-01-06 23:33:36 +00:00
3ae722867c
Merge branch '3.5'
2019-01-06 20:19:18 +00:00
f0733f6ab6
Merge branch '3.5'
2019-01-06 01:09:34 +00:00
f80eeee20f
Merge branch '3.5'
2019-01-05 18:59:13 +00:00
cdf2f98e26
Merge branch '3.5'
2019-01-05 17:41:26 +00:00
532def67ab
Merge branch '3.5'
2019-01-05 11:12:34 +00:00
d83f024a1f
Merge branch '3.5'
2019-01-05 09:27:16 +00:00
226db35cf9
Merge branch '3.5'
2019-01-04 23:56:53 +00:00
d8d04aeb53
fixup some imports
2019-01-04 23:49:32 +00:00
adc1069ed2
Merge branch '3.5'
2019-01-04 23:28:44 +00:00
febf1b1801
Merge branch '3.5'
2019-01-04 11:46:12 +00:00
7a4e2371e6
master-specific PHPStan nits
2019-01-04 00:40:09 +00:00
e1064a9e36
Merge branch '3.5'
2019-01-04 00:37:48 +00:00
8ef15d728a
HandshakeSessionHandler: fix a doc comment bug
...
thank you PHPStan ❤️
2019-01-03 22:36:31 +00:00
c559dfccfe
DataPacket: encode() and decode() are now final, encodePayload() and decodePayload() are now abstract
2019-01-03 21:14:54 +00:00
60687d8d6c
Merge branch '3.5'
2019-01-03 18:02:33 +00:00
9840a3c980
Merge branch '3.5'
2019-01-03 17:29:53 +00:00
4d15eb3327
Cleaned up the InventoryTransactionPacket decoding clusterfuck
...
@shoghicp, y u do dis... I almost created a sub-packet architecture to deal with this shit :(
This mess really ought to be split into multiple packets. Perhaps the PacketPool can be extended to do that in the future.
2019-01-03 17:24:30 +00:00
134956ac58
Add a Support issue template
...
maybe this will guide people who don't read into shooting themselves in the foot automatically >:)
2019-01-03 16:37:48 +00:00
5806ce9205
add a Crash issue template
...
valid crashdumps are usually self explanatory and include all required information like OS/version/etc, so there's no need to force reporters to rewrite a bunch of extra information that should already be in the crashdump.
2019-01-03 16:32:21 +00:00
7853076d80
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2019-01-03 15:45:33 +00:00
19fa6f5e8f
Merge branch '3.5'
2019-01-03 15:44:48 +00:00
6ad405950a
Update support.yml
2019-01-03 00:01:20 +00:00
71f123c616
Merge branch '3.5'
...
# Conflicts:
# resources/locale
2019-01-02 21:25:57 +00:00
5bb414620c
Merge branch '3.5'
2019-01-02 15:05:19 +00:00
171be946c6
Network: burn some deprecated stuff
2019-01-01 20:53:33 +00:00
f81bbd60e8
Avoid use of internal fields in BinaryStream
2019-01-01 16:42:14 +00:00
4a629e1a26
DataPacket: remove dead function clean()
2019-01-01 15:43:05 +00:00
c6a32ccf2a
Merge branch 'release/3.5'
2019-01-01 14:08:20 +00:00
ff3d2ba19e
Fixed no-NBT banner items always placing black banners, closes #2624
2018-12-31 22:04:08 +00:00
3b183447b0
Merge branch 'release/3.5'
2018-12-31 21:52:48 +00:00
8415e49a7f
Merge branch 'release/3.5'
2018-12-30 19:06:37 +00:00
c6036fb012
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2018-12-30 17:33:54 +00:00
ae497a828f
Merge branch 'release/3.5'
2018-12-30 17:33:31 +00:00
1e58144a38
Add Discord link to issue template
2018-12-30 17:19:25 +00:00
39c0fa6103
Merge branch 'release/3.5'
2018-12-29 20:58:12 +00:00
2e5465e328
Updated RakLib dependency
2018-12-29 20:13:28 +00:00
7b3115c00c
Moved network NBT serializer into network namespace
2018-12-29 20:12:00 +00:00
ac87319aed
Introduce a "block write-batch" concept ( #2555 )
...
Make use of writebatch to generate trees, doors and double plants safely
- Fixes #2441
- Fixes #2548
- Closes #2498
2018-12-29 12:00:14 +00:00
aaaddd1fd6
Terminal: stick a RESET on the end when writing a newline
2018-12-29 11:54:44 +00:00
d86107e22a
Terminal: Added write() and writeLine() to allow easily emitting Minecraft-formatted text to the console
2018-12-29 11:28:25 +00:00
498bffb34f
Fixed --enable-ansi and --disable-ansi not being respected on threads
...
this causes some breakage to the behaviour of Terminal, and for that reason this is going on 4.0.
Terminal::hasFormattingCodes() will no longer auto-detect whether colour codes are supported.
2018-12-29 11:23:32 +00:00
10ac322b8f
Merge branch 'release/3.5'
2018-12-29 00:04:33 +00:00
23954c4cda
RegionLoader: Remove dead/broken code
...
garbage collection does need to be implemented, but I was looking at this code and found so many fucking bugs I decided it wasn't worth the effort of fixing.
2018-12-28 23:03:24 +00:00
baf278831e
Merge branch 'release/3.5'
2018-12-28 19:32:48 +00:00
e6381297c7
NetworkCipher: fix some missing typehints
2018-12-28 17:35:37 +00:00
3ebd7e8ba6
Add network-wide API to filter raw packets by regex, stricter validation for Query
2018-12-28 16:30:52 +00:00
f06e67a792
Allow plugins to disable background generation ( #2613 )
2018-12-28 14:34:54 +00:00
78a80a6958
Tighten validity checks for block metadata
...
This filters out over 200 invalid states which were previously considered just fine, including zero-width cakes, buttons with broken facing values, furnace/chest with crazy values, and more.
2018-12-28 14:33:09 +00:00
333773bf14
Merge branch 'release/3.5'
2018-12-28 13:04:17 +00:00
045868783c
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2018-12-28 12:56:01 +00:00
e9d43aa44f
Fixed MainLogger not being assigned as global on async workers
2018-12-28 12:55:49 +00:00
f64cef7eb6
ItemFactory: Get rid of $multiple crap
...
this is required in a specialized format, which doesn't make any sense. Plugins with multiple packed item formats should parse them themselves.
2018-12-28 11:55:52 +00:00
ab75e89d95
Fixed generation changes in recent builds compared to 3.x
...
this was caused by improper RNG sanitization and a recent cleanup refactor.
2018-12-27 17:36:41 -05:00
cf20f0e23a
Merge branch 'release/3.5'
2018-12-27 15:53:12 +00:00
8564efc011
Sync item and block legacy IDs
2018-12-27 15:02:14 +00:00
b8f8a81704
Merge branch 'release/3.5'
2018-12-26 23:18:33 +00:00
ba33d8340a
Merge branch 'release/3.5'
2018-12-26 22:26:44 +00:00
a6cd9ae029
Implemented #2556 : don't send tile NBT updates until the end of tick
...
this eliminates spam when tile spawn NBT changes a lot during a tick, for example the lines of a sign being updated.
closes #2556
2018-12-26 22:18:52 +00:00
2c6381632c
Allow Tiles to decide how to copy data from an item
2018-12-26 20:01:14 +00:00
f6983efec1
Revamp Tile creation (again)
...
This breaks down the handling of tile creation even further.
- Introduced a static Tile::override() method to allow overriding the construction class for a specific type of chest. This applies to classes as opposed to save IDs, so you can override Chest::class with MyCustomChest::class and it will take effect for any Chest save ID.
- Removed MCPE stringy save ID constants from public Tile interface. These are now only used for creating saved tiles from a stored chunk, and saving them.
- Renamed Tile::registerTile() to register()
- Tile::create() and Tile::createFromItem() now accept a class parameter instead of a stringy save ID.
- Tile::create() and Tile::createFromItem() were changed to throw \InvalidArgumentException on unknown/unregistered tile types. They also now never return null, but always (except in exception cases) return an object which is an instanceof the base class specified.
2018-12-26 19:21:37 +00:00
9f4bb440bd
Move server-full/banned/whitelisted controls into PlayerPreLoginEvent
...
This allows plugins to more easily control the behaviour of server-full, whitelisting and banning. A message can be assigned for each, with a plugin custom reason taking the final priority if set.
This system solves several edge case problems in the Bukkit version by allowing kick reasons to be combined, so that removing one kick reason will roll back the final reason to the next highest, instead of just allowing the player through completely.
Only one message will be shown at point of disconnection, for consistency with the old behaviour.
The message priority is as follows (for all cases, only if set):
- Plugin reason
- Server full
- Whitelist enabled
- Player is banned
This also brings us one step closer to separating Player and NetworkSession.
2018-12-26 13:46:44 +00:00
02efa93e3a
PlayerPreLoginEvent: New, more elegant way to control authentication requirement
...
Previously the only way to deal with this was to cancel the PlayerKickEvent generated by lack of authentication. Now, plugins can decide whether auth should be required for a specific player. The default is whatever xbox-auth is set to in server.properties.
cc @Johnmacrocraft
2018-12-23 18:24:33 +00:00
f313d06070
Merge branch 'release/3.5'
2018-12-23 14:04:29 +00:00
0e108341d7
Merge branch 'release/3.5'
2018-12-22 17:37:32 +00:00
1520bccf7d
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2018-12-22 13:31:40 +00:00
e5cb48bec2
Merge branch 'release/3.5'
2018-12-22 13:31:18 +00:00
17e5f60410
Add community Discord to Discussion section
2018-12-22 11:24:04 +00:00
16ffd99005
Merge branch 'release/3.5'
2018-12-21 18:40:04 +00:00
b709e21622
Merge branch 'release/3.5'
2018-12-21 17:27:02 +00:00
a2e4fdc8a2
Merge branch 'release/3.5'
2018-12-20 20:02:16 +00:00
2506947641
Merge branch 'release/3.5'
2018-12-20 20:01:02 +00:00
20aaa8373a
Sound no longer extends Vector3
2018-12-16 14:26:42 +00:00
3c520aa786
Particle no longer extends Vector3
2018-12-16 14:15:41 +00:00
ebf9cb3e62
Merge branch 'release/3.5'
2018-12-16 14:13:35 +00:00
19edacbea9
BanIpCommand: fix crash when banning by playername, closes #2578
2018-12-15 13:59:10 +00:00
c5262fdf61
Merge branch 'release/3.5'
2018-12-14 17:32:58 +00:00
e0558d2551
Merge branch 'release/3.5'
2018-12-14 10:03:36 +00:00
125cc28aa0
Merge branch 'release/3.5'
2018-12-13 10:54:30 +00:00
e92aac847c
Merge branch 'release/3.5'
2018-12-13 09:56:54 +00:00
ffa733fe0c
Merge branch 'release/3.5'
2018-12-12 19:51:41 +00:00
a9dc447f8f
Tile: make createFromData() retrieve the ID by itself
2018-12-11 14:56:25 +00:00
d72e4cb9a1
Tile: remove createNBT(), add create(), createFromData(), createFromItem()
2018-12-10 19:40:37 +00:00
6dbceda3e8
Tile: Fill defaults and move code to constructors where appropriate
...
this is leftovers from when NBT was required to construct a tile.
2018-12-10 18:35:26 +00:00
7d594ac6d8
Merge branch 'release/3.4'
2018-12-09 19:28:52 +00:00
7f0667a1f0
Merge branch 'release/3.4'
2018-12-09 15:36:23 +00:00
9fed25d3a5
Merge branch 'release/3.4'
2018-12-08 17:08:25 +00:00
8dbeda69a7
Make use of Facing::rotateY() to reduce boilerplate
2018-12-07 10:49:12 +00:00
1cac2b098e
Merge branch 'release/3.4'
2018-12-06 21:08:47 +00:00
39e383a175
Entity: add getHorizontalFacing(), clean up some boilerplate code
2018-12-05 20:27:43 +00:00
f60d13548e
Fix another stupid recursion bug
2018-12-05 20:10:00 +00:00
c53d3c28fb
Register a couple of simple missing redstone blocks
2018-12-05 19:11:54 +00:00
281d8fd813
Redstone torch is lit by default
2018-12-05 15:07:18 +00:00
2014ebccd8
Make state setters fluent, clean up some BlockFactory noise
2018-12-05 15:03:59 +00:00
ceef3110d7
Remove dead function
2018-12-05 14:09:19 +00:00
cd5b81bdb9
ChunkManager: Remove getBlockIdAt()/setBlockIdAt()/getBlockDataAt()/setBlockDataAt(), add getBlockAt() and setBlockAt()
2018-12-04 22:27:00 +00:00
8dd2ea22b8
Level: make use of fromFullState() in getBlockAt()
2018-12-04 22:05:00 +00:00
47e62b1b38
Level: Add setBlockAt() which accepts integers instead of Vector3
2018-12-04 21:59:58 +00:00
b50e29085e
Remove InventoryEventProcessor, use closures instead
2018-12-04 19:02:26 +00:00
05e968d9fd
Merge branch 'release/3.4'
2018-12-04 18:40:54 +00:00
bfe766e626
oops, a merge error
2018-12-04 13:22:29 +00:00
8fc11c6ce0
Merge remote-tracking branch 'origin/release/3.4'
2018-12-04 13:18:56 +00:00
8051fa4f6d
Remove some direct Position->level accesses
2018-12-03 21:39:17 +00:00
9fb365306a
Make Block->position() accept Level,x,y,z instead of Position
...
since this is an internal method, it doesn't make sense to force a single parameter that requires potentially constructing a separate object just for the parameters, so we pass primitives instead, which are also easier to typehint against.
2018-12-03 21:18:22 +00:00
c3623478c1
Merge branch 'release/3.4'
2018-12-03 18:33:44 +00:00
302c509b9f
Merge branch 'release/3.4'
2018-12-03 16:17:26 +00:00
df9534e220
Merge branch 'release/3.4'
2018-12-02 16:44:03 +00:00
5936205760
Merge branch 'release/3.4'
2018-12-01 16:51:32 +00:00
206f913d2b
Merge branch 'release/3.4'
2018-12-01 10:10:52 +00:00
c46475ac4a
Merge branch 'release/3.4'
2018-11-30 19:28:06 +00:00
16006f9175
Make Tile constructors non-dependent on NBT
2018-11-30 17:05:36 +00:00
a2253e9e7d
Flatten still liquid blocks into a liquid block property
2018-11-30 16:06:35 +00:00
ed531c0009
Merge branch 'release/3.4'
2018-11-29 19:57:35 +00:00
790ef0325c
Merge branch 'release/3.4'
2018-11-29 18:47:25 +00:00
c3063ccc44
Remove useless CustomInventory class
2018-11-29 14:40:15 +00:00
650a2eee4b
Tile: remove unused import
2018-11-27 20:04:47 +00:00
5024713291
Fixed population artifacts always generating in the bottom subchunk, closes #2538
2018-11-26 14:29:06 +00:00
20f0e344d6
Merge branch 'release/3.4'
2018-11-26 14:02:59 +00:00
328ee40d5d
Bring back support for all-sided logs, properly this time
2018-11-25 19:52:45 +00:00
c809365c39
Make RedstoneRail class abstract
2018-11-25 19:22:00 +00:00
8fe3f6ef1b
Player now drops the contents of temporary inventories
...
these inventories are just glorified crafting tables.
2018-11-25 17:13:35 +00:00
a9a647855b
Remove useless Recipe interface
2018-11-25 17:08:09 +00:00
2ef91f6e2e
Merge branch 'release/3.4'
2018-11-25 16:36:46 +00:00
d0e2cdb54c
Tile: remove server field
...
it would be nice to get rid of the server dependency entirely... perhaps craftingmanager should be a singleton? it's contextless after all...
2018-11-25 15:58:24 +00:00
d8ea8fa0f0
Use Block objects more instead of legacy ID/meta crap
2018-11-25 14:55:12 +00:00
7399e9036a
Block: add method isSameState() to allow black-box comparison of blockstates
2018-11-25 14:53:57 +00:00
4698c723bd
Merge branch 'release/3.4'
2018-11-25 14:36:20 +00:00
7ddcd2941b
More AxisAlignedBB::one() usages
2018-11-24 19:49:15 +00:00
fcd81ada04
Make Thin use dynamic state properties
2018-11-24 19:44:32 +00:00
0fec58730b
Level: fixed recursion bug when reading dynamic states
...
calculating dynamic states in some cases requires getting properties from neighbouring blocks, but getting these blocks also causes their dynamic states to be calculated, leading to a bouncing recursion.
This change allows retrieving blocks without calculating dynamic state information, if the call was generated by calculating dynamic state information.
Since these blocks are incomplete, they should not be cached and are only used to allow another adjacent block to complete its state. It is therefore not possible for a block's dynamic states to depend on another block's dynamic states.
This recursion bug was observable by running /gc and walking into a door, which would cause the server to freeze and crash.
2018-11-24 19:44:31 +00:00
d426d18b77
Add dynamic shape property for stairs
2018-11-24 19:44:31 +00:00
1170b66fd5
Automate creation of tiles when they are used to store block properties
2018-11-24 19:44:31 +00:00
3f3bdaeba5
Use dynamic state detection to localize stateinfo stored in tiles (hack)
2018-11-24 19:43:02 +00:00
3af293f024
Added a mechanism for blocks to detect dynamic state properties from surroundings
2018-11-24 19:43:02 +00:00
b2201c8c59
Further cleanup to general AABB handling
2018-11-24 19:17:03 +00:00
d5ae4ad141
Sync Math dependency
2018-11-24 18:34:49 +00:00
101de7adda
Update Math dependency, obliterate some nasty code from Block
2018-11-23 19:41:52 +00:00
4c848bb4c1
docs fixes
2018-11-22 17:07:36 +00:00
8b350808ef
Fixed merge error
2018-11-22 16:56:44 +00:00
98efd27543
Remove ability to set blockID and blockdata independently
...
This was the cause of many inconsistency and broken world bugs. In the future (once we switch to paletted chunks) this won't be possible anyway. For now, some temporary API is provided to allow modifying chunkdata directly, but it is required that **both** must be provided.
2018-11-22 16:53:22 +00:00
507d47a6f5
Merge branch 'release/3.4'
2018-11-22 16:49:30 +00:00
a4e81674c3
Merge branch 'release/3.4'
2018-11-17 18:13:03 +00:00
f7ba4f553c
Merge branch 'release/3.4'
2018-11-17 16:30:19 +00:00
e67b1a20de
Merge remote-tracking branch 'origin/release/3.4'
2018-11-17 14:47:35 +00:00
20dad95755
Liquid: don't try to flow out of the world, close #2510
...
this fix is only required for master, although it could be backported.
2018-11-14 17:48:14 +00:00
5d7feaaf21
Remove EventExecutor, event handlers now use closures ( #2525 )
...
This cleans up some cargo-cult code poorly copied from Bukkit, which has negative performance effects and also makes internal event handling more complex than necessary.
## API changes
- Removed `EventExecutor` and `MethodEventExecutor`.
- A listener is no longer required for an event handler to be registered. Closure objects can now be used directly provided that they meet the conditions for registration.
- `PluginManager->registerEvent()` signature has changed: the `Listener` and `EventExecutor` parameters have been removed and a `\Closure $handler` has been added in its place.
- `RegisteredListener` now requires a `Closure` parameter instead of `Listener, EventExecutor`.
## Behavioural changes
These changes reduce the execution complexity involved with calling an event handler. Since event calls can happen in hot paths, this may have visible positive effects on performance.
Initial testing reveals a performance improvement of ~15% per event handler call compared to the old method.
2018-11-13 21:04:47 +00:00
ddef7bb09b
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2018-11-13 18:31:34 +00:00
3fb8029dff
Merge branch 'release/3.4'
2018-11-13 18:25:03 +00:00
3c86944a7c
Item: make addEnchantment(), removeEnchantment() and removeEnchantments() fluent ( #2523 )
2018-11-13 16:48:13 +00:00
45caec874e
Merge branch 'release/3.4'
2018-11-12 22:18:28 +00:00
3031128520
Merge branch 'release/3.4'
2018-11-11 19:52:05 +00:00
e16171e37e
Merge branch 'release/3.4'
2018-11-11 12:39:01 +00:00
95bf3ab7a8
Merge branch 'release/3.4'
2018-11-11 11:15:54 +00:00
2965109484
Merge branch 'release/3.4'
2018-11-10 22:37:17 +00:00
3a6af3327f
Encapsulate plugin.yml commands handling inside PluginBase, removed CommandExecutor requirement from Plugin interface
...
This removes the need for custom Plugin implementations to implement onCommand().
In the future it's planned to remove plugin.yml commands completely and have them registered similarly to how events are handled.
2018-11-09 19:50:52 +00:00
8b9ec5dde3
Merge branch 'release/3.4'
2018-11-07 22:11:27 +00:00
0b03e3c95b
Update dependencies, fix travis failure
2018-11-05 21:20:42 +00:00
67a5f3f557
Register MainLogger as SPL global, remove hard MainLogger dependency from many areas, break a bunch of cyclic dependencies
2018-11-05 19:01:59 +00:00
ed8569a3f4
Remove Collectable class, fix memory leak on AsyncTask fatal error
2018-11-05 17:26:22 +00:00
c201a0e909
Move language submodule to resources/
...
again, this isn't source code.
2018-11-05 09:49:21 +00:00
ce7718f0d1
Move resources/ directory out of src/
...
this isn't source code and as such doesn't belong in here.
2018-11-05 09:46:43 +00:00
2a5ab1f397
Merge branch 'release/3.4'
2018-11-04 23:33:10 +00:00
6437078c8b
TaskScheduler: remove deprecated constructor parameter
2018-11-04 23:30:04 +00:00
0028ce0ed2
Merge branch 'release/3.4'
2018-11-04 23:25:05 +00:00
2a43d9ecb6
Merge remote-tracking branch 'origin/release/3.4'
2018-11-04 22:56:03 +00:00
1c9137aa94
Merge branch 'release/3.4'
2018-11-04 22:18:15 +00:00
38d419fb29
Level: use isInWorld() where appropriate
2018-11-04 12:59:34 +00:00
6e05b5cc4b
Merge branch 'release/3.4'
2018-11-04 11:57:40 +00:00
0e87cf801e
Merge branch 'release/3.4'
2018-11-03 19:44:00 +00:00
652256a109
Merge branch 'release/3.4'
2018-11-03 16:58:19 +00:00
e94dd367ef
Merge branch 'release/3.4'
2018-11-03 15:46:31 +00:00
1b4c65e74d
Merge branch 'release/3.4'
2018-11-03 12:12:59 +00:00
acd3116591
Merge branch 'release/3.4'
2018-11-01 15:51:50 +00:00
4879eac946
Merge branch 'release/3.4'
2018-10-30 15:43:27 +00:00
d011fc518e
Fixed wooden doors not dropping when removing supporting block, closes #2436 ( #2496 )
2018-10-29 16:16:57 +00:00
95be571481
Fixed Item->equals() not working for no-NBT items since 9bb3c93285
2018-10-29 12:45:39 +00:00
3760307a88
Merge branch 'release/3.4'
2018-10-29 12:42:29 +00:00
a6c31b72ae
Level: throw exceptions on bad positions in setBlock()
2018-10-28 16:42:16 +00:00
7607e484dd
Expose chunk locking to the API
2018-10-28 16:32:56 +00:00
1e8b153662
Further cleanup to Simplex/Noise hierarchy
2018-10-28 16:30:18 +00:00
e1795dfd49
Fixed wtf in Durable->setDamage() exception throw
2018-10-27 21:50:14 +01:00
f4105fd91a
Noise: remove a ton of dead code
2018-10-27 17:04:53 +01:00
ff28c982ac
Kick out unnecessary Perlin class
...
the code in here isn't used anywhere except as a base for Simplex, so it makes more sense to flatten it and get rid of the crap.
2018-10-27 16:33:58 +01:00
9bb3c93285
Remove network-serialized item NBT from API layer, item NBT is now retained for the lifetime of the stack
2018-10-27 15:26:01 +01:00
d2513ff908
Merge branch 'release/3.4'
2018-10-26 20:09:11 +01:00
0ef81e701a
ItemFactory: Use a simple hashmap for item types
...
this is slower but yields less complicated code. Since this isn't in a hot path it's acceptable for this to slow down a little for the sake of sanity.
2018-10-26 18:38:24 +01:00
93131b4d92
Rename some meta usages to variant
2018-10-26 18:20:37 +01:00
7dd3b5b996
Durable: fixed leftover wtf from damage refactor
2018-10-26 18:17:34 +01:00
327c8361bd
Remove variant parameters from TieredTool
2018-10-26 18:16:31 +01:00
f438736af5
Make some item constructor variant parameters mandatory
2018-10-26 16:51:02 +01:00
51e13104dc
oops, missed one
2018-10-26 16:49:25 +01:00
712cafa0cc
Item: remove redundant meta constructor params
...
these ctor params should only be used for variants in the ItemFactory registration, but all of these items have no non-zero variants anyway.
2018-10-26 16:29:14 +01:00
88b3df76eb
Merge branch 'release/3.4'
2018-10-25 19:36:56 +01:00
c6a160d362
Merge branch 'release/3.4'
2018-10-25 18:42:19 +01:00
212d72657a
AsyncPool: Switch to a more efficient collection algorithm, revamp internals ( #2493 )
...
This greatly improves GC performance by being more intelligent about how it collects garbage tasks. It knows that if X task in the queue is not finished, none of the tasks behind it can be finished either, so there's no point checking them.
This also presents the opportunity to cleanup a lot of async pool internals, so I've taken it and torched a lot of garbage.
2018-10-25 15:36:38 +01:00
a7eaec13b9
Merge branch 'release/3.4'
2018-10-24 15:53:13 +01:00
2aaac5a425
Merge branch 'release/3.4'
2018-10-24 12:18:04 +01:00
011b9ae159
Update to latest NBT lib version
2018-10-23 16:47:00 +01:00
a49abff099
Merge remote-tracking branch 'origin/release/3.4'
2018-10-22 17:46:37 +01:00
90482e79bc
Merge branch 'release/3.4'
2018-10-21 18:23:54 +01:00
00b567e397
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2018-10-21 15:33:42 +01:00
e9a4acda1d
Merge branch 'release/3.4'
2018-10-21 15:32:57 +01:00
62db7727c0
Remove legacy issue template
2018-10-21 15:23:46 +01:00
08cf7e489f
Update issue templates
2018-10-21 15:23:06 +01:00
742fbc25c3
BlockFactory: fixed 0 being assumed to be default if used
...
this defeated the whole point of adding this code ...
2018-10-20 21:42:34 +01:00
159c3a1a91
Merge branch 'release/3.4'
2018-10-20 19:20:22 +01:00
bae140dc02
Entity: remove dead code
2018-10-20 19:05:39 +01:00
fb128d0276
Merge branch 'release/3.4'
2018-10-20 16:43:25 +01:00
605e7e08ed
Remove some deprecated methods
2018-10-20 15:29:43 +01:00
e035be8498
Remove some master-only usages of addGlobalPacket()
2018-10-20 15:27:08 +01:00
831a35ec69
Merge branch 'release/3.4'
2018-10-20 15:26:17 +01:00
517a21c418
RegionLoader: remove unused constant
2018-10-20 14:19:27 +01:00
d60c19551b
Merge branch 'release/3.4'
2018-10-19 18:53:24 +01:00
93b8a6c44a
Level: fix light removal bugs caused by 48a5eeb3a4 and 19e68f98a7
...
BlockFactory::\$lightFilter and Block->getLightFilter() are not equivalent.
2018-10-19 18:52:42 +01:00
7642298b4f
Merge branch 'release/3.4'
2018-10-19 15:56:07 +01:00
39808dd94f
Actually merge branch 'release/3.4' this time
2018-10-19 15:35:23 +01:00
d88b32da91
Drop useless numeric IDs for attributes, use strings instead
2018-10-19 15:29:01 +01:00
20b87b7875
Level: reduce complexity of populateChunk()
2018-10-19 15:29:01 +01:00
a2a6286e1c
ItemFactory: clean up some unnecessary code
...
this try/catch isn't needed because the list offset derivation function will deal with invalid IDs anyway.
2018-10-19 15:29:01 +01:00
e7494fff96
- the fix didn't fix
...
this is a mess
it would be nice not to have to start the server to find these kinds of bugs >.<
2018-10-19 15:29:01 +01:00
f81849e550
ItemFactory: fix special case handling for durable items, close #2483
2018-10-19 15:29:01 +01:00
9284e53f9e
Added failing test case for #2483
2018-10-19 15:29:00 +01:00
ec5af0398e
VersionString: use appropriate regex for number matching
2018-10-19 15:29:00 +01:00
7d74ebbebc
Merge branch 'release/3.3'
2018-10-16 09:51:30 +01:00
70054de575
Clean up garbage in Tree populators
2018-10-15 19:42:16 +01:00
cfee0a4e0b
Merge branch 'release/3.3'
2018-10-14 11:08:50 +01:00
1b572d3e40
Level: rename unload to onUnload()
...
again, this is an intentional rug-jerk, along with a clearer naming.
2018-10-13 15:43:43 +01:00
bb286dea91
Server: more elegant isLevelGenerated() check
2018-10-13 15:37:26 +01:00
39d1196e4c
Leaves: fix performance issue introduced by block meta nuke
2018-10-13 12:28:33 +01:00
f671da99a6
BlockFactory: fix failing test
2018-10-12 21:40:45 +01:00
7af7783cc8
BlockFactory: Register block to id|variant without setting state to allow non-zero default states
...
This will be needed to deal with things like chest/furnace which don't use 0 as a valid state (these both use facing horizontal for rotation, and vertical is invalid, so 0 would mean downwards facing which is invalid.
2018-10-12 20:05:44 +01:00
0520598584
BlockFactory: skip blockstates which corrupt the metadata
...
if the metadata doesn't match what was inputted when reading back, it's an invalid state and should not be registered.
2018-10-12 19:49:26 +01:00
873b64259d
Torch: remove trailing comma
2018-10-12 19:07:43 +01:00
d151a89037
Vine: don't break when a supported vine is above, closes #2452
2018-10-12 18:38:52 +01:00
c96203b528
Set immobile flag on player pre-spawn
...
The client likes to fall involuntarily as soon as PLAYER_SPAWN PlayStatus is sent, which causes debug spam on the PM side and then movement reversions if falling far enough. This now prevents the client moving until the server knows the client has spawned.
2018-10-12 17:08:22 +01:00
acb794e728
Remove garbage from Entity(De)SpawnEvent
...
These methods:
a) add concrete dependencies
b) are pointless (event->getEntity() instanceof Creature, anyone? an IDE can better understand this as well...)
c) encourage bad code (they don't enforce type contracts the same way an instanceof check does - oh, and why not let's add an is*() for every new mob that gets added ever?
2018-10-12 16:35:51 +01:00
97c836f199
Remove nasty network crap from API
2018-10-12 16:31:17 +01:00
a944641509
Torch: Fix placement issues when clicking the bottom of a block, closes #2453 ( #2474 )
2018-10-12 12:26:44 +01:00
9901e61d65
Merge branch 'release/3.3'
2018-10-12 09:32:17 +01:00
9ac7c75e5b
Merge branch 'release/3.3'
2018-10-11 19:44:06 +01:00
d583dc25c3
Merge branch 'release/3.3'
2018-10-10 13:45:31 +01:00
2e265423c7
Fixed NBT leveldata fixer never getting called
2018-10-10 04:44:45 -04:00
e2af394c81
Revert "Level: Identify chunk loaders by their object ID"
...
This reverts commit 3bb450244f .
PhpStorm you lying piece of shit... you only showed me the usages in Level!
This change should be revised and redone later.
2018-10-10 03:59:07 -04:00
9b31484655
Merge branch 'release/3.3'
2018-10-09 22:53:44 +01:00
3bb450244f
Level: Identify chunk loaders by their object ID
...
chunkloader ID is completely unnecessary extra complication. spl_object_hash() would be fine for this as well, but a number is better. Since it's unique for the object lifetime (and the Level keeps a ref to loaders) this system should work just fine.
2018-10-09 16:32:34 +01:00
a653289c40
Rename Plugin->setEnabled() with a more clear name
...
This is intended to break API in order to jerk the rug out from underneath plugin developers who have been misusing this without noticing the side effects.
2018-10-08 13:06:51 +01:00
24677e1d79
Prevent undefined behaviour when accessing async worker thread-store from outside the worker itself
2018-10-08 13:01:12 +01:00
a0f3c03b50
oopsie woopsie
...
I made a fucky wucky! a wittle fucko boingo!
2018-10-08 12:59:47 +01:00
6ac0c517f5
Improve and simplify AsyncTask thread-local storage
...
This is now self-maintaining and doesn't rely on the async pool to wipe its ass on task completion. Instead, the garbage collector will cause thread-local data to be automatically released when the async task is garbage-collected on the main thread.
2018-10-08 12:48:44 +01:00
2bc663968e
Merge branch 'release/3.3'
2018-10-07 19:45:38 +01:00
db9b235aa5
Merge branch 'release/3.3'
2018-10-07 17:48:32 +01:00
cc876b0e03
Merge branch 'release/3.3'
2018-10-07 16:36:43 +01:00
8d1400115e
fixed unsupported leveldb format versions crashing the server
2018-10-07 15:42:59 +01:00
e13764832d
Merge branch 'release/3.3'
2018-10-07 15:34:14 +01:00
7c1432526f
Remove pointless ID maths from Level
2018-10-07 15:28:10 +01:00
139aaa5577
Protect Item->count
2018-10-07 14:34:04 +01:00
82c718cff0
Split Bucket into multiple classes
2018-10-07 14:03:13 +01:00
706082deb1
Fixed Flat generator using item ID/damage to build block layers
2018-10-07 12:01:43 +01:00
36548a335c
Fixed some items disappeared after 5fb7825485
2018-10-06 21:30:21 +01:00
5fb7825485
Flatten Item variants, remove Item->setDamage()
2018-10-06 20:09:11 +01:00
14ef4558c2
Allow BlockFactory to handle position setting of newly created blocks
2018-10-06 19:06:49 +01:00
cdb17b1cee
Fixed broken test
2018-10-06 17:39:11 +01:00
a430f7f4f7
Allow static properties and state masks to vary based on variant
2018-10-06 17:33:28 +01:00
9338061390
Update composer lock dependencies
2018-10-06 15:10:43 +01:00
785df3789d
Remove now-unused internal function
2018-10-06 14:46:38 +01:00
7ee4fd55d3
Merge branch 'release/3.3'
2018-10-06 14:45:19 +01:00
78bb0145aa
Remove unused imports from Block namespace
2018-10-05 18:31:06 +01:00
4608ecde9b
Merge branch 'release/3.3'
2018-10-05 18:29:37 +01:00
495a0b1dc2
Merge branch 'release/3.3'
2018-10-05 18:11:33 +01:00
47f43c5e6b
Remove some internal constants from public API
2018-10-04 20:03:11 +01:00
b407eba1a3
Apply typehints to level\format\io namespace
2018-10-04 19:59:26 +01:00
b214601a82
Silence PhpStorm complaining about hardcoded classpaths
2018-10-04 19:58:39 +01:00
a273a0c8a9
Fixed remaining cases of undefined behaviour on ambiguous world format
...
It was still possible to produce undefined behaviour by creating a db folder in a region-based world, or adding regions to a leveldb world. This now solves the problem completely by refusing to load the world if multiple formats match the world.
2018-10-04 19:43:31 +01:00
0cc4bc48cc
Move generator classpath hack out of BaseLevelProvider
2018-10-04 18:55:20 +01:00
49e47edcf5
Separate level data handling from the main LevelProvider
2018-10-04 18:45:02 +01:00
f23bba053b
Merge branch 'release/3.3'
2018-10-04 16:41:11 +01:00
b0f1863c4f
Region loaders don't need to know their own coordinates
2018-10-04 16:37:19 +01:00
41f335e7d9
Level: Remove setSeed()
...
Seed is immutable information about the world, like its generator type, generator options, name, etc. We don't allow changing any of those things, so why the fuck would we allow changing the seed? This makes no sense at all.
I'm removing this because a) its existence makes no sense, and b) it will not produce the behaviour expected from such a function (what even is the expected behaviour???)
2018-10-04 16:24:07 +01:00
4d9d4d7c60
More cleanups to level provider hierarchy, move more garbage out of BaseLevelProvider
2018-10-04 16:02:55 +01:00
4f421d561c
BaseLevelProvider: clean up not-exists error handling disaster
...
It checks for the existence of (and creates) the world directory if it doesn't exist. But what sense does this make when the world obviously doesn't exist in this case and must be generated first?
2018-10-04 15:41:18 +01:00
f787552e97
Remove LevelProvider::getProviderName()
...
This is problematic because child level providers can forget to override the provider name of their parents, and then override them by error. Instead, they should be used in a mapping fashion to make sure they are unique and not inherited.
Also, the old method did not permit registering multiple aliases for the same provider. This now makes that possible.
2018-10-04 14:56:42 +01:00
65b49dec71
Refactor hierarchy of Region-based world formats
...
In the future, McRegion and PMAnvil will become deprecated legacy formats which we won't support for writing anymore. However, this brings complications because Anvil (which would not be deprecated) would be sandwiched between its deprecated base (McRegion) and its deprecated child (PMAnvil), complicating the implementation (particularly for PMAnvil).
This abstracts away the generic Region-based world functionality into a separate class, making McRegion, Anvil and PMAnvil all inherit from it directly. Since only the chunk formats are different, they are more accurately siblings rather than parent-child (although Anvil and PMAnvil are cousins, ish).
2018-10-04 14:19:19 +01:00
eaf6b316c7
I always commit this submodule when I don't want it, and not when I do
2018-10-04 12:52:09 +01:00
050e972add
Clean up default level provider management
2018-10-04 12:49:46 +01:00
23132b899c
Added LevelProvider->getAllChunks() method
...
this returns a generator which yields known chunks. This will be used in the future for world format conversions.
2018-10-03 19:43:16 +01:00
8a062f440d
Chunk: remove column methods
...
these were (mostly) unused, and the places they were used breaks the interface definitions. It also exposes internals that are sensitive to change.
2018-10-03 18:35:39 +01:00
77fd57e11a
Removed wtf from Liquid
2018-10-01 16:20:35 -04:00
94936d0f6b
Fixed CPU leak in falling water block updating
...
The cause of this was the flow decay of falling water changing, but the flow decay is ignored for falling water. This caused the block to be repeatedly set to itself, triggering local block updates, causing the disease to spread in large falling water bodies and cause immense amounts of lag.
2018-10-01 16:15:49 -04:00
74486d6880
Remove some state meta constants from API visibility
2018-09-30 14:43:55 +01:00
274a4d892f
Rail: detect state and then place, not vice versa
2018-09-30 14:35:57 +01:00
1a2312418b
Fixed assert failure when placing northeast/northwest powered rails
2018-09-30 14:17:30 +01:00
5344c0a627
Merge branch 'release/3.3'
2018-09-29 15:39:40 +01:00
8e6a5813ea
Don't auto-create tiles on activate
...
this complicates the code unnecessarily and doesn't produce the desired effect in most cases anyway.
2018-09-28 20:12:41 +01:00
594a2041b6
Trapdoor: fix bad meth in comment
2018-09-28 16:44:30 +01:00
2600cf5977
Split some block variants into their own classes where behaviour differs
2018-09-28 16:21:03 +01:00
e038c4295d
Clean up abhorrent mess of Slab placement code
2018-09-27 18:46:01 +01:00
35d51570be
Add and make use of Block->isSameType()
2018-09-27 17:59:06 +01:00
8910c93de1
Slab: slight reduction of code repetition
2018-09-27 16:45:06 +01:00
73f1480e10
Merge branch 'release/3.3'
2018-09-27 16:36:57 +01:00
0b49ec46c6
Deduplicate Pumpkin/Melon stem code
2018-09-27 16:24:35 +01:00
75f364fcf2
Level: Remove obsolete \$direct parameter from setBlock()
...
this parameter was previously used to send blocks with a different set of flags, immediately, to players. However, the flags have been demonstrated useless and the direct sending is pointless now since packets are buffered now per session, so we might as well take advantage of the batched block update sending.
2018-09-27 16:15:07 +01:00
16f2ac14b3
Clean up block update sending, remove UpdateBlockPacket flag constants
...
These flags are not intended for network use, instead they are supposed to be used internally by the game. For network, we only need to care about the 0x02 flag (send to players) because that's necessary for the client to render the block.
2018-09-27 15:56:08 +01:00
8a8f1d84ff
EnchantingTable: fix BB
2018-09-27 11:29:23 +01:00
e6a1398992
EndRod: fix BB rotation on X/Z axes
...
this was very apparent with the new code, less so with the magic meta values...
2018-09-27 02:36:39 -04:00
ac3509aa3d
Updated BedrockData submodule
...
this change won't be backported to other branches due to technical limitations that can't be easily solved without API breaks.
2018-09-26 19:58:03 +01:00
f2c960cfd8
Added on/off handling for buttons and levers
2018-09-26 19:19:35 +01:00
ebf5ccea8a
Merge branch 'release/3.3'
2018-09-26 13:12:54 +01:00
896ecb52f4
Merge branch 'release/3.3'
2018-09-24 18:27:26 -04:00
9651b3f470
Crops: micro optimization - check age before generating random number (faster)
...
I don't have any idea how much benefit this will provide in real terms, but it may be significant.
2018-09-24 16:48:19 +01:00
a195e940db
Fixed BB and right-click action for daylight sensor
2018-09-24 16:37:18 +01:00
a77e05f875
Implement corner stair BB handling
2018-09-24 16:25:17 +01:00
0b989925d7
whitespace
2018-09-23 18:41:57 +01:00
c501c740a1
Get rid of Block->canPassThrough()
...
This is only implemented in 1 place where the collision box should just be zero anyway, so there's no point this existing.
There's a lot of other blocks which should have bounding boxes without collision boxes as well, but that's outside the scope of this commit.
2018-09-23 17:05:03 +01:00
3eca64e893
Merge branch 'release/3.3'
2018-09-23 16:45:22 +01:00
4f200c5183
Merge branch 'release/3.3'
2018-09-23 16:35:53 +01:00
8873efc303
Duplicate block IDs into ItemIds to allow for split
...
this will be necessary to deal with negative IDs (if I choose to do that), and it'll also be necessary if I decide to do any shift hacks to merge ID/variant for block IDs, because we don't want such things to affect items before we're ready to deal with that.
2018-09-23 15:53:16 +01:00
1427da0aeb
Clean up item handling of blocks
2018-09-23 14:21:37 +01:00
ed1c511c3c
Hacks for dealing with negative item IDs...
2018-09-23 14:14:58 +01:00
9d2e9e1663
Fixed torch facing bug with wrong metadata
...
torches cannot face down
2018-09-21 19:45:52 +01:00
3edf3a3a80
Entity: remove unused import
2018-09-21 19:34:18 +01:00
02d5f4da85
fix merge error
2018-09-21 19:32:59 +01:00
a093ba3ed9
thanks git
2018-09-21 19:30:04 +01:00
4a7f8fd9d9
Implemented behaviour for cocoa pods
2018-09-21 19:28:31 +01:00
56d9943b0d
Nuke Block->meta, split into variant and state properties, lots of cleanup
...
This is a major change to the way block metadata is handled within the PM core. This separates variant metadata (which really ought to be part of the ID) from state metadata, and in a couple of cases flattens separate states of blocks together.
The result of this is that invalid variants can be much more easily detected, and additionally state handling is much cleaner since meta is only needed at the serialize layer instead of throughout the code.
2018-09-21 19:28:10 +01:00
a55ab54ddb
Merge branch 'release/3.3'
2018-09-20 19:02:48 +01:00
eab7424955
Merge branch 'release/3.3'
2018-09-20 17:05:01 +01:00
960fdb433e
Merge branch 'release/3.3'
2018-09-20 16:50:11 +01:00
9b4d82630b
BlockFactory: remove $solid
...
this is premature optimization and will run into problems once we enter the flattening.
2018-09-20 16:26:15 +01:00
19e68f98a7
Level: Remove unnecessary BlockFactory::$lightFilter usage
2018-09-20 16:16:28 +01:00
668da0772a
WaterLily: fixed broken placement logic
2018-09-20 12:49:36 +01:00
058bd07319
Merge branch 'release/3.3'
2018-09-20 10:04:42 +01:00
7da51ae97e
Fixed ItemBlocks passing the wrong block name to their constructors
2018-09-19 17:51:28 +01:00
d92e79ba54
Level: fix crashdump #754691
2018-09-19 17:39:31 +01:00
0f33459632
missed this because it was too far to the right of the screen...
2018-09-19 16:20:54 +01:00
d291345ed7
Clean up some unused imports
2018-09-19 16:20:16 +01:00
caca097300
Merge branch 'release/3.3'
2018-09-19 16:18:53 +01:00
dbe0ee2d44
BlockFactory: don't pre-populate gaps with UnknownBlock objects
...
this produces a minor reduction in memory usage.
2018-09-19 15:17:39 +01:00
ef038d9625
Level: use block directly in updateBlockSkyLight()
2018-09-19 15:07:24 +01:00
48a5eeb3a4
BlockFactory: remove some useless static arrays
2018-09-19 15:06:58 +01:00
a80d5bb6a8
Leaf log search is type agnostic
...
any wood type will do
2018-09-19 08:47:40 +01:00
01f12d6147
Merge branch 'release/3.3'
2018-09-18 12:32:12 +01:00
c721503b7a
Merge branch 'release/3.3'
2018-09-18 12:22:32 +01:00
31e4093882
Remove some remaining hardcoded meta maps
2018-09-16 18:00:16 +01:00
8aab51c532
Merge branch 'release/3.3'
2018-09-16 17:47:41 +01:00
1bb4daa7d1
Fixed mess of rotations being inverted
2018-09-16 17:37:36 +01:00
f7f06c993d
Make block constructors not write to this->meta directly
2018-09-16 14:10:40 +01:00
ed8b8a13a3
Vine: cleanup BB calculation
2018-09-16 12:20:10 +01:00
54e19a6d2f
Vine: fixed north check being missing
2018-09-15 17:10:57 +01:00
932705e114
Merge branch 'release/3.3'
2018-09-14 17:10:39 +01:00
0e5cbca983
PlayerInteractEvent: cleanup constructor now that block isn't optional anymore
2018-09-14 16:30:22 +01:00
db2567f965
Separate use-item action from PlayerInteractEvent
...
This solves the age-old issue of PlayerInteractEvent firing twice when a player clicks a block with an item in the hand.
API changes:
- Removed PlayerInteractEvent constants LEFT_CLICK_AIR, RIGHT_CLICK_AIR and PHYSICAL.
- PlayerInteractEvent no longer fires when the player right-clicks the air.
- Added new event PlayerItemUseEvent.
2018-09-14 16:24:29 +01:00
b660bcdb65
Merge branch 'release/3.3'
2018-09-14 16:20:22 +01:00
1f3c0524d9
Merge branch 'release/3.3'
2018-09-14 11:06:31 +01:00
d4580fa683
Cleanup Sugarcane placement code
2018-09-13 19:49:55 +01:00
8ad57f7ca0
Painting: use Facing::rotate()
2018-09-13 19:36:03 +01:00
2b8405e6ee
Make use of Bearing::opposite()
2018-09-13 19:35:47 +01:00
f488e594f6
Remove hardcoded facing literals in for loops
2018-09-13 19:34:27 +01:00
65684eec99
Door: fixed bad rotation when no player is specified
2018-09-13 18:36:50 +01:00
0406c49ba9
Leaves: improve log search algorithm to fix vanilla inconsistencies
2018-09-13 17:30:23 +01:00
3b772f54e9
Leaves: make more findLog() params optional
2018-09-13 16:49:22 +01:00
fee42e9f34
Leaves: Replace a big mess of code with something nice and simple ( #2432 )
2018-09-13 16:36:10 +01:00
c0962a47be
Block: Use parent::place() instead of setBlock() directly
2018-09-13 12:54:03 +01:00
54342ab0ce
Remove ridiculous code in Ladder
2018-09-12 19:56:17 +01:00
778eb5fb33
Block: Make getId(), getDamage(), setDamage() non-final
...
In the future, these methods will be used to derive ID/meta on the fly from properties instead of using them internally.
2018-09-12 19:40:19 +01:00
e0574008b4
AsyncPool: Move removeTasks() functionality inside shutdown()
...
there's no need for a loop if we just have the workers shutdown directly, because they'll block until all tasks are done anyway.
2018-09-12 18:08:42 +01:00
653fa1213e
Added an event for handling duplicate logins ( #2430 )
2018-09-12 11:23:48 +01:00
535d4e2c9b
Added NetworkSession->getPlayer()
2018-09-12 10:51:37 +01:00
ebc1524f9a
Merge remote-tracking branch 'origin/release/3.3'
2018-09-12 10:39:49 +01:00
dd2861dd1a
Merge branch 'release/3.3'
2018-09-11 19:49:51 +01:00
e50ba18bbd
Merge branch 'release/3.3'
2018-09-11 12:28:18 +01:00
b3902ed76f
Merge branch 'release/3.3'
2018-09-11 11:40:54 +01:00
f03ab76c83
Remove imports left over from 5ce2d5e072
2018-09-10 17:51:13 +01:00
37190c9a65
Apply typehints to all AsyncTask methods
...
Since we're breaking API here anyway, no point in holding back on this.
2018-09-10 15:54:01 +01:00
d62e00cc74
AsyncPool: Remove Server dependency (API breaks included)
...
This brings two plugin-breaking changes: AsyncTask->onCompletion() and AsyncTask->onProgressUpdate() no longer accept Server parameters.
This now allows for the functionality of AsyncPool and AsyncTask to be tested outside of a Server.
2018-09-10 15:48:59 +01:00
5ce2d5e072
Clean up to Generator creation, remove getSeed() from ChunkManager interface
...
it's the generator's responsibility to know about the seed, not the chunkmanager's. This now reduces the complexity of implementing and using a chunkmanager.
2018-09-10 13:28:15 +01:00
0d152a2139
Merge branch 'release/3.3'
2018-09-08 14:30:16 +01:00
3bd224ae1a
Merge branch 'release/3.3'
2018-09-06 19:31:11 +01:00
bd091eb744
Merge branch 'release/3.3'
2018-09-06 19:15:53 +01:00
f218868338
Separate facing/bearing handling from Vector3, deobfusticate a ton of @shoghicp old code
2018-09-05 19:56:14 +01:00
99fb267333
Merge branch 'release/3.3'
2018-09-04 15:58:24 +01:00
034472bfe7
Merge branch 'release/3.3'
2018-09-04 11:58:19 +01:00
bc7cefff77
Merge branch 'release/3.3'
2018-08-31 16:20:06 +01:00
71ece194e4
Merge branch 'release/3.3'
2018-08-30 15:47:12 +01:00
9553df0f03
Sync master and 3.3 branches
2018-08-30 11:07:02 +01:00
5b75c5953f
Merge branch 'mcpe-1.6-master'
2018-08-29 17:27:59 +01:00
b2c0bba86e
Merge branch 'release/3.2' into mcpe-1.6-master
2018-08-29 17:27:48 +01:00
cf7071de3d
3.2.1 is next
2018-08-29 17:25:31 +01:00
9b49d09714
LevelProvider: Added methods to get and set rain/lightning level and times
2018-08-28 15:02:45 +01:00
91064b3209
Merge branch 'release/3.2'
2018-08-26 19:15:23 +01:00
66e46e1c07
Level: use chunk records for tile reading in getTileAt()
...
the previous revision caused a crash when clicking on the bottom of the world due to a block hash being out of bounds.
2018-08-26 18:57:08 +01:00
b99decc585
Merge branch 'mcpe-1.6' into mcpe-1.6-master
2018-08-26 18:06:22 +01:00
fa77a4fa58
Merge branch 'master' into mcpe-1.6-master
2018-08-26 18:06:18 +01:00
5d1ec1ad49
Server: remove deprecated parameter from findEntity()
2018-08-25 18:38:10 +01:00
3b62926721
Merge branch 'release/3.2'
2018-08-25 18:37:27 +01:00
4fb1f8dd76
Merge branch 'release/3.2'
2018-08-25 17:49:28 +01:00
d6376a236d
Player: assign allowFlight directly instead of using setter
...
fixes #2397
This was changed by a4939b6bf1 without apparent reason. It causes AdventureSettings to be sent too early.
2018-08-22 19:20:21 +01:00
286e062086
Merge branch 'release/3.2'
2018-08-22 15:42:00 +01:00
b5aa80b375
Merge branch 'release/3.2'
2018-08-21 19:54:40 +01:00
f830eddd59
Merge branch 'mcpe-1.6' into mcpe-1.6-master
2018-08-21 17:55:48 +01:00
ac8565fc2e
Merge remote-tracking branch 'origin/release/3.2'
2018-08-19 19:54:34 +01:00
358d8b7af7
Merge branch 'release/3.2'
2018-08-19 19:52:51 +01:00
848bce193c
Chunk: change tile storage hash function to unbind Y coordinate
...
this isn't strictly needed but it is more scalable in the case of future build height limit lifts.
2018-08-19 16:56:50 +01:00
7c41bfcdf3
Removed Tile numeric runtime IDs, use block hashes instead
...
Tiles are level-local and are not indexed globally like entities. There is pretty much zero point to them having numeric runtime IDs.
2018-08-19 16:37:04 +01:00
92aeab0d00
Merge branch 'release/3.2'
2018-08-19 16:03:04 +01:00
475ec413e5
Removed deprecated ServerCommandEvent and RemoteServerCommandEvent
...
if you get rekt by these changes... USE A RELEASE like we've been telling you for so long!
2018-08-19 14:23:41 +01:00
b629738312
Merge branch 'release/3.2'
2018-08-19 14:06:34 +01:00
aa55cd9acf
Merge branch 'release/3.2'
2018-08-19 13:01:54 +01:00
1177a381c8
Merge branch 'release/3.2'
2018-08-19 11:45:16 +01:00
3a1f0eca7c
Merge branch 'release/3.2'
2018-08-19 11:23:04 +01:00
9ad30e239a
Merge branch 'release/3.2'
2018-08-19 10:37:20 +01:00
06d7ee283d
Player: Don't use iusername in cases where it's useless
...
these calls all do strtolower() anyway, so having iusername here just makes it confusing.
2018-08-18 13:42:00 +01:00
a306421737
Entity: remove lastX lastY lastZ lastYaw lastPitch, replace with lastLocation object field
2018-08-18 13:38:19 +01:00
f8e3b0b16b
Support bot: Be a little less rude
2018-08-18 13:22:53 +01:00
bbd878986d
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2018-08-17 19:48:44 +01:00
44daf57fbb
Merge branch 'release/3.2'
2018-08-17 19:48:18 +01:00
2438d20971
Fixed zero-compression being ignored for small packets
2018-08-16 22:23:09 +01:00
24d0102ffb
Merge branch 'release/3.2'
2018-08-16 18:34:13 +01:00
718ca40379
Merge branch 'release/3.2'
2018-08-16 15:52:25 +01:00
d32b9ec5dc
Player: remove useless write to NBT
...
the parent constructor doesn't care about this tag, and the tag is discarded afterwards.
2018-08-15 14:56:02 +01:00
2ee0436f46
Continued cleanup of runtime entity NBT removal
...
it's no longer necessary to force-write these, since the NBT is now ephemeral. Any tag type mismatches should be dealt with on read, after which the original tag will be discarded anyway.
2018-08-15 14:50:58 +01:00
30fcfac8cf
Merge branch 'release/3.2'
2018-08-15 13:48:52 +01:00
728142b113
Level: remove useless check for RIGHT_CLICK_AIR
...
it's impossible for this to fire because of the condition immediately above, and makes no sense anyway...
2018-08-14 19:39:06 +01:00
b3d8d10bec
Player: move flight toggling to its own method
2018-08-14 19:21:13 +01:00
d8198d8130
Fixed setItemInHand() regressions when placing or breaking blocks
...
this was causing any items set into the hand during these events _at all_ to get overwritten, rather than just tools. That's a bit of a problem for buckets because buckets rely on a bad hack to handle the modified items.
This doesn't fix the tools bug, but that's a job for another time.
2018-08-14 16:44:14 +01:00
cef1fe9524
Merge branch 'release/3.2'
2018-08-14 16:11:42 +01:00
0ae9b41062
Merge branch 'release/3.2'
2018-08-14 15:03:37 +01:00
ce58294305
ProcessLoginTask: check connected status instead of closed status
...
connected is what we're looking for here, as opposed to an entity being marked as garbage.
2018-08-14 14:39:01 +01:00
0273e2484e
Kill entity runtime NBT ( #2361 )
2018-08-14 13:33:02 +01:00
4b7300de8d
Use openssl_digest() instead of hash() in network hot code
...
openssl_digest() is TWICE as fast as hash() on my machine for the same data and same algorithm. I can only guess that OpenSSL is more optimized than PHP ext/standard :)
2018-08-13 19:56:20 +01:00
59a51a6c75
ArmorInventory: use broadcast for sending armour updates
2018-08-13 16:12:25 +01:00
f2fd505bae
ArmorInventory: fixed missed usages of dataPacket()
...
these were missed because PhpStorm couldn't infer the variable types in foreach, and there were no type docs to help it out.
2018-08-13 15:57:59 +01:00
78671bafe3
Remove unnecessary DataPacket->encode() calls
2018-08-13 15:52:55 +01:00
15bac8c58a
Implement send buffering and queuing for network sessions ( #2358 )
...
Async compression and broadcasts are now reliable and don't have race condition bugs.
This features improved performance and significantly reduced bandwidth wastage.
Reduce Level broadcast latency by ticking network after levels. This ensures that session buffers get flushed as soon as possible after level tick, if level broadcasts were done.
2018-08-13 14:37:18 +01:00
22c8077bdf
Merge branch 'release/3.2'
2018-08-13 13:22:47 +01:00
078a2486b5
Merge branch 'release/3.2'
2018-08-11 20:00:01 +01:00
dbf5d9e985
Merge branch 'release/3.2'
2018-08-11 19:37:55 +01:00
10f14beb4b
Fixed intermittent crash on player disconnect when async compression is enabled
2018-08-11 19:12:23 +01:00
0d9968f305
Added donation methods
2018-08-11 15:22:58 +01:00
9c94ebcf82
Updated DevTools submodule to get bloat fixes
2018-08-08 16:58:13 +01:00
82bd6c5b34
Merge branch 'release/3.2'
2018-08-07 19:06:46 +01:00
d3fa8e0a0a
Merge branch 'release/3.2'
2018-08-07 18:49:21 +01:00
ec9ef891ee
Player: clean up some runtime usages of NBT
...
the goal is to get rid of this completely, but that's slightly complicated by the mess that is player creation right now.
2018-08-07 18:27:22 +01:00
16b789a528
Player: remove useless checks from save()
...
this should never be called for a player with an empty username (because data isn't saved unless the player was spawned) and the instanceof is laughable.
2018-08-07 17:37:55 +01:00
55ac1c80c9
Player: replace redundant usage of Server->broadcast()
2018-08-07 17:33:57 +01:00
12a7436aea
Merge branch 'release/3.2'
2018-08-07 14:43:34 +01:00
202fb08792
Merge branch 'release/3.2'
2018-08-07 14:39:56 +01:00
3fa9712a1e
Merge branch 'release/3.2'
2018-08-07 14:32:47 +01:00
bd993b2342
Merge remote-tracking branch 'origin/release/3.2'
2018-08-07 12:34:07 +01:00
4597899ac3
Merge branch 'release/3.2'
2018-08-06 21:34:07 +01:00
e5b69deccf
Merge branch 'release/3.2'
2018-08-06 20:53:16 +01:00
4142666df8
Level: clean up and remove checkTime()
2018-08-06 19:00:00 +01:00
fb0cc0804c
Merge branch 'release/3.2'
2018-08-06 18:45:53 +01:00
ff6d590d0c
PlayerInventory: Send updates to viewers automatically on setItemInHand()
2018-08-05 19:31:21 +01:00
c90e3e351d
PlayerBlockPickEvent: remove setResultItem()
...
the same behaviour can be achieved by cancelling the event and setting the held item manually. Allowing this to be changed increases the complexity of dealing with survival block picking.
2018-08-05 19:07:23 +01:00
6fcb221453
Remove useless crap from ChunkLoader interface
...
these methods are not used anywhere and are unnecessary extra baggage for any implementation.
2018-08-05 18:38:51 +01:00
90f80782d4
Player: remove useless return value from dropItem()
2018-08-05 12:55:12 +01:00
ea9415961b
Player: remove useless check from dropItem()
...
the transaction system will deal with this now, and if a plugin wants to make a player drop a null item, they are free to do so.
2018-08-05 12:53:31 +01:00
5df56a1bac
Clean up some AnimatePacket boilerplate code
2018-08-05 12:39:36 +01:00
d81388f62c
Merge branch 'release/3.2'
2018-08-05 12:21:06 +01:00
ac832f94a8
Merge branch 'release/3.2'
2018-08-05 11:33:20 +01:00
a5383b4a82
Use SetLocalPlayerAsInitializedPacket for spawning, fixed a bunch of bugs
...
this should fix forms not working during PlayerJoinEvent, and also removes the spurious PlayerItemHeldEvent firing on spawn bug.
The player MUST now send this packet. Bots take note.
2018-08-05 10:45:41 +01:00
25660843c5
Player: Obliterate InventoryTransactionPacket handler, add some new methods
2018-08-04 20:01:32 +01:00
905c0c825c
Merge branch 'release/3.2'
2018-08-04 16:47:35 +01:00
83077309ef
Merge branch 'release/3.2'
2018-08-04 16:03:46 +01:00
20f3b82d52
Be less dependent on AsyncTask->onCompletion() Server parameter
...
this is going to get removed soon.
2018-08-04 15:56:14 +01:00
779d92c656
BulkCurlTask: Remove complexData parameter (BC break)
...
This is a leftover from when it was necessary to pass complex data to the AsyncTask constructor in order to have it locally-stored. Since this has now been superseded by storeLocal(), it doesn't make sense for this parameter to exist anymore.
2018-08-04 14:44:20 +01:00
2cb6307e5b
Merge branch 'release/3.2'
2018-08-03 20:08:01 +01:00
2170411cf8
Merge branch 'release/3.2'
2018-08-03 18:50:37 +01:00
425b1aa6f5
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2018-08-03 18:25:21 +01:00
588d6c4b26
Merge branch 'release/3.2'
2018-08-03 18:24:50 +01:00
0e44e5b681
Update ISSUE_TEMPLATE.md
2018-08-03 09:02:53 +01:00
10ba3d6359
Network: add ability to tick sessions
...
moved responsibility for login timeout checks to NetworkSession instead of Server
2018-08-02 17:39:09 +01:00
e43496e7e4
Network: clean up ticking handling, RakLib only processes on Snooze notification
2018-08-02 17:14:21 +01:00
7560880168
Added DataPacketBroadcastEvent, refactor broadcast handling, close #1521
...
batchPackets() is now considered internal and shouldn't be used by plugins.
Added Server->broadcastPackets(Player[], DataPacket[]) : bool
2018-08-02 15:54:30 +01:00
c345e6f22c
Merge branch 'release/3.2'
2018-08-02 14:43:59 +01:00
af6b279e54
Player: Ensure we always get flagged as closed when parent constructor was never called
...
This was causing unexpected bugs when players got disconnected during the login sequence.
2018-08-01 17:28:30 +01:00
809b33033e
Player: Use connected status instead of Entity->closed flag
2018-08-01 17:27:32 +01:00
1ef538b69e
LoginSessionHandler: fix crash when disconnected during login handling
2018-07-31 19:40:24 +01:00
47cf6e4833
Fixed not being able to disable encryption
2018-07-31 18:51:57 +01:00
32a78e679a
Fixed JWT padding
2018-07-31 18:36:36 +01:00
488c03c200
Make timings for player network more detailed
2018-07-31 16:34:15 +01:00
2bf6764112
Implemented network encryption ( #2343 )
...
For those who fuss about performance, you can disable the `network.enable-encryption` option to use sessions without encryption.
2018-07-31 15:54:18 +01:00
62cb7963dc
Remove deprecated functions for 4.0.0
...
If any moron starts complaining that their plugins broke, tell them to use 3.x... thanks
2018-07-31 14:37:54 +01:00
4e8a256a53
Language: use null coalesce for get() and internalGet()
2018-07-30 17:29:13 +01:00
58b46179f9
Language: make internal function not public
...
this is only used within the Language class anyway.
2018-07-30 17:27:48 +01:00
0d9952d53e
Rename BaseLang -> Language
2018-07-30 17:07:19 +01:00
d26631d8e0
Clean up BaseLang error handling, throw exceptions instead
2018-07-30 17:00:52 +01:00
cab2d52ff8
Merge branch 'release/3.2'
2018-07-30 15:21:50 +01:00
fd3456e831
Merge branch 'release/3.2'
2018-07-30 14:54:15 +01:00
14f144b6f6
Merge branch 'release/3.2'
2018-07-30 09:36:53 +01:00
bdd42d6a78
Added NetworkSession->sendEncoded(), clean up some code
2018-07-27 18:39:14 +01:00
2647b3f404
VerifyLoginTask: remove unnecessary wordwrap()
...
I don't recall why this was needed, but it's not.
2018-07-27 18:33:10 +01:00
7541a6070f
Player: clean up handling of authentication
2018-07-27 18:04:13 +01:00
f3cf64c2cf
Security vulnerability reporting for dummies
2018-07-27 12:27:29 +01:00
df45e8a2cc
Merge branch 'release/3.2'
2018-07-27 11:47:43 +01:00
eb738d1d72
Apply more typehints to generator namespace
2018-07-26 19:31:18 +01:00
edb03e8a9b
Remove more dead code from the generator
...
this stuff is useless broken crap that just makes noise in inspections for no good reason... bye
2018-07-26 19:21:38 +01:00
20a5b75622
PluginBase: fixed error always being emitted on saveConfig()
...
This now throws exceptions... let's let the caller deal with this instead, it makes more sense anyway
2018-07-26 19:14:16 +01:00
c3bc751b04
Merge branch 'release/3.2'
2018-07-26 16:00:46 +01:00
be37236c76
Deduplicate code for general classpath registries
2018-07-26 15:21:03 +01:00
e016693779
Test one extra case for LevelProviderManager
2018-07-26 15:17:16 +01:00
d305a1342f
Make Tile::registerTile() and Entity::registerEntity() throw exceptions instead of returning false
2018-07-26 14:55:55 +01:00
b9769c407b
Merge branch 'release/3.2'
2018-07-26 14:40:39 +01:00
522f0f5c25
Config: remove dead field
2018-07-26 14:05:38 +01:00
7e81a09409
Merge branch 'release/3.2'
2018-07-26 14:03:39 +01:00
e6cbdd090e
Merge branch 'release/3.2'
2018-07-26 10:25:25 +01:00
203d7e23f4
Merge branch 'release/3.2'
2018-07-25 20:57:57 +01:00
057d4fc62f
Merge branch 'release/3.2'
2018-07-25 18:52:26 +01:00
98b34aaac8
Merge remote-tracking branch 'origin/release/3.2'
2018-07-25 15:51:39 +01:00
7f87714dae
Merge branch 'release/3.2'
2018-07-25 15:30:50 +01:00
c09a774da7
Merge branch 'release/3.2'
2018-07-24 17:19:24 +01:00
4059e1f84c
Merge branch 'release/3.2'
2018-07-24 16:33:37 +01:00
622fe99982
NetworkSession: Don't crash on failure to decode compressed batches
...
this could be an outdated version (pre-1.1 for example).
2018-07-23 14:38:46 +01:00
cc84ec8629
Fixed Player/NetworkSession/SessionHandler cycle memory leak
...
NetworkSession and some SessionHandlers hold cyclic refs to each other, stopping them getting destroyed. Unfortunately, these also reference the player, stopping that getting destroyed too.
The cycle garbage collector will deal with this, but it's best to get rid of the cyclic refs for immediate collection.
2018-07-22 13:41:06 +01:00
fe1df70923
Player: be less horrible and leave a deprecated proxy for dataPacket()
2018-07-22 12:20:13 +01:00
c1843ac2d4
Player: remove dataPacket() and directDataPacket()
...
I considered renaming sendDataPacket() to dataPacket() to reduce the BC breaks, but the parameter set has changed, which might cause astonishing behaviour, so it's better to break it in a loud way. Also, this has a clearer name.
2018-07-22 12:04:53 +01:00
85105ed066
Inseparable set of network changes - these all need each other to work
...
- Separated player handling and creation from network interfaces
- Rewire disconnects to make them not be recursive
- Batching now uses sessions instead of players
- Fixed DisconnectPacket getting sent to players who disconnect of their own accord
2018-07-21 20:03:05 +01:00
a86d3fe071
PlayerCreationEvent: Remove useless crap from constructor
2018-07-21 18:42:18 +01:00
b93318b2cf
RakLibInterface: Use NetworkSession API for getting IP instead of Player
...
soon the network interfaces won't be dealing with Players at all.
2018-07-21 18:41:15 +01:00
ca1a0c8643
Move responsibility for ping handling to NetworkSession
2018-07-21 16:33:12 +01:00
57e5b1309d
NetworkSession: Stop processing batch if player gets disconnected during handling
2018-07-21 16:27:30 +01:00
34d64be427
CompressBatchedTask: players aren't strings
2018-07-21 16:10:25 +01:00
dc29b4dc3f
Merge branch 'release/3.2'
2018-07-21 15:57:56 +01:00
01a9e53394
Config: Clean up error handling, throw exceptions instead of returning false ( #2314 )
...
This also has the happy side effect of removing a cyclic dependency between Config and Server. There's only the dependency on MainLogger left to get rid of now.
2018-07-21 15:50:58 +01:00
c5bf746e4c
typo
2018-07-21 14:45:22 +01:00
7d8624b12f
ResourcePacksSessionHandler: clean up error reporting
2018-07-21 14:44:54 +01:00
da876cc8f3
ResourcePacksSessionHandler: Prevent clients requesting the same chunk more than once
...
Currently this can be used to attack the server by spamming requests for the same chunks forever. This commit prevents that by disconnecting the client if a chunk is requested more than 1 time. It is not necessary to allow more than 1 request per chunk, since RakNet should ensure that these are always delivered correctly.
2018-07-21 14:31:34 +01:00
d6e61e3e00
ResourcePacksSessionHandler: Account for out-of-bounds chunk requests
2018-07-21 14:19:24 +01:00
b9cd96f6e0
ResourcePacksSessionHandler: remove useless brackets
2018-07-21 13:36:20 +01:00
25a5394152
Merge phase 1 of network refactor - session handler rewrite
...
There are further changes that need to be done yet, but this section is now ready for showtime.
2018-07-21 10:03:17 +01:00
bfc372c6fb
Merge branch 'release/3.2'
2018-07-21 09:53:50 +01:00
c257a791e1
ResourcePacksSessionHandler: move max pack chunk size to const
2018-07-21 09:37:15 +01:00
59f6821c29
Allow parameterizing ResourcePackManager to session handler
...
this will open the way (in the future) for custom managers to be used, instead of a global thing.
2018-07-20 20:08:12 +01:00
30c044f028
Unwrap more code from packet handlers
2018-07-20 18:48:46 +01:00
015ee90571
Split PlayerActionPacket handling into two classes, death is now a session state
2018-07-20 18:11:29 +01:00
f626b9e8a0
Initial mass migration to session handlers
...
This introduces several new session handlers, splitting up session handling into several new states:
- Login: Only allows handling the LoginPacket. This is the only time LoginPacket can be sent, and it'll be discarded when sent at any other time.
- Resource packs: Handles only the resource packs sequence (downloading packs and such). This is the only time ResourcePackClientResponse and ResourcePackChunkRequest will be handled.
- Pre-spawn: Only chunk radius requests are accepted during this state.
SimpleNetworkHandler handles all the "rest" of the logic that hasn't yet been separated out into their own dedicated handlers. There's also a NullNetworkHandler which discards all packets while it's active.
This solves a large number of issues with the security of the login sequence. It solves a range of possible DoS attacks and crashes, while also allowing great code simplification and cleanup.
2018-07-20 17:09:04 +01:00
97a1483f75
Player: remove useless crap from "constructor"
...
1. this isn't really the player constructor
2. this shit isn't needed until we start using the player as an actual player
2018-07-20 15:38:53 +01:00
a4939b6bf1
Player: re-structure a whole bunch of construction mess
...
This consolidates the Player entity construction and makes it more organized and consistent. There is of course a lot more work to do apart from this on player construction.
2018-07-20 15:34:47 +01:00
7633136a86
Player: move max players check to somewhere that makes sense
2018-07-20 13:22:08 +01:00
3cd105ff33
Remove remnants of needACK functionality
...
this has been broken for a long time and hasn't been used for even longer.
2018-07-20 13:07:06 +01:00
0fecb79add
Player: separate some PlayerActionPacket handling logic out into their own functions
...
these are public, because later on the session handler will be calling these instead of the player itself.
2018-07-20 13:02:36 +01:00
aae19d45b7
Player: remove useless handleDataPacket() leftover
2018-07-20 12:41:16 +01:00
57a86d9ed7
Player: remove useless InteractPacket handler
...
all the things we cared about in here don't exist anymore, so there's no sense in the handler still existing. It can be restored when we want to use the things it still does.
2018-07-20 12:39:48 +01:00
25cfcada26
Player: clean up container close handling
2018-07-20 12:36:44 +01:00
e16f20affa
NetworkSession: added getHandler() and setHandler(), SessionHandler->setUp() now not useless
2018-07-20 12:36:44 +01:00
08621604cd
PacketPool: remove redundant comment
...
this was added to signify that these were normal, while BatchPacket was a hack. Since this has now been corrected, there's no need for the comment.
2018-07-20 12:36:44 +01:00
cdcafb1e75
PacketPool: Properly deal with varint packet IDs now that BatchPacket is gone
2018-07-20 12:36:44 +01:00
64ecc373be
Split up session base logic and packet handling
...
this will allow for mutable packet handlers which can be used to cleanly implement multi-stage game sessions.
2018-07-20 12:36:44 +01:00
bdd9a7eb52
Kill BatchPacket, clean up batching related things
...
DataPacketSendEvent and DataPacketReceiveEvent will no longer capture BatchPackets
In most places strings are now used instead of DataPackets, to remove limitations on what data can be sent to a network interface
Removed CraftingManager's cyclic dependency on Server
There is a lot more work to do aside from this, but this commit is intended to clean up what is necessary to fix the handling of BatchPacket.
2018-07-20 12:36:44 +01:00
85647c03bf
Move IP/port to NetworkSession
2018-07-20 12:36:43 +01:00
f969f3b77f
Flatten NetworkSession hierarchy in preparation for refactor
2018-07-20 12:36:43 +01:00
bf4c6e4c2b
Merge branch 'release/3.2'
2018-07-20 12:21:56 +01:00
f77ab468e3
Merge branch 'release/3.2'
2018-07-20 11:57:21 +01:00
424e9f4a49
Merge branch 'release/3.2'
2018-07-20 11:30:46 +01:00
1144620f2b
Level: minor de-spaghettification of chunk requesting
...
Now the Level tells the player to request chunks on tick, instead of the server doing it.
2018-07-18 16:49:58 +01:00
e57dd3e8ba
Merge branch 'release/3.2'
2018-07-18 15:14:41 +01:00
36e197e2a9
Move more session logic out of Player
2018-07-18 12:48:58 +01:00
4d1e2d1b3a
Rename SourceInterface -> NetworkInterface
...
SourceInterface doesn't make sense really...
2018-07-18 11:03:21 +01:00
965f0d670d
Improve documentation of SourceInterface and AdvancedSourceInterface
2018-07-18 11:01:16 +01:00
bc9a387b0b
Fixed merge error
2018-07-17 18:46:27 +01:00
df3870a112
Merge branch 'release/3.2'
2018-07-17 18:35:43 +01:00
f47d6ee683
Merge branch 'release/3.1'
2018-07-17 16:57:08 +01:00
73afa22f50
Merge branch 'release/3.1'
2018-07-17 14:53:03 +01:00
ddc118a562
Merge branch 'release/3.1'
2018-07-17 12:02:33 +01:00
1f023bdcef
Merge branch 'release/3.1'
2018-07-17 10:13:00 +01:00
70f874a559
Merge branch 'release/3.1'
2018-07-16 12:08:29 +01:00
e502280b20
Merge branch 'release/3.1'
2018-07-14 19:28:47 +01:00
4962d9df97
Merge branch 'release/3.1'
2018-07-14 16:06:08 +01:00
340de1c478
Merge branch 'release/3.1'
2018-07-14 11:57:32 +01:00
fbbb6f3beb
Merge branch 'release/3.1'
2018-07-14 10:39:34 +01:00
25022b3144
Merge branch 'release/3.1'
2018-07-13 12:38:41 +01:00
599a64c80c
Merge branch 'release/3.1'
2018-07-12 19:32:14 +01:00
ee5165b040
Merge branch 'release/3.1'
2018-07-12 18:04:26 +01:00
83065024f7
Merge branch 'release/3.1'
2018-07-11 10:21:24 +01:00
33ad4de981
Merge branch 'release/3.1'
2018-07-11 09:16:55 +01:00
eb8eac42b8
Merge branch 'release/3.1'
2018-07-10 12:48:14 +01:00
80ebc0bc5f
Merge branch 'release/3.1'
2018-07-09 18:44:55 +01:00
46ea0186e4
Merge branch 'release/3.1'
2018-07-09 10:06:44 +01:00
9c80e349ce
Merge branch 'release/3.1'
2018-07-08 12:17:18 +01:00
258b4f9dde
ChunkRequestTask: add docs and typehints
2018-07-07 19:35:40 +01:00
78d27dc3e4
Move ChunkRequestTask to pocketmine\network\mcpe namespace
...
it has a lot to do with network and little to do with world I/O (load/save).
2018-07-07 19:34:11 +01:00
7e7cd6c995
Merge branch 'release/3.1'
2018-07-07 19:22:51 +01:00
b23c947060
Merge branch 'release/3.1'
2018-07-06 13:12:22 +01:00
4ccbb8b21a
Merge branch 'release/3.1'
2018-07-05 17:43:19 +01:00
120eb8e362
CompressBatchedTask: move to pocketmine\network\mcpe namespace
2018-07-05 13:38:33 +01:00
2907de81ad
Apply typehints to more general pocketmine\network namespace
2018-07-05 13:36:23 +01:00
950465d283
as always, missed one - I blame PhpStorm
2018-07-05 13:35:04 +01:00
2bba3a0805
Apply typehints to pocketmine\network\mcpe\protocol namespace
...
this is pulled from network-nuke in order to reduce the size of the diff.
2018-07-05 13:19:15 +01:00
fbd4f4a849
Merge branch 'release/3.1'
2018-07-05 12:11:26 +01:00
399870bf31
Merge branch 'release/3.1'
2018-07-02 16:58:22 +01:00
2252f7498d
Merge branch 'release/3.1'
2018-07-02 16:57:01 +01:00
5dc4e17a96
Updated TesterPlugin submodule
2018-06-29 20:11:32 +01:00
49bca0d5a1
Remove a whole bunch of crap from the Plugin public interface ( #2268 )
...
- remove onLoad(), onEnable(), onDisable()
- remove Config related methods
- remove getResource(), saveResource(), getResources()
did I troll any readers so far?
On a more serious note, these methods do not need to be declared in this interface because they are either hooks (`onLoad()`, `onEnable()`, `onDisable()`) or methods only used from within `PluginBase` and its children. They are not intended to be public API, and for this reason they don't need to be exposed in the interface.
2018-06-29 20:04:10 +01:00
3846ee3d1d
reorganize and optimize start.sh ( #2267 )
2018-06-29 14:48:29 +01:00
d49a41f788
Merge branch 'release/3.1'
2018-06-29 12:31:04 +01:00
4a11ded185
Merge branch 'release/3.1'
2018-06-29 12:19:32 +01:00
fc8dc8a497
Merge branch 'release/3.1'
2018-06-24 17:34:57 +01:00
cfee9aa117
Merge branch 'release/3.1'
2018-06-24 12:07:57 +01:00
884ebe632d
Merge branch 'release/3.1'
2018-06-23 13:04:20 +01:00
d67149376d
Merge branch 'release/3.1'
2018-06-22 17:48:09 +01:00
78aa1ee22e
Merge branch 'release/3.1'
2018-06-22 13:42:29 +01:00
f60b0e5cc7
Server: more dev build warnings
2018-06-22 09:40:33 +01:00
9a6a5e2088
submodule updates
2018-06-22 09:36:07 +01:00
23085bf9b3
Merge branch 'master' of https://github.com/pmmp/pocketmine-mp
2018-06-22 09:14:03 +01:00
0948c65276
Merge branch 'release/3.x'
2018-06-22 09:13:49 +01:00
2308eadf53
Add ExamplePlugin to README
2018-06-21 22:15:50 +01:00
eddd626461
Trapdoor: fixed condition for side checking
2018-06-21 20:13:26 +01:00
8a65941489
reeeeee
2018-06-21 20:01:27 +01:00
99a0c2a188
Block: Make recalculation of BB non-dependent on block position
...
This now computes BBs relative to 0,0,0 and then offsets them as appropriate. This requires less boilerplate code and also furthers the goal of separating block types from instances.
2018-06-21 19:58:28 +01:00