mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 03:06:55 +00:00
Compare commits
182 Commits
4.1.0-BETA
...
4.3.2
Author | SHA1 | Date | |
---|---|---|---|
755ca1af9b | |||
7d78b9cb2c | |||
91f802ac7a | |||
a6299b0927 | |||
6e372d9e36 | |||
ad8132ae11 | |||
cf15a0913d | |||
33cf085692 | |||
223893fd5c | |||
a58551af5b | |||
f7dce4af88 | |||
dff5c30172 | |||
e8994dbc17 | |||
aaba8a2a9a | |||
27056b6c37 | |||
9930de01b9 | |||
cd021f49cd | |||
e4ce467c0b | |||
6b4687a36b | |||
c085bf0db4 | |||
e0d4bd985e | |||
3339225fe8 | |||
df33e179e5 | |||
624a7dff16 | |||
1d314ad4ce | |||
5a98b08ee8 | |||
d9d02d526a | |||
f272986903 | |||
988da8eaab | |||
ea7f706aed | |||
52e3f1e269 | |||
4c9d2a989e | |||
022db5cbe3 | |||
3bbf558883 | |||
1d68d9f71a | |||
f2e8824242 | |||
a0e47b5a64 | |||
f7465f55e7 | |||
741182c55f | |||
2efce35331 | |||
d1dfbd95e2 | |||
1aee5b1ed8 | |||
fefd3e6b29 | |||
9b43be9d9c | |||
ea677154cb | |||
7f2802e75f | |||
f924208881 | |||
6bea2961d9 | |||
ac3a6033b9 | |||
d7e6b01216 | |||
26aee7ff73 | |||
319c8fe32c | |||
ce121ccea9 | |||
7f1a4185b5 | |||
8cc7fb9dd9 | |||
194cb1fb84 | |||
8ea106c091 | |||
a6cb3313b0 | |||
c6374b79b0 | |||
901449b0b1 | |||
4e777572c9 | |||
90a8595a40 | |||
bf71eb448a | |||
2c29d272ad | |||
98aa2b9ff9 | |||
ea33a04d00 | |||
4a94cb85a2 | |||
b7e6854189 | |||
2b8a54f8ff | |||
a5dab0f61e | |||
824f1f24ff | |||
f4f5c3128f | |||
fdd42fd15f | |||
05a5e5eac1 | |||
c8e1cfcbee | |||
869dda9a45 | |||
e2c647ef91 | |||
05fdd94754 | |||
4a599b58ff | |||
05792826bc | |||
fbf7ad4295 | |||
6c1c0c867e | |||
5c0eb92d81 | |||
1e88412a8f | |||
f97ce6afef | |||
879476d8e0 | |||
6d584cf008 | |||
8efa299c65 | |||
b6e7ad187a | |||
5ef73ca9aa | |||
c50518a4ca | |||
4c98780bdb | |||
856fd2a33b | |||
581bbfe255 | |||
b4e1edaa64 | |||
025f6407e2 | |||
10c0d83fa5 | |||
9a6ec14cbf | |||
f77fec0c3c | |||
5d970cf5bd | |||
58e186440b | |||
6a39caa204 | |||
91f81d4c8e | |||
dfd8c4e4b8 | |||
c9c50e16ec | |||
3e90c3072a | |||
12946fbe46 | |||
7cd394b0fb | |||
0bca098707 | |||
d47a7f48bd | |||
f181c60209 | |||
784c34f784 | |||
61265604fb | |||
29909e7f44 | |||
3232a83965 | |||
c816bbdb6e | |||
4f25ab10e9 | |||
f04099c5de | |||
fdb82f5fb8 | |||
75d4c47384 | |||
bd4c2b5245 | |||
d60dba2de0 | |||
51a3043dfd | |||
7098bcec8c | |||
6d65512531 | |||
b26b1cd32f | |||
54db842d16 | |||
31a0085efb | |||
715355e148 | |||
55dfacea8d | |||
55c744cc00 | |||
7e903fde5b | |||
4f44a067b0 | |||
44818e6d14 | |||
325131dd30 | |||
1eb59fb9b5 | |||
1c60aa9769 | |||
e9dd9df0a0 | |||
032b15efe0 | |||
256826d9c7 | |||
c273b29dec | |||
7ddd547190 | |||
38e34093cf | |||
dd1ebb5915 | |||
df1cdbe921 | |||
7846ea8acc | |||
1dc0d5f96a | |||
712ffb3e31 | |||
2a4111868c | |||
123701ed76 | |||
28dce8783f | |||
3781b62d35 | |||
859f062267 | |||
cfdbfa3d58 | |||
e9a6c0ba58 | |||
d16b6fe61e | |||
7a75fcda44 | |||
8d289ab01d | |||
40c7497efe | |||
6ccb1ff114 | |||
1d2593208a | |||
a7bdef69e2 | |||
d9ea647925 | |||
6673289c33 | |||
822af4f7f5 | |||
3155c90396 | |||
1dbfedce4c | |||
3ab5b5a79d | |||
8a4bc72b34 | |||
6cbc14f2b2 | |||
75d0fc4749 | |||
ea161af4e5 | |||
0bf5f97fe9 | |||
b9f1bcf0e4 | |||
32b07e0940 | |||
99f087e5e1 | |||
22a4117109 | |||
aaf7a88de7 | |||
e0da99a973 | |||
b2630a0920 | |||
67a0ae0246 | |||
5ae20459dd |
5
.github/dependabot.yml
vendored
5
.github/dependabot.yml
vendored
@ -6,3 +6,8 @@ updates:
|
||||
interval: daily
|
||||
time: "10:00"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: gitsubmodule
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
|
97
.github/workflows/build-docker-image.yml
vendored
Normal file
97
.github/workflows/build-docker-image.yml
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
name: Update Docker Hub images
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Update Docker Hub images
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Clone pmmp/PocketMine-Docker repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: pmmp/PocketMine-Docker
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Get tag names
|
||||
id: tag-name
|
||||
run: |
|
||||
VERSION=$(echo "${{ github.ref }}" | sed 's{^refs/tags/{{')
|
||||
echo ::set-output name=TAG_NAME::$VERSION
|
||||
echo ::set-output name=MAJOR::$(echo $VERSION | cut -d. -f1)
|
||||
echo ::set-output name=MINOR::$(echo $VERSION | cut -d. -f1-2)
|
||||
|
||||
- name: Download new release information
|
||||
run: curl -f -L ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ steps.tag-name.outputs.TAG_NAME }}/build_info.json -o new_build_info.json
|
||||
|
||||
- name: Detect channel
|
||||
id: channel
|
||||
run: echo ::set-output name=CHANNEL::$(jq -r '.channel' new_build_info.json)
|
||||
|
||||
- name: Get name of Docker repository name
|
||||
id: docker-repo-name
|
||||
run: echo ::set-output name=NAME::$(echo "${GITHUB_REPOSITORY,,}")
|
||||
|
||||
- name: Build image for tag
|
||||
uses: docker/build-push-action@v2.10.0
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
tags: |
|
||||
${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.TAG_NAME }}
|
||||
# ghcr.io/${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.TAG_NAME }}
|
||||
build-args: |
|
||||
PMMP_TAG=${{ steps.tag-name.outputs.TAG_NAME }}
|
||||
PMMP_REPO=${{ github.repository }}
|
||||
|
||||
- name: Build image for major tag
|
||||
if: steps.channel.outputs.CHANNEL == 'stable'
|
||||
uses: docker/build-push-action@v2.10.0
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
tags: |
|
||||
${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.MAJOR }}
|
||||
# ghcr.io/${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.MAJOR }}
|
||||
build-args: |
|
||||
PMMP_TAG=${{ steps.tag-name.outputs.TAG_NAME }}
|
||||
PMMP_REPO=${{ github.repository }}
|
||||
|
||||
- name: Build image for minor tag
|
||||
if: steps.channel.outputs.CHANNEL == 'stable'
|
||||
uses: docker/build-push-action@v2.10.0
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
tags: |
|
||||
${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.MINOR }}
|
||||
# ghcr.io/${{ steps.docker-repo-name.outputs.NAME }}:${{ steps.tag-name.outputs.MINOR }}
|
||||
build-args: |
|
||||
PMMP_TAG=${{ steps.tag-name.outputs.TAG_NAME }}
|
||||
PMMP_REPO=${{ github.repository }}
|
||||
|
||||
- name: Build image for latest tag
|
||||
if: steps.channel.outputs.CHANNEL == 'stable'
|
||||
uses: docker/build-push-action@v2.10.0
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
tags: |
|
||||
${{ steps.docker-repo-name.outputs.NAME }}:latest
|
||||
# ghcr.io/${{ steps.docker-repo-name.outputs.NAME }}:latest
|
||||
build-args: |
|
||||
PMMP_TAG=${{ steps.tag-name.outputs.TAG_NAME }}
|
||||
PMMP_REPO=${{ github.repository }}
|
20
.github/workflows/main.yml
vendored
20
.github/workflows/main.yml
vendored
@ -13,11 +13,11 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.14]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- name: Build and prepare PHP cache
|
||||
uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636
|
||||
uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
install-path: "./bin"
|
||||
@ -31,13 +31,13 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.14]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636
|
||||
uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
install-path: "./bin"
|
||||
@ -69,13 +69,13 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.14]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636
|
||||
uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
install-path: "./bin"
|
||||
@ -107,7 +107,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.14]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -115,7 +115,7 @@ jobs:
|
||||
submodules: true
|
||||
|
||||
- name: Setup PHP
|
||||
uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636
|
||||
uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
install-path: "./bin"
|
||||
@ -147,13 +147,13 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [8.0.14]
|
||||
php: [8.0.18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636
|
||||
uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
install-path: "./bin"
|
||||
|
@ -27,7 +27,8 @@
|
||||
## For developers
|
||||
* [Building and running from source](BUILDING.md)
|
||||
* [Developer documentation](https://devdoc.pmmp.io) - General documentation for PocketMine-MP plugin developers
|
||||
* [Latest API documentation](https://jenkins.pmmp.io/job/PocketMine-MP-doc/doxygen/) - Doxygen documentation generated from development
|
||||
* [Latest release API documentation](https://apidoc.pmmp.io) - Doxygen API documentation generated for each release
|
||||
* [Latest bleeding-edge API documentation](https://apidoc-dev.pmmp.io) - Doxygen API documentation generated weekly from `next-major` branch
|
||||
* [DevTools](https://github.com/pmmp/DevTools/) - Development tools plugin for creating plugins
|
||||
* [ExamplePlugin](https://github.com/pmmp/ExamplePlugin/) - Example plugin demonstrating some basic API features
|
||||
* [Contributing Guidelines](CONTRIBUTING.md)
|
||||
|
@ -82,6 +82,7 @@ function generateMethodAnnotations(string $namespaceName, array $members) : stri
|
||||
|
||||
require dirname(__DIR__) . '/vendor/autoload.php';
|
||||
|
||||
/** @var string $file */
|
||||
foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($argv[1], \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::CURRENT_AS_PATHNAME)) as $file){
|
||||
if(substr($file, -4) !== ".php"){
|
||||
continue;
|
||||
|
Submodule build/php updated: bd329dba08...0b5760bb3b
@ -413,6 +413,7 @@ However, if we add `src-namespace-prefix: pmmp\TesterPlugin` to the `plugin.yml`
|
||||
|
||||
### Command
|
||||
- The following classes have been removed:
|
||||
- `PluginIdentifiableCommand` - use `PluginOwned` and `PluginOwnedTrait`
|
||||
- `RemoteConsoleCommandSender`
|
||||
- The following API methods have signature changes:
|
||||
- `Command->setPermission()` argument is now mandatory (but still nullable).
|
||||
@ -1054,6 +1055,7 @@ However, if we add `src-namespace-prefix: pmmp\TesterPlugin` to the `plugin.yml`
|
||||
- `Player->addWindow()`: use `Player->setCurrentWindow()` instead
|
||||
- `Player->dataPacket()`: replaced by `NetworkSession->sendDataPacket()`
|
||||
- `Player->getAddress()`: replaced by `NetworkSession->getIp()`
|
||||
- `Player->getClientId()`: the client ID can be found in `PlayerInfo->getExtraData()`
|
||||
- `Player->getPing()`: moved to `NetworkSession`
|
||||
- `Player->getPort()`: moved to `NetworkSession`
|
||||
- `Player->getWindow()`: use `Player->getCurrentWindow()` instead
|
||||
@ -1069,6 +1071,8 @@ However, if we add `src-namespace-prefix: pmmp\TesterPlugin` to the `plugin.yml`
|
||||
- API version checks are now more strict. It is no longer legal to declare multiple minimum versions on the same major version. Doing so will now cause the plugin to fail to load with the message `Multiple minimum API versions found for some major versions`.
|
||||
- `plugin.yml` YAML commands loading is now internalized inside `PluginBase`.
|
||||
- `PluginManager->registerEvent()` now has a simpler signature: `registerEvent(string $event, \Closure $handler, int $priority, Plugin $plugin, bool $handleCancelled = false)`. The provided closure must accept the specified event class as its only parameter. See [Event API changes](#event) for more details.
|
||||
- The following classes have been added:
|
||||
- `PluginOwned`
|
||||
- The following classes have been removed:
|
||||
- `PluginLogger`
|
||||
- The following constants have been removed:
|
||||
@ -1620,3 +1624,28 @@ Released 21st January 2022.
|
||||
- Fixed ender pearls teleporting players when thrown by a player directly against a wall when cancelling `ProjectileLaunchEvent`.
|
||||
- Fixed collision box of brewing stand.
|
||||
- Fixed break times and tool types of bamboo, nether wart blocks, infested stone and leaves.
|
||||
|
||||
# 4.0.8
|
||||
Released 25th January 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed ender chest not dropping itself when mined with a Silk Touch pickaxe.
|
||||
- The correct amount of fall damage is now taken when falling from a height onto hay bales.
|
||||
|
||||
# 4.0.9
|
||||
Released 5th February 2022.
|
||||
|
||||
## Fixes
|
||||
### Core
|
||||
- The spawn chunk of the default world is no longer loaded during shutdown. Previously, it would attempt to find a safe spawn to teleport players to, only to unload the target world of that safe spawn and not use it.
|
||||
- The spawn chunk of the default world is no longer loaded when unloading a non-default world containing zero players.
|
||||
- Fixed chunk version `8` in Bedrock worlds being treated as corrupted. These appeared in worlds between 1.2.13 and 1.8.0.
|
||||
|
||||
### API
|
||||
- Added missing bounds check to `Liquid->setDecay()`.
|
||||
- Fixed `StringToItemParser` returning concrete instead of concrete powder when given `<color>_concrete_powder`.
|
||||
|
||||
### Gameplay
|
||||
- Cobwebs now drop themselves when broken using shears.
|
||||
- Fixed spectator players being able to drop items.
|
||||
- Fixed collision shapes of Bell in different orientations.
|
||||
|
166
changelogs/4.1-beta.md
Normal file
166
changelogs/4.1-beta.md
Normal file
@ -0,0 +1,166 @@
|
||||
**For Minecraft: Bedrock Edition 1.18.0**
|
||||
|
||||
### Note about API versions
|
||||
Plugins which don't touch the protocol and compatible with any previous 4.x.y version will also run on these releases and do not need API bumps.
|
||||
Plugin developers should **only** update their required API to this version if you need the changes in this build.
|
||||
|
||||
**WARNING: If your plugin uses the protocol, you're not shielded by API change constraints.** You should consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you do.
|
||||
|
||||
# 4.1.0-BETA1
|
||||
Released 22nd January 2022.
|
||||
|
||||
## General
|
||||
- Game mode names (e.g. `survival`, `creative`) may now be used for the `gamemode` property in `server.properties`.
|
||||
- Increased default maximum render distance to 16 chunks. Players with a render distance smaller than this will notice no difference.
|
||||
- The setup wizard now prompts for a maximum render distance value.
|
||||
- The setup wizard now prompts for an IPv6 port selection. Previously it would always use 19133.
|
||||
- `chunk-ticking.disable-block-ticking` now accepts block names like those used in the `/give` command.
|
||||
- The `/clear` command now behaves more like vanilla:
|
||||
- The order of inventories is now the same as Bedrock.
|
||||
- The cursor and offhand inventories are now cleared if necessary.
|
||||
|
||||
## Technical
|
||||
- `PlayerAuthInputPacket` is now used instead of `MovePlayerPacket` for processing movements. This improves position and rotation accuracy.
|
||||
- `&&` and `||` are now always used instead of `and` and `or`.
|
||||
- New version of `pocketmine/errorhandler` is used by this version, adding support for `ErrorToExceptionHandler::trap()`. This enables reliably capturing `E_WARNING` and `E_NOTICE` from functions such as `yaml_parse()` and friends.
|
||||
- New dependency versions are required by this version:
|
||||
- `pocketmine/bedrock-protocol` has been updated from 7.1.0 to [7.3.0](https://github.com/pmmp/BedrockProtocol/releases/tag/7.3.0%2Bbedrock-1.18.0).
|
||||
- `pocketmine/errorhandler` has been updated from 0.3.0 to [0.6.0](https://github.com/pmmp/ErrorHandler/releases/tag/0.6.0).
|
||||
|
||||
## API
|
||||
### Block
|
||||
- The following classes have been added:
|
||||
- `Lectern`
|
||||
- `Pumpkin`
|
||||
- The following public API methods have been added:
|
||||
- `Block->getTypeId() : int` - returns an integer which uniquely identifies the block type, ignoring things like facing, colour etc.
|
||||
- `VanillaBlocks::LECTERN()`
|
||||
|
||||
### Entity
|
||||
- The following classes have been added:
|
||||
- `animation\ItemEntityStackSizeChangeAnimation`
|
||||
- The following public API methods have been added:
|
||||
- `object\ItemEntity->isMergeable(object\ItemEntity $other) : bool`
|
||||
- `object\ItemEntity->setStackSize(int $size) : void`
|
||||
- `object\ItemEntity->tryMergeInto(object\ItemEntity $other) : bool`
|
||||
- `ExperienceManager->canAttractXpOrbs() : bool`
|
||||
- `ExperienceManager->setCanAttractXpOrbs(bool $v = true) : void`
|
||||
- `Entity->getSize() : EntitySizeInfo`
|
||||
- `Living->isGliding() : bool`
|
||||
- `Living->isSwimming() : bool`
|
||||
- `Living->setGliding(bool $value = true) : void`
|
||||
- `Living->setSwimming(bool $value = true) : void`
|
||||
- The following protected API methods have been added:
|
||||
- `Entity->getBlocksIntersected(float $inset) : \Generator<int, Block, void, void>`
|
||||
|
||||
### Event
|
||||
- `BlockSpreadEvent` is now called when fire spreads to the positions of blocks it burns away.
|
||||
- `BlockFormEvent` is now called when concrete powder turns into concrete due to contact with water.
|
||||
- The following classes have been added:
|
||||
- `BlockMeltEvent` - called when ice or snow melts
|
||||
- `ChestPairEvent` - called when two chests try to form a pair
|
||||
- `PlayerToggleGlideEvent` - called when a player starts or stops gliding
|
||||
- `PlayerToggleSwimEvent` - called when a player starts or stops swimming
|
||||
|
||||
### Item
|
||||
- The following public API methods have been added:
|
||||
- `SplashPotion->getType() : PotionType`
|
||||
- `VanillaItems::AIR()`
|
||||
- The following API methods have been deprecated:
|
||||
- `ItemFactory::air()` - use `VanillaItems::AIR()` instead
|
||||
|
||||
### Player
|
||||
- The following public API methods have been added:
|
||||
- `Player->hasBlockCollision() : bool`
|
||||
- `Player->setHasBlockCollision(bool $value)` - allows controlling spectator-like no-clip behaviour without changing game mode
|
||||
- `Player->toggleSwim(bool $swim) : bool` - called by the network system when the client tries to start/stop swimming
|
||||
- `Player->toggleGlide(bool $glide) : bool` - called by the network system when the client tries to start/stop gliding
|
||||
|
||||
### Server
|
||||
- The following public API constants have been added:
|
||||
- `Server::DEFAULT_SERVER_NAME`
|
||||
- `Server::DEFAULT_MAX_PLAYERS`
|
||||
- `Server::DEFAULT_PORT_IPV4`
|
||||
- `Server::DEFAULT_PORT_IPV6`
|
||||
- `Server::DEFAULT_MAX_VIEW_DISTANCE`
|
||||
|
||||
### Utils
|
||||
- Config parsing errors are now always represented by `ConfigLoadException` and include the path to the file in the message.
|
||||
- Added `TextFormat::MINECOIN_GOLD`, and support for it to the various `TextFormat` methods.
|
||||
- The following public API methods have been added:
|
||||
- `Utils::assumeNotFalse()` - static analysis crutch to silence PHPStan errors without using `ignoreErrors` or `@phpstan-ignore-line`, which are both too coarse.
|
||||
- The following public API properties have been added:
|
||||
- `Terminal::$COLOR_MINECOIN_GOLD`
|
||||
- The following classes have been added:
|
||||
- `ConfigLoadException`
|
||||
- Fixed `Random->nextSignedInt()` to actually return a signed int. Previously it would return any integer value between 0 and 4,294,957,295.
|
||||
- Fixed `Random->nextSignedFloat()` to return a float between `-1.0` and `1.0`. Previously it would return any value between `0.0` and `2.0`.
|
||||
- `VersionString->getNumber()` output is now structured differently to fix overflow issues caused by the old format.
|
||||
|
||||
### World
|
||||
- The following classes have been added:
|
||||
- `sound\ItemUseOnBlockSound`
|
||||
- `sound\LecternPlaceBookSound`
|
||||
|
||||
## Gameplay
|
||||
### Blocks
|
||||
- Fire now spreads.
|
||||
- Implemented lectern blocks.
|
||||
- Added missing sounds for hoeing grass and dirt.
|
||||
- Added missing sounds for using a shovel on grass to create grass path.
|
||||
- Pumpkins can now be carved using shears.
|
||||
|
||||
### Items
|
||||
- Dropped items of the same type now merge with each other.
|
||||
|
||||
### Misc
|
||||
- Implemented player swimming.
|
||||
|
||||
# 4.1.0-BETA2
|
||||
Released 27th January 2022.
|
||||
|
||||
## API
|
||||
### Block
|
||||
- The following API methods have been added:
|
||||
- `utils\BrewingStandSlot->getSlotNumber() : int`
|
||||
- `utils\FurnaceType->getCookSound() : Sound`
|
||||
- The following API constants have been added:
|
||||
- `tile\BrewingStand::BREW_TIME_TICKS`
|
||||
|
||||
### Crafting
|
||||
- The following API methods have been added:
|
||||
- `CraftingManager->getPotionContainerChangeRecipes() : array<int, array<string, PotionContainerChangeRecipe>>`
|
||||
- `CraftingManager->getPotionTypeRecipes() : array<string, array<string, PotionTypeRecipe>>`
|
||||
- `CraftingManager->registerPotionContainerChangeRecipe(PotionContainerChangeRecipe $recipe) : void`
|
||||
- `CraftingManager->registerPotionTypeRecipe(PotionTypeRecipe $recipe) : void`
|
||||
- The following classes have been added:
|
||||
- `BrewingRecipe`
|
||||
- `PotionContainerChangeRecipe`
|
||||
- `PotionTypeRecipe`
|
||||
|
||||
### Event
|
||||
- The following classes have been added:
|
||||
- `BrewItemEvent` - called when a brewing stand finishes brewing potions; this is called up to 3 times (once for each brewing slot, as needed)
|
||||
- `BrewingFuelUseEvent` - called when a brewing stand consumes blaze powder
|
||||
- `PlayerViewDistanceChangeEvent` - called whenever a player alters their render distance or requests one for the first time when connecting
|
||||
|
||||
### World
|
||||
#### Sound
|
||||
- The following classes have been added:
|
||||
- `BlastFurnaceSound` - the sound made by a blast furnace during smelting
|
||||
- `FurnaceSound` - the sound made by a regular furnace during cooking or smelting
|
||||
- `PotionFinishBrewingSound` - the sound made by a brewing stand when a potion finishes being brewed
|
||||
- `SmokerSound` - the sound made by a smoker during cooking
|
||||
|
||||
## Gameplay
|
||||
### Blocks
|
||||
- Brewing stands can now be used for brewing potions.
|
||||
- The visual appearance of a brewing stand now updates correctly when the contents of its inventory changes (adding/removing potions).
|
||||
- Added missing sounds for furnace, blast furnace and smoker.
|
||||
- Fixed ender chest not dropping itself when mined with a Silk Touch pickaxe.
|
||||
- Cobwebs now drop themselves when mined using shears.
|
||||
- The correct amount of fall damage is now taken when falling from a height onto hay bales.
|
||||
- Fixed block updating bug introduced by beta1 which caused crops and other plants to never grow.
|
||||
|
||||
### Misc
|
||||
- Added a workaround for client hitbox size bug after swimming which caused the player to be able to fit into one-block-tall gaps.
|
@ -6,8 +6,8 @@ Plugin developers should **only** update their required API to this version if y
|
||||
|
||||
**WARNING: If your plugin uses the protocol, you're not shielded by API change constraints.** You should consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you do.
|
||||
|
||||
# 4.1.0-BETA1
|
||||
Released 22nd January 2022.
|
||||
# 4.1.0
|
||||
Released 7th February 2022.
|
||||
|
||||
## General
|
||||
- Game mode names (e.g. `survival`, `creative`) may now be used for the `gamemode` property in `server.properties`.
|
||||
@ -35,6 +35,21 @@ Released 22nd January 2022.
|
||||
- The following public API methods have been added:
|
||||
- `Block->getTypeId() : int` - returns an integer which uniquely identifies the block type, ignoring things like facing, colour etc.
|
||||
- `VanillaBlocks::LECTERN()`
|
||||
- `utils\BrewingStandSlot->getSlotNumber() : int`
|
||||
- `utils\FurnaceType->getCookSound() : Sound`
|
||||
- The following API constants have been added:
|
||||
- `tile\BrewingStand::BREW_TIME_TICKS`
|
||||
|
||||
### Crafting
|
||||
- The following API methods have been added:
|
||||
- `CraftingManager->getPotionContainerChangeRecipes() : array<int, array<string, PotionContainerChangeRecipe>>`
|
||||
- `CraftingManager->getPotionTypeRecipes() : array<string, array<string, PotionTypeRecipe>>`
|
||||
- `CraftingManager->registerPotionContainerChangeRecipe(PotionContainerChangeRecipe $recipe) : void`
|
||||
- `CraftingManager->registerPotionTypeRecipe(PotionTypeRecipe $recipe) : void`
|
||||
- The following classes have been added:
|
||||
- `BrewingRecipe`
|
||||
- `PotionContainerChangeRecipe`
|
||||
- `PotionTypeRecipe`
|
||||
|
||||
### Entity
|
||||
- The following classes have been added:
|
||||
@ -58,9 +73,12 @@ Released 22nd January 2022.
|
||||
- `BlockFormEvent` is now called when concrete powder turns into concrete due to contact with water.
|
||||
- The following classes have been added:
|
||||
- `BlockMeltEvent` - called when ice or snow melts
|
||||
- `BrewItemEvent` - called when a brewing stand finishes brewing potions; this is called up to 3 times (once for each brewing slot, as needed)
|
||||
- `BrewingFuelUseEvent` - called when a brewing stand consumes blaze powder
|
||||
- `ChestPairEvent` - called when two chests try to form a pair
|
||||
- `PlayerToggleGlideEvent` - called when a player starts or stops gliding
|
||||
- `PlayerToggleSwimEvent` - called when a player starts or stops swimming
|
||||
- `PlayerViewDistanceChangeEvent` - called whenever a player alters their render distance or requests one for the first time when connecting
|
||||
|
||||
### Item
|
||||
- The following public API methods have been added:
|
||||
@ -99,8 +117,12 @@ Released 22nd January 2022.
|
||||
|
||||
### World
|
||||
- The following classes have been added:
|
||||
- `sound\BlastFurnaceSound` - the sound made by a blast furnace during smelting
|
||||
- `sound\FurnaceSound` - the sound made by a regular furnace during cooking or smelting
|
||||
- `sound\ItemUseOnBlockSound`
|
||||
- `sound\LecternPlaceBookSound`
|
||||
- `sound\PotionFinishBrewingSound` - the sound made by a brewing stand when a potion finishes being brewed
|
||||
- `sound\SmokerSound` - the sound made by a smoker during cooking
|
||||
|
||||
## Gameplay
|
||||
### Blocks
|
||||
@ -109,9 +131,12 @@ Released 22nd January 2022.
|
||||
- Added missing sounds for hoeing grass and dirt.
|
||||
- Added missing sounds for using a shovel on grass to create grass path.
|
||||
- Pumpkins can now be carved using shears.
|
||||
- Brewing stands can now be used for brewing potions.
|
||||
- The visual appearance of a brewing stand now updates correctly when the contents of its inventory changes (adding/removing potions).
|
||||
- Added missing sounds for furnace, blast furnace and smoker.
|
||||
- Fixed ender chest not dropping itself when mined with a Silk Touch pickaxe.
|
||||
- Cobwebs now drop themselves when mined using shears.
|
||||
- The correct amount of fall damage is now taken when falling from a height onto hay bales.
|
||||
|
||||
### Items
|
||||
- Dropped items of the same type now merge with each other.
|
||||
|
||||
### Misc
|
||||
- Implemented player swimming.
|
||||
|
121
changelogs/4.2.md
Normal file
121
changelogs/4.2.md
Normal file
@ -0,0 +1,121 @@
|
||||
**For Minecraft: Bedrock Edition 1.18.10**
|
||||
|
||||
### Note about API versions
|
||||
Plugins which don't touch the protocol and compatible with any previous 4.x.y version will also run on these releases and do not need API bumps.
|
||||
Plugin developers should **only** update their required API to this version if you need the changes in this build.
|
||||
|
||||
**WARNING: If your plugin uses the protocol, you're not shielded by API change constraints.** You should consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you do.
|
||||
|
||||
# 4.2.0
|
||||
- Added support for Minecraft: Bedrock Edition 1.18.10.
|
||||
|
||||
# 4.2.1
|
||||
Released 19th February 2022.
|
||||
|
||||
## General
|
||||
- Improved performance of `Item::nbtSerialize()` - this will improve performance during world saves.
|
||||
- Added more missing changes to the 4.0.0 changelog.
|
||||
|
||||
## Fixes
|
||||
- Fixed multiple players being able to sleep in the same bed.
|
||||
- Fixed hitbox not resetting properly after swimming or gliding.
|
||||
|
||||
# 4.2.2
|
||||
Released 2nd March 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed crash in `/dumpmemory` due to usage of non-printable string keys in `CraftingManager`. Array contents in memory dumps are now rendered as prettified key-value pairs.
|
||||
- Fixed output directory for `/dumpmemory`.
|
||||
- `PlayerInventory->isHotbarSlot()` now correctly returns `false` when given `9`.
|
||||
- Fixed ghost items left in the inventory when dropping tools while mining.
|
||||
|
||||
# 4.2.3
|
||||
Released 9th March 2022.
|
||||
|
||||
## Technical
|
||||
- Now analysed using PHPStan 1.4.8.
|
||||
- Now using `pocketmine/bedrock-protocol` [`8.0.1`](https://github.com/pmmp/BedrockProtocol/releases/tag/8.0.1%2Bbedrock-1.18.10).
|
||||
|
||||
## Fixes
|
||||
### Core
|
||||
- Fixed a memory leak and other bugs related to plugins disabling themselves during `onEnable()`.
|
||||
|
||||
### Gameplay
|
||||
- Sweet berry bushes now absorb fall damage.
|
||||
- Fixed mycelium spreading onto coarse dirt.
|
||||
- Fixed blocks placed during `Block->onIncinerate()` getting overwritten.
|
||||
- Fixed shulker boxes being unopenable when underwater.
|
||||
- Fixed invisible fire on top of transparent non-flammable blocks.
|
||||
|
||||
### API
|
||||
- Various APIs accepting `Vector3`, `Position` or `Location` no longer accept objects containing `INF` or `NaN` in any component. Previously, this was allowed, but would cause lots of obscure crashes later on.
|
||||
- `Entity->setRotation()` no longer accepts `INF` or `NaN`.
|
||||
- Fixed missing bounds check for `ItemFrame->setItemDropChance()`.
|
||||
|
||||
# 4.2.4
|
||||
Released 18th March 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed a crash when handling out-of-bounds meta values on the network.
|
||||
|
||||
# 4.2.5
|
||||
Released 28th March 2022.
|
||||
|
||||
## General
|
||||
- The layout of the human-readable part of crashdumps has been changed in an effort to improve the useful information density. It is hoped that this change will cause more useful information to be provided when people paste crash traces on Discord, since all the most important information is now at the top of the file.
|
||||
- Version, git hash, PHP version and OS have been moved to the top of the crashdump.
|
||||
- Backtrace has been moved above code sample.
|
||||
- Docker images are now built by GitHub Actions (first live test).
|
||||
|
||||
## Technical
|
||||
- The methods of `Inventory` and `BaseInventory` have been rearranged to improve coherency.
|
||||
|
||||
## Fixes
|
||||
### API
|
||||
- Enum members of enums created using `EnumTrait` are now able to have single-character names.
|
||||
- Registry members of registries created using `RegistryTrait` or `CloningRegistryTrait` now have their names checked for invalid characters.
|
||||
- `Entity::__construct()` now uses a guard variable to prevent it from being called multiple times unintentionally. This is necessary because `Entity::__construct()` has side effects.
|
||||
- Fixed `PlayerItemHeldEvent` not being called when the content of the held slot was changed (e.g. replacing the held item via inventory menu).
|
||||
|
||||
### Gameplay
|
||||
- Reduced the appearance of ghost items in unsupported gameplay scenarios using client prediction information. This fixes, for example, the appearance of ghost items when right-clicking on a filled flower pot.
|
||||
|
||||
# 4.2.6
|
||||
Released 1st April 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed buffer length underflow crash in `LoginPacket` handling.
|
||||
|
||||
# 4.2.7
|
||||
Released 15th April 2022.
|
||||
|
||||
## General
|
||||
- Added lots more documentation (in comments) about the `aliases` section in `pocketmine.yml`. You can read about this feature in the `aliases` section of the [updated `pocketmine.yml` template](/resources/pocketmine.yml).
|
||||
- Improved wording of documentation of `PlayerPreLoginEvent`.
|
||||
|
||||
## Fixes
|
||||
- Fixed core server crash when a plugin causes another plugin to be disabled during a scheduled task.
|
||||
- Fixed core server crash when loading a plugin with an abstract main class.
|
||||
- Fixed ghost items in many interaction situations (most notably, using projectiles while looking at an entity or block).
|
||||
- Implemented a workaround for a client teleport bug which led to player positions not updating properly when using ender pearls.
|
||||
- Fixed buggy movement when teleporting the player during `PlayerToggleSneakEvent`, `PlayerToggleSprintEvent`, `PlayerToggleSwimEvent` and `PlayerToggleGlideEvent`.
|
||||
|
||||
# 4.2.8
|
||||
Released 17th April 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed a memory leak in RakLib which could result in a server crash when players stay online for a long time.
|
||||
- Fixed server crash when attempting to load a corrupted empty resource pack.
|
||||
- Fixed users with the same name with differerently cased letters being able to duplicate items (userdata is matched by case-insensitive name).
|
||||
|
||||
# 4.2.9
|
||||
Released 19th April 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed several potential crashes when deserializing item NBT (due to insufficient validation of input data).
|
||||
|
||||
# 4.2.10
|
||||
Released 20th April 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed performance issue when chat messages received from the client contain many newlines. This security vulnerability was disclosed publicly necessitating a priority fix.
|
32
changelogs/4.3.md
Normal file
32
changelogs/4.3.md
Normal file
@ -0,0 +1,32 @@
|
||||
**For Minecraft: Bedrock Edition 1.18.30**
|
||||
|
||||
### Note about API versions
|
||||
Plugins which don't touch the protocol and compatible with any previous 4.x.y version will also run on these releases and do not need API bumps.
|
||||
Plugin developers should **only** update their required API to this version if you need the changes in this build.
|
||||
|
||||
**WARNING: If your plugin uses the protocol, you're not shielded by API change constraints.** You should consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you do.
|
||||
|
||||
# 4.3.0
|
||||
Released 20th April 2022.
|
||||
|
||||
## General
|
||||
- Added support for Minecraft: Bedrock Edition 1.18.30.
|
||||
- Removed support for older versions.
|
||||
|
||||
# 4.3.1
|
||||
Released 23rd April 2022.
|
||||
|
||||
## Fixes
|
||||
- Updated BedrockProtocol dependency to fix incorrect command argument types.
|
||||
- Creative players no longer die in the void.
|
||||
|
||||
# 4.3.2
|
||||
Released 10th May 2022.
|
||||
|
||||
## Fixes
|
||||
- Fixed an assertion failure in certain edge cases during world generation.
|
||||
- Fixed `Entity::setNameTagVisible()` not immediately showing results to players already online.
|
||||
|
||||
## Documentation
|
||||
- Added more documentation in the template `pocketmine.yml` for the `aliases` config section.
|
||||
- Removed useless doc comment in `PlayerChangeSkinEvent`.
|
@ -34,14 +34,14 @@
|
||||
"adhocore/json-comment": "^1.1",
|
||||
"fgrosse/phpasn1": "^2.3",
|
||||
"netresearch/jsonmapper": "^4.0",
|
||||
"pocketmine/bedrock-data": "~1.5.0+bedrock-1.18.0",
|
||||
"pocketmine/bedrock-protocol": "~7.3.0+bedrock-1.18.0",
|
||||
"pocketmine/bedrock-data": "~1.7.0+bedrock-1.18.30",
|
||||
"pocketmine/bedrock-protocol": "~9.0.0+bedrock-1.18.30",
|
||||
"pocketmine/binaryutils": "^0.2.1",
|
||||
"pocketmine/callback-validator": "^1.0.2",
|
||||
"pocketmine/classloader": "^0.2.0",
|
||||
"pocketmine/color": "^0.2.0",
|
||||
"pocketmine/errorhandler": "^0.6.0",
|
||||
"pocketmine/locale-data": "~2.3.0",
|
||||
"pocketmine/locale-data": "~2.5.0",
|
||||
"pocketmine/log": "^0.4.0",
|
||||
"pocketmine/log-pthreads": "^0.4.0",
|
||||
"pocketmine/math": "^0.4.0",
|
||||
@ -53,9 +53,9 @@
|
||||
"webmozart/path-util": "^2.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "1.3.3",
|
||||
"phpstan/phpstan-phpunit": "^1.0.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.0.0",
|
||||
"phpstan/phpstan": "1.6.7",
|
||||
"phpstan/phpstan-phpunit": "^1.1.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.2.0",
|
||||
"phpunit/phpunit": "^9.2"
|
||||
},
|
||||
"autoload": {
|
||||
|
401
composer.lock
generated
401
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "292d4bf59374d46e1ae84272f0abd522",
|
||||
"content-hash": "6a8998cdfb7158f5f7caf6d2202070ee",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/json-comment",
|
||||
@ -249,42 +249,42 @@
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/bedrock-data",
|
||||
"version": "1.5.0+bedrock-1.18.0",
|
||||
"version": "1.7.0+bedrock-1.18.30",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/BedrockData.git",
|
||||
"reference": "482c679aa5ed0b81c088c2b1ff0b8110a94c8a6c"
|
||||
"reference": "c8f323ff0cbdb36a5d95e7e4a23969f562445be0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/BedrockData/zipball/482c679aa5ed0b81c088c2b1ff0b8110a94c8a6c",
|
||||
"reference": "482c679aa5ed0b81c088c2b1ff0b8110a94c8a6c",
|
||||
"url": "https://api.github.com/repos/pmmp/BedrockData/zipball/c8f323ff0cbdb36a5d95e7e4a23969f562445be0",
|
||||
"reference": "c8f323ff0cbdb36a5d95e7e4a23969f562445be0",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0"
|
||||
"CC0-1.0"
|
||||
],
|
||||
"description": "Blobs of data generated from Minecraft: Bedrock Edition, used by PocketMine-MP",
|
||||
"support": {
|
||||
"issues": "https://github.com/pmmp/BedrockData/issues",
|
||||
"source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.18.0"
|
||||
"source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.18.30"
|
||||
},
|
||||
"time": "2021-11-30T18:30:46+00:00"
|
||||
"time": "2022-04-20T12:40:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/bedrock-protocol",
|
||||
"version": "7.3.0+bedrock-1.18.0",
|
||||
"version": "9.0.1+bedrock-1.18.30",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/BedrockProtocol.git",
|
||||
"reference": "418b4dbaa6720b6c6c4385a4d321d9c0b3dbf14b"
|
||||
"reference": "9d3cc87c4d26c002dd42aa9af20c0cd47a72018e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/418b4dbaa6720b6c6c4385a4d321d9c0b3dbf14b",
|
||||
"reference": "418b4dbaa6720b6c6c4385a4d321d9c0b3dbf14b",
|
||||
"url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/9d3cc87c4d26c002dd42aa9af20c0cd47a72018e",
|
||||
"reference": "9d3cc87c4d26c002dd42aa9af20c0cd47a72018e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -298,7 +298,7 @@
|
||||
"ramsey/uuid": "^4.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "1.3.1",
|
||||
"phpstan/phpstan": "1.5.7",
|
||||
"phpstan/phpstan-phpunit": "^1.0.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.0.0",
|
||||
"phpunit/phpunit": "^9.5"
|
||||
@ -316,9 +316,9 @@
|
||||
"description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/pmmp/BedrockProtocol/issues",
|
||||
"source": "https://github.com/pmmp/BedrockProtocol/tree/7.3.0+bedrock-1.18.0"
|
||||
"source": "https://github.com/pmmp/BedrockProtocol/tree/9.0.1+bedrock-1.18.30"
|
||||
},
|
||||
"time": "2022-01-06T20:44:27+00:00"
|
||||
"time": "2022-04-23T14:48:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/binaryutils",
|
||||
@ -536,16 +536,16 @@
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/locale-data",
|
||||
"version": "2.3.33",
|
||||
"version": "2.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/Language.git",
|
||||
"reference": "44998ca9c055f872a33e59cd4d2736d081ba84b5"
|
||||
"reference": "df6fc7f2b48850b306c60466a11f7a27bb8fe1de"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/Language/zipball/44998ca9c055f872a33e59cd4d2736d081ba84b5",
|
||||
"reference": "44998ca9c055f872a33e59cd4d2736d081ba84b5",
|
||||
"url": "https://api.github.com/repos/pmmp/Language/zipball/df6fc7f2b48850b306c60466a11f7a27bb8fe1de",
|
||||
"reference": "df6fc7f2b48850b306c60466a11f7a27bb8fe1de",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
@ -553,9 +553,9 @@
|
||||
"description": "Language resources used by PocketMine-MP",
|
||||
"support": {
|
||||
"issues": "https://github.com/pmmp/Language/issues",
|
||||
"source": "https://github.com/pmmp/Language/tree/2.3.33"
|
||||
"source": "https://github.com/pmmp/Language/tree/2.5.0"
|
||||
},
|
||||
"time": "2022-01-16T22:08:04+00:00"
|
||||
"time": "2022-04-01T22:36:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/log",
|
||||
@ -727,16 +727,16 @@
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/raklib",
|
||||
"version": "0.14.3",
|
||||
"version": "0.14.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/RakLib.git",
|
||||
"reference": "4798576fec0364266dce23b368a7fec5e5de7927"
|
||||
"reference": "1ea8e3b95a1b6bf785dc27d76578657be4185f42"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/4798576fec0364266dce23b368a7fec5e5de7927",
|
||||
"reference": "4798576fec0364266dce23b368a7fec5e5de7927",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/1ea8e3b95a1b6bf785dc27d76578657be4185f42",
|
||||
"reference": "1ea8e3b95a1b6bf785dc27d76578657be4185f42",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -748,7 +748,7 @@
|
||||
"pocketmine/log": "^0.3.0 || ^0.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "1.3.3",
|
||||
"phpstan/phpstan": "1.5.4",
|
||||
"phpstan/phpstan-strict-rules": "^1.0"
|
||||
},
|
||||
"type": "library",
|
||||
@ -764,9 +764,9 @@
|
||||
"description": "A RakNet server implementation written in PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/pmmp/RakLib/issues",
|
||||
"source": "https://github.com/pmmp/RakLib/tree/0.14.3"
|
||||
"source": "https://github.com/pmmp/RakLib/tree/0.14.4"
|
||||
},
|
||||
"time": "2022-01-10T21:29:48+00:00"
|
||||
"time": "2022-04-17T18:42:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/raklib-ipc",
|
||||
@ -930,25 +930,24 @@
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
"version": "4.2.3",
|
||||
"version": "4.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ramsey/uuid.git",
|
||||
"reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df"
|
||||
"reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
|
||||
"reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/8505afd4fea63b81a85d3b7b53ac3cb8dc347c28",
|
||||
"reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"brick/math": "^0.8 || ^0.9",
|
||||
"ext-ctype": "*",
|
||||
"ext-json": "*",
|
||||
"php": "^7.2 || ^8.0",
|
||||
"ramsey/collection": "^1.0",
|
||||
"symfony/polyfill-ctype": "^1.8",
|
||||
"symfony/polyfill-php80": "^1.14"
|
||||
"php": "^8.0",
|
||||
"ramsey/collection": "^1.0"
|
||||
},
|
||||
"replace": {
|
||||
"rhumsaa/uuid": "self.version"
|
||||
@ -985,20 +984,17 @@
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "4.x-dev"
|
||||
},
|
||||
"captainhook": {
|
||||
"force-install": true
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Ramsey\\Uuid\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
]
|
||||
],
|
||||
"psr-4": {
|
||||
"Ramsey\\Uuid\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@ -1012,7 +1008,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ramsey/uuid/issues",
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.2.3"
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.3.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1024,11 +1020,11 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-09-25T23:10:38+00:00"
|
||||
"time": "2022-03-27T21:42:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.24.0",
|
||||
"version": "v1.25.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
@ -1060,12 +1056,12 @@
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@ -1090,7 +1086,7 @@
|
||||
"portable"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0"
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1108,92 +1104,9 @@
|
||||
],
|
||||
"time": "2021-10-20T20:35:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.24.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
|
||||
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php80\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ion Bazan",
|
||||
"email": "ion.bazan@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-09-13T13:58:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php81",
|
||||
"version": "v1.24.0",
|
||||
"version": "v1.25.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php81.git",
|
||||
@ -1219,12 +1132,12 @@
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php81\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php81\\": ""
|
||||
},
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
@ -1252,7 +1165,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php81/tree/v1.24.0"
|
||||
"source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1383,29 +1296,30 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/instantiator.git",
|
||||
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
|
||||
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
|
||||
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
|
||||
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^8.0",
|
||||
"doctrine/coding-standard": "^9",
|
||||
"ext-pdo": "*",
|
||||
"ext-phar": "*",
|
||||
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
|
||||
"phpstan/phpstan": "^0.12",
|
||||
"phpstan/phpstan-phpunit": "^0.12",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
|
||||
"phpbench/phpbench": "^0.16 || ^1",
|
||||
"phpstan/phpstan": "^1.4",
|
||||
"phpstan/phpstan-phpunit": "^1",
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
|
||||
"vimeo/psalm": "^4.22"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@ -1432,7 +1346,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/instantiator/issues",
|
||||
"source": "https://github.com/doctrine/instantiator/tree/1.4.0"
|
||||
"source": "https://github.com/doctrine/instantiator/tree/1.4.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1448,38 +1362,42 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-11-10T18:47:58+00:00"
|
||||
"time": "2022-03-03T08:28:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
"version": "1.10.2",
|
||||
"version": "1.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
|
||||
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
|
||||
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
|
||||
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/collections": "<1.6.8",
|
||||
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/collections": "^1.0",
|
||||
"doctrine/common": "^2.6",
|
||||
"phpunit/phpunit": "^7.1"
|
||||
"doctrine/collections": "^1.6.8",
|
||||
"doctrine/common": "^2.13.3 || ^3.2.2",
|
||||
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"DeepCopy\\": "src/DeepCopy/"
|
||||
},
|
||||
"files": [
|
||||
"src/DeepCopy/deep_copy.php"
|
||||
]
|
||||
],
|
||||
"psr-4": {
|
||||
"DeepCopy\\": "src/DeepCopy/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@ -1495,7 +1413,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/myclabs/DeepCopy/issues",
|
||||
"source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
|
||||
"source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1503,7 +1421,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-11-13T09:40:50+00:00"
|
||||
"time": "2022-03-03T13:19:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
@ -1623,16 +1541,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phar-io/version",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phar-io/version.git",
|
||||
"reference": "bae7c545bef187884426f042434e561ab1ddb182"
|
||||
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182",
|
||||
"reference": "bae7c545bef187884426f042434e561ab1ddb182",
|
||||
"url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
|
||||
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1668,9 +1586,9 @@
|
||||
"description": "Library for handling version information and constraints",
|
||||
"support": {
|
||||
"issues": "https://github.com/phar-io/version/issues",
|
||||
"source": "https://github.com/phar-io/version/tree/3.1.0"
|
||||
"source": "https://github.com/phar-io/version/tree/3.2.1"
|
||||
},
|
||||
"time": "2021-02-23T14:00:09+00:00"
|
||||
"time": "2022-02-21T01:04:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
@ -1784,16 +1702,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||
"reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706"
|
||||
"reference": "77a32518733312af16a44300404e945338981de3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706",
|
||||
"reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
|
||||
"reference": "77a32518733312af16a44300404e945338981de3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1828,9 +1746,9 @@
|
||||
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
|
||||
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0"
|
||||
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
|
||||
},
|
||||
"time": "2022-01-04T19:58:01+00:00"
|
||||
"time": "2022-03-15T21:29:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
@ -1901,20 +1819,20 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.3.3",
|
||||
"version": "1.6.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "151a51f6149855785fbd883e79768c0abc96b75f"
|
||||
"reference": "d41c39cb2e487663bce9bbd97c660e244b73abad"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/151a51f6149855785fbd883e79768c0abc96b75f",
|
||||
"reference": "151a51f6149855785fbd883e79768c0abc96b75f",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d41c39cb2e487663bce9bbd97c660e244b73abad",
|
||||
"reference": "d41c39cb2e487663bce9bbd97c660e244b73abad",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1|^8.0"
|
||||
"php": "^7.2|^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan/phpstan-shim": "*"
|
||||
@ -1924,11 +1842,6 @@
|
||||
"phpstan.phar"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
@ -1941,7 +1854,7 @@
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||
"source": "https://github.com/phpstan/phpstan/tree/1.3.3"
|
||||
"source": "https://github.com/phpstan/phpstan/tree/1.6.7"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1961,25 +1874,25 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-07T09:49:03+00:00"
|
||||
"time": "2022-05-04T22:55:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-phpunit",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan-phpunit.git",
|
||||
"reference": "9eb88c9f689003a8a2a5ae9e010338ee94dc39b3"
|
||||
"reference": "4a3c437c09075736285d1cabb5c75bf27ed0bc84"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/9eb88c9f689003a8a2a5ae9e010338ee94dc39b3",
|
||||
"reference": "9eb88c9f689003a8a2a5ae9e010338ee94dc39b3",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4a3c437c09075736285d1cabb5c75bf27ed0bc84",
|
||||
"reference": "4a3c437c09075736285d1cabb5c75bf27ed0bc84",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0",
|
||||
"phpstan/phpstan": "^1.0"
|
||||
"php": "^7.2 || ^8.0",
|
||||
"phpstan/phpstan": "^1.5.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": "<7.0"
|
||||
@ -1992,9 +1905,6 @@
|
||||
},
|
||||
"type": "phpstan-extension",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
},
|
||||
"phpstan": {
|
||||
"includes": [
|
||||
"extension.neon",
|
||||
@ -2014,27 +1924,27 @@
|
||||
"description": "PHPUnit extensions and rules for PHPStan",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan-phpunit/issues",
|
||||
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.0.0"
|
||||
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.1.1"
|
||||
},
|
||||
"time": "2021-10-14T08:03:54+00:00"
|
||||
"time": "2022-04-20T15:24:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-strict-rules",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan-strict-rules.git",
|
||||
"reference": "e12d55f74a8cca18c6e684c6450767e055ba7717"
|
||||
"reference": "f3ca6464eae640a556c69a02b3b77a2507475d2f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/e12d55f74a8cca18c6e684c6450767e055ba7717",
|
||||
"reference": "e12d55f74a8cca18c6e684c6450767e055ba7717",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/f3ca6464eae640a556c69a02b3b77a2507475d2f",
|
||||
"reference": "f3ca6464eae640a556c69a02b3b77a2507475d2f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0",
|
||||
"phpstan/phpstan": "^1.2.0"
|
||||
"php": "^7.2 || ^8.0",
|
||||
"phpstan/phpstan": "^1.6.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"nikic/php-parser": "^4.13.0",
|
||||
@ -2044,9 +1954,6 @@
|
||||
},
|
||||
"type": "phpstan-extension",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
},
|
||||
"phpstan": {
|
||||
"includes": [
|
||||
"rules.neon"
|
||||
@ -2065,22 +1972,22 @@
|
||||
"description": "Extra strict and opinionated rules for PHPStan",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan-strict-rules/issues",
|
||||
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.1.0"
|
||||
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.2.1"
|
||||
},
|
||||
"time": "2021-11-18T09:30:29+00:00"
|
||||
"time": "2022-04-28T07:20:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "9.2.10",
|
||||
"version": "9.2.15",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "d5850aaf931743067f4bfc1ae4cbd06468400687"
|
||||
"reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d5850aaf931743067f4bfc1ae4cbd06468400687",
|
||||
"reference": "d5850aaf931743067f4bfc1ae4cbd06468400687",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
|
||||
"reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2136,7 +2043,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.10"
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2144,7 +2051,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-12-05T09:12:13+00:00"
|
||||
"time": "2022-03-07T09:28:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
@ -2389,16 +2296,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "9.5.12",
|
||||
"version": "9.5.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "93d4bf4c37aec6384bb9e5d390d9049a463a7256"
|
||||
"reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/93d4bf4c37aec6384bb9e5d390d9049a463a7256",
|
||||
"reference": "93d4bf4c37aec6384bb9e5d390d9049a463a7256",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba",
|
||||
"reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2414,7 +2321,7 @@
|
||||
"phar-io/version": "^3.0.2",
|
||||
"php": ">=7.3",
|
||||
"phpspec/prophecy": "^1.12.1",
|
||||
"phpunit/php-code-coverage": "^9.2.7",
|
||||
"phpunit/php-code-coverage": "^9.2.13",
|
||||
"phpunit/php-file-iterator": "^3.0.5",
|
||||
"phpunit/php-invoker": "^3.1.1",
|
||||
"phpunit/php-text-template": "^2.0.3",
|
||||
@ -2428,7 +2335,7 @@
|
||||
"sebastian/global-state": "^5.0.1",
|
||||
"sebastian/object-enumerator": "^4.0.3",
|
||||
"sebastian/resource-operations": "^3.0.3",
|
||||
"sebastian/type": "^2.3.4",
|
||||
"sebastian/type": "^3.0",
|
||||
"sebastian/version": "^3.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
@ -2449,11 +2356,11 @@
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
],
|
||||
"files": [
|
||||
"src/Framework/Assert/Functions.php"
|
||||
],
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
@ -2476,7 +2383,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.12"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2488,7 +2395,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-21T05:54:47+00:00"
|
||||
"time": "2022-04-01T12:37:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
@ -2856,16 +2763,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
"version": "5.1.3",
|
||||
"version": "5.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "388b6ced16caa751030f6a69e588299fa09200ac"
|
||||
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
|
||||
"reference": "388b6ced16caa751030f6a69e588299fa09200ac",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
|
||||
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2907,7 +2814,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/environment/issues",
|
||||
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
|
||||
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2915,7 +2822,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-09-28T05:52:38+00:00"
|
||||
"time": "2022-04-03T09:37:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
@ -2996,16 +2903,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
"version": "5.0.3",
|
||||
"version": "5.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||
"reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49"
|
||||
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49",
|
||||
"reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
|
||||
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3048,7 +2955,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/global-state/issues",
|
||||
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3"
|
||||
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -3056,7 +2963,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-11T13:31:12+00:00"
|
||||
"time": "2022-02-14T08:28:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/lines-of-code",
|
||||
@ -3347,28 +3254,28 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/type",
|
||||
"version": "2.3.4",
|
||||
"version": "3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/type.git",
|
||||
"reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914"
|
||||
"reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914",
|
||||
"reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
|
||||
"reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.3"
|
||||
"phpunit/phpunit": "^9.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -3391,7 +3298,7 @@
|
||||
"homepage": "https://github.com/sebastianbergmann/type",
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/type/issues",
|
||||
"source": "https://github.com/sebastianbergmann/type/tree/2.3.4"
|
||||
"source": "https://github.com/sebastianbergmann/type/tree/3.0.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -3399,7 +3306,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-15T12:49:02+00:00"
|
||||
"time": "2022-03-15T09:54:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
@ -3542,5 +3449,5 @@
|
||||
"platform-overrides": {
|
||||
"php": "8.0.0"
|
||||
},
|
||||
"plugin-api-version": "2.2.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.8.15
|
||||
# Doxyfile 1.9.3
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
@ -93,14 +93,6 @@ ALLOW_UNICODE_NAMES = NO
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all generated output in the proper direction.
|
||||
# Possible values are: None, LTR, RTL and Context.
|
||||
# The default value is: None.
|
||||
|
||||
OUTPUT_TEXT_DIRECTION = None
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
# documentation (similar to Javadoc). Set to NO to disable this.
|
||||
@ -197,6 +189,16 @@ SHORT_NAMES = NO
|
||||
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
|
||||
# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
|
||||
# such as
|
||||
# /***************
|
||||
# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
|
||||
# Javadoc-style will behave just like regular comments and it will not be
|
||||
# interpreted by doxygen.
|
||||
# The default value is: NO.
|
||||
|
||||
JAVADOC_BANNER = NO
|
||||
|
||||
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
|
||||
# line (until the first dot) of a Qt-style comment as the brief description. If
|
||||
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
|
||||
@ -217,6 +219,14 @@ QT_AUTOBRIEF = NO
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# By default Python docstrings are displayed as preformatted text and doxygen's
|
||||
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
|
||||
# doxygen's special commands can be used and the contents of the docstring
|
||||
# documentation blocks is shown as doxygen documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
PYTHON_DOCSTRING = YES
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
|
||||
# documentation from any documented member that it re-implements.
|
||||
# The default value is: YES.
|
||||
@ -240,25 +250,19 @@ TAB_SIZE = 4
|
||||
# the documentation. An alias has the form:
|
||||
# name=value
|
||||
# For example adding
|
||||
# "sideeffect=@par Side Effects:\n"
|
||||
# "sideeffect=@par Side Effects:^^"
|
||||
# will allow you to put the command \sideeffect (or @sideeffect) in the
|
||||
# documentation, which will result in a user-defined paragraph with heading
|
||||
# "Side Effects:". You can put \n's in the value part of an alias to insert
|
||||
# newlines (in the resulting output). You can put ^^ in the value part of an
|
||||
# alias to insert a newline as if a physical newline was in the original file.
|
||||
# When you need a literal { or } or , in the value part of an alias you have to
|
||||
# escape them by means of a backslash (\), this can lead to conflicts with the
|
||||
# commands \{ and \} for these it is advised to use the version @{ and @} or use
|
||||
# a double escape (\\{ and \\})
|
||||
# "Side Effects:". Note that you cannot put \n's in the value part of an alias
|
||||
# to insert newlines (in the resulting output). You can put ^^ in the value part
|
||||
# of an alias to insert a newline as if a physical newline was in the original
|
||||
# file. When you need a literal { or } or , in the value part of an alias you
|
||||
# have to escape them by means of a backslash (\), this can lead to conflicts
|
||||
# with the commands \{ and \} for these it is advised to use the version @{ and
|
||||
# @} or use a double escape (\\{ and \\})
|
||||
|
||||
ALIASES =
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
# will allow you to use the command class in the itcl::class meaning.
|
||||
|
||||
TCL_SUBST =
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C. For
|
||||
# instance, some of the names that are used will be different. The list of all
|
||||
@ -299,19 +303,22 @@ OPTIMIZE_OUTPUT_SLICE = NO
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
|
||||
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
|
||||
# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice,
|
||||
# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
|
||||
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
|
||||
# tries to guess whether the code is fixed or free formatted code, this is the
|
||||
# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
|
||||
# .inc files as Fortran files (default is PHP), and .f files as C (default is
|
||||
# Fortran), use: inc=Fortran f=C.
|
||||
# default for Fortran type files). For instance to make doxygen treat .inc files
|
||||
# as Fortran files (default is PHP), and .f files as C (default is Fortran),
|
||||
# use: inc=Fortran f=C.
|
||||
#
|
||||
# Note: For files without extension you can use no_extension as a placeholder.
|
||||
#
|
||||
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
|
||||
# the files are not read by doxygen.
|
||||
# the files are not read by doxygen. When specifying no_extension you should add
|
||||
# * to the FILE_PATTERNS.
|
||||
#
|
||||
# Note see also the list of default file extension mappings.
|
||||
|
||||
EXTENSION_MAPPING =
|
||||
|
||||
@ -329,7 +336,7 @@ MARKDOWN_SUPPORT = YES
|
||||
# to that level are automatically included in the table of contents, even if
|
||||
# they do not have an id attribute.
|
||||
# Note: This feature currently applies only to Markdown headings.
|
||||
# Minimum value: 0, maximum value: 99, default value: 0.
|
||||
# Minimum value: 0, maximum value: 99, default value: 5.
|
||||
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
|
||||
|
||||
TOC_INCLUDE_HEADINGS = 0
|
||||
@ -445,6 +452,19 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use
|
||||
# during processing. When set to 0 doxygen will based this on the number of
|
||||
# cores available in the system. You can set it explicitly to a value larger
|
||||
# than 0 to get more control over the balance between CPU load and processing
|
||||
# speed. At this moment only the input processing can be done using multiple
|
||||
# threads. Since this is still an experimental feature the default is set to 1,
|
||||
# which effectively disables parallel processing. Please report any issues you
|
||||
# encounter. Generating dot graphs in parallel is controlled by the
|
||||
# DOT_NUM_THREADS setting.
|
||||
# Minimum value: 0, maximum value: 32, default value: 1.
|
||||
|
||||
NUM_PROC_THREADS = 1
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
@ -465,6 +485,12 @@ EXTRACT_ALL = NO
|
||||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
|
||||
# methods of a class will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIV_VIRTUAL = NO
|
||||
|
||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||
# scope will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
@ -502,6 +528,13 @@ EXTRACT_LOCAL_METHODS = YES
|
||||
|
||||
EXTRACT_ANON_NSPACES = YES
|
||||
|
||||
# If this flag is set to YES, the name of an unnamed parameter in a declaration
|
||||
# will be determined by the corresponding definition. By default unnamed
|
||||
# parameters remain unnamed in the output.
|
||||
# The default value is: YES.
|
||||
|
||||
RESOLVE_UNNAMED_PARAMS = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
|
||||
# undocumented members inside documented classes or files. If set to NO these
|
||||
# members will be included in the various overviews, but no documentation
|
||||
@ -519,8 +552,8 @@ HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
|
||||
# (class|struct|union) declarations. If set to NO, these declarations will be
|
||||
# included in the documentation.
|
||||
# declarations. If set to NO, these declarations will be included in the
|
||||
# documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
@ -539,11 +572,18 @@ HIDE_IN_BODY_DOCS = YES
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
|
||||
# able to match the capabilities of the underlying filesystem. In case the
|
||||
# filesystem is case sensitive (i.e. it supports files in the same directory
|
||||
# whose names only differ in casing), the option must be set to YES to properly
|
||||
# deal with such files in case they appear in the input. For filesystems that
|
||||
# are not case sensitive the option should be be set to NO to properly deal with
|
||||
# output files written for symbols that only differ in casing, such as for two
|
||||
# classes, one named CLASS and the other named Class, and to also support
|
||||
# references to files without having to specify the exact matching casing. On
|
||||
# Windows (including Cygwin) and MacOS, users should typically set this option
|
||||
# to NO, whereas on Linux or other Unix flavors it should typically be set to
|
||||
# YES.
|
||||
# The default value is: system dependent.
|
||||
|
||||
CASE_SENSE_NAMES = NO
|
||||
@ -562,6 +602,12 @@ HIDE_SCOPE_NAMES = NO
|
||||
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
|
||||
# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class
|
||||
# will show which file needs to be included to use the class.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_HEADERFILE = YES
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
|
||||
# the files that are included by a file in the documentation of that file.
|
||||
# The default value is: YES.
|
||||
@ -719,7 +765,8 @@ FILE_VERSION_FILTER =
|
||||
# output files in an output format independent way. To create the layout file
|
||||
# that represents doxygen's defaults, run doxygen with the -l option. You can
|
||||
# optionally specify a file name after the option, if omitted DoxygenLayout.xml
|
||||
# will be used as the name of the layout file.
|
||||
# will be used as the name of the layout file. See also section "Changing the
|
||||
# layout of pages" for information.
|
||||
#
|
||||
# Note that if you run doxygen from a directory containing a file called
|
||||
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
|
||||
@ -765,24 +812,35 @@ WARNINGS = NO
|
||||
WARN_IF_UNDOCUMENTED = NO
|
||||
|
||||
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
|
||||
# potential errors in the documentation, such as not documenting some parameters
|
||||
# in a documented function, or documenting parameters that don't exist or using
|
||||
# markup commands wrongly.
|
||||
# potential errors in the documentation, such as documenting some parameters in
|
||||
# a documented function twice, or documenting parameters that don't exist or
|
||||
# using markup commands wrongly.
|
||||
# The default value is: YES.
|
||||
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
|
||||
# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete
|
||||
# function parameter documentation. If set to NO, doxygen will accept that some
|
||||
# parameters have no documentation without warning.
|
||||
# The default value is: YES.
|
||||
|
||||
WARN_IF_INCOMPLETE_DOC = YES
|
||||
|
||||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO, doxygen will only warn about wrong or incomplete
|
||||
# parameter documentation, but not about the absence of documentation. If
|
||||
# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
|
||||
# value. If set to NO, doxygen will only warn about wrong parameter
|
||||
# documentation, but not about the absence of documentation. If EXTRACT_ALL is
|
||||
# set to YES then this flag will automatically be disabled. See also
|
||||
# WARN_IF_INCOMPLETE_DOC
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_NO_PARAMDOC = NO
|
||||
|
||||
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
|
||||
# a warning is encountered.
|
||||
# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
|
||||
# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
|
||||
# at the end of the doxygen process doxygen will return with a non-zero status.
|
||||
# Possible values are: NO, YES and FAIL_ON_WARNINGS.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_AS_ERROR = NO
|
||||
@ -799,7 +857,10 @@ WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning and error
|
||||
# messages should be written. If left blank the output is written to standard
|
||||
# error (stderr).
|
||||
# error (stderr). In case the file specified cannot be opened for writing the
|
||||
# warning and error messages are written to standard error. When as file - is
|
||||
# specified the warning and error messages are written to standard output
|
||||
# (stdout).
|
||||
|
||||
WARN_LOGFILE =
|
||||
|
||||
@ -820,8 +881,8 @@ INPUT = ../src \
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
|
||||
# possible encodings.
|
||||
# documentation (see:
|
||||
# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
@ -834,11 +895,15 @@ INPUT_ENCODING = UTF-8
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# read by doxygen.
|
||||
#
|
||||
# Note the list of default checked file patterns might differ from the list of
|
||||
# default file extension mappings.
|
||||
#
|
||||
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
|
||||
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
|
||||
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml,
|
||||
# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C
|
||||
# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
|
||||
# *.vhdl, *.ucf, *.qsf and *.ice.
|
||||
|
||||
FILE_PATTERNS = *.php
|
||||
|
||||
@ -883,7 +948,7 @@ EXCLUDE_PATTERNS = */bin/* \
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
# output. The symbol name can be a fully qualified name, a word, or if the
|
||||
# wildcard * is used, a substring. Examples: ANamespace, AClass,
|
||||
# AClass::ANamespace, ANamespace::*Test
|
||||
# ANamespace::AClass, ANamespace::*Test
|
||||
#
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories use the pattern */test/*
|
||||
@ -1059,16 +1124,24 @@ USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
|
||||
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
|
||||
# cost of reduced performance. This can be particularly helpful with template
|
||||
# rich C++ code for which doxygen's built-in parser lacks the necessary type
|
||||
# information.
|
||||
# clang parser (see:
|
||||
# http://clang.llvm.org/) for more accurate parsing at the cost of reduced
|
||||
# performance. This can be particularly helpful with template rich C++ code for
|
||||
# which doxygen's built-in parser lacks the necessary type information.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
# The default value is: NO.
|
||||
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS
|
||||
# tag is set to YES then doxygen will add the directory of each input to the
|
||||
# include path.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
|
||||
|
||||
CLANG_ADD_INC_PATHS = YES
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the compiler with command
|
||||
# line options that you would normally use when invoking the compiler. Note that
|
||||
# the include paths will already be set by doxygen for the files and directories
|
||||
@ -1078,10 +1151,13 @@ CLANG_ASSISTED_PARSING = NO
|
||||
CLANG_OPTIONS =
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the clang parser with the
|
||||
# path to the compilation database (see:
|
||||
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
|
||||
# were built. This is equivalent to specifying the "-p" option to a clang tool,
|
||||
# such as clang-check. These options will then be passed to the parser.
|
||||
# path to the directory containing a file called compile_commands.json. This
|
||||
# file is the compilation database (see:
|
||||
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
|
||||
# options used when the source files were built. This is equivalent to
|
||||
# specifying the -p option to a clang tool, such as clang-check. These options
|
||||
# will then be passed to the parser. Any options specified with CLANG_OPTIONS
|
||||
# will be added as well.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
|
||||
@ -1098,13 +1174,6 @@ CLANG_DATABASE_PATH =
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
|
||||
# which the alphabetical index list will be split.
|
||||
# Minimum value: 1, maximum value: 20, default value: 5.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all classes will
|
||||
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
|
||||
# can be used to specify a prefix (or a list of prefixes) that should be ignored
|
||||
@ -1204,7 +1273,7 @@ HTML_EXTRA_FILES =
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
# this color. Hue is specified as an angle on a colorwheel, see
|
||||
# this color. Hue is specified as an angle on a color-wheel, see
|
||||
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
|
||||
# purple, and 360 is red again.
|
||||
@ -1214,7 +1283,7 @@ HTML_EXTRA_FILES =
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
|
||||
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
|
||||
# in the HTML output. For a value of 0 the output will use grayscales only. A
|
||||
# in the HTML output. For a value of 0 the output will use gray-scales only. A
|
||||
# value of 255 will produce the most vivid colors.
|
||||
# Minimum value: 0, maximum value: 255, default value: 100.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
@ -1239,13 +1308,13 @@ HTML_COLORSTYLE_GAMMA = 80
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_TIMESTAMP = YES
|
||||
HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
|
||||
# documentation will contain a main index with vertical navigation menus that
|
||||
# are dynamically created via Javascript. If disabled, the navigation index will
|
||||
# are dynamically created via JavaScript. If disabled, the navigation index will
|
||||
# consists of multiple levels of tabs that are statically embedded in every HTML
|
||||
# page. Disable this option to support browsers that do not have Javascript,
|
||||
# page. Disable this option to support browsers that do not have JavaScript,
|
||||
# like the Qt help browser.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
@ -1275,10 +1344,11 @@ HTML_INDEX_NUM_ENTRIES = 100
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see: https://developer.apple.com/xcode/), introduced with OSX
|
||||
# 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# environment (see:
|
||||
# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
|
||||
# create a documentation set, doxygen will generate a Makefile in the HTML
|
||||
# output directory. Running make will produce the docset in that directory and
|
||||
# running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
|
||||
# genXcode/_index.html for more information.
|
||||
@ -1295,6 +1365,13 @@ GENERATE_DOCSET = NO
|
||||
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
|
||||
# This tag determines the URL of the docset feed. A documentation feed provides
|
||||
# an umbrella under which multiple documentation sets from a single provider
|
||||
# (such as a company or product suite) can be grouped.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_FEEDURL =
|
||||
|
||||
# This tag specifies a string that should uniquely identify the documentation
|
||||
# set bundle. This should be a reverse domain-name style string, e.g.
|
||||
# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
|
||||
@ -1320,8 +1397,12 @@ DOCSET_PUBLISHER_NAME = Publisher
|
||||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
# on Windows. In the beginning of 2021 Microsoft took the original page, with
|
||||
# a.o. the download links, offline the HTML help workshop was already many years
|
||||
# in maintenance mode). You can download the HTML help workshop from the web
|
||||
# archives at Installation executable (see:
|
||||
# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo
|
||||
# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe).
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
|
||||
@ -1351,7 +1432,7 @@ CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
|
||||
# The GENERATE_CHI flag controls if a separate .chi index file is generated
|
||||
# (YES) or that it should be included in the master .chm file (NO).
|
||||
# (YES) or that it should be included in the main .chm file (NO).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
@ -1396,7 +1477,8 @@ QCH_FILE =
|
||||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
# (see: http://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
|
||||
# (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
@ -1404,8 +1486,8 @@ QHP_NAMESPACE = org.doxygen.Project
|
||||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
# Folders (see: http://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-
|
||||
# folders).
|
||||
# Folders (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
@ -1413,30 +1495,30 @@ QHP_VIRTUAL_FOLDER = doc
|
||||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# Filters (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_NAME =
|
||||
|
||||
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# Filters (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||
# http://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
|
||||
# The QHG_LOCATION tag can be used to specify the location of Qt's
|
||||
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
|
||||
# generated .qhp file.
|
||||
# The QHG_LOCATION tag can be used to specify the location (absolute path
|
||||
# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
|
||||
# run qhelpgenerator on the generated .qhp file.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHG_LOCATION =
|
||||
@ -1479,16 +1561,28 @@ DISABLE_INDEX = NO
|
||||
# to work a browser that supports JavaScript, DHTML, CSS and frames is required
|
||||
# (i.e. any modern browser). Windows users are probably better off using the
|
||||
# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
|
||||
# further fine-tune the look of the index. As an example, the default style
|
||||
# sheet generated by doxygen has an example that shows how to put an image at
|
||||
# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
|
||||
# the same information as the tab index, you could consider setting
|
||||
# DISABLE_INDEX to YES when enabling this option.
|
||||
# further fine tune the look of the index (see "Fine-tuning the output"). As an
|
||||
# example, the default style sheet generated by doxygen has an example that
|
||||
# shows how to put an image at the root of the tree instead of the PROJECT_NAME.
|
||||
# Since the tree basically has the same information as the tab index, you could
|
||||
# consider setting DISABLE_INDEX to YES when enabling this option.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_TREEVIEW = YES
|
||||
|
||||
# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
|
||||
# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
|
||||
# area (value NO) or if it should extend to the full height of the window (value
|
||||
# YES). Setting this to YES gives a layout similar to
|
||||
# https://docs.readthedocs.io with more room for contents, but less room for the
|
||||
# project logo, title, and description. If either GENERATE_TREEVIEW or
|
||||
# DISABLE_INDEX is set to NO, this option has no effect.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
FULL_SIDEBAR = NO
|
||||
|
||||
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
|
||||
# doxygen will group on one line in the generated HTML documentation.
|
||||
#
|
||||
@ -1513,6 +1607,24 @@ TREEVIEW_WIDTH = 250
|
||||
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
|
||||
# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email
|
||||
# addresses.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
OBFUSCATE_EMAILS = YES
|
||||
|
||||
# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
|
||||
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
|
||||
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
|
||||
# the HTML output. These images will generally look nicer at scaled resolutions.
|
||||
# Possible values are: png (the default) and svg (looks nicer but requires the
|
||||
# pdf2svg or inkscape tool).
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FORMULA_FORMAT = png
|
||||
|
||||
# Use this tag to change the font size of LaTeX formulas included as images in
|
||||
# the HTML documentation. When you change the font size after a successful
|
||||
# doxygen run you need to manually remove any form_*.png images from the HTML
|
||||
@ -1533,8 +1645,14 @@ FORMULA_FONTSIZE = 10
|
||||
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
|
||||
# to create new LaTeX commands to be used in formulas as building blocks. See
|
||||
# the section "Including formulas" for details.
|
||||
|
||||
FORMULA_MACROFILE =
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# https://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# https://www.mathjax.org) which uses client side JavaScript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
@ -1544,11 +1662,29 @@ FORMULA_TRANSPARENT = YES
|
||||
|
||||
USE_MATHJAX = YES
|
||||
|
||||
# With MATHJAX_VERSION it is possible to specify the MathJax version to be used.
|
||||
# Note that the different versions of MathJax have different requirements with
|
||||
# regards to the different settings, so it is possible that also other MathJax
|
||||
# settings have to be changed when switching between the different MathJax
|
||||
# versions.
|
||||
# Possible values are: MathJax_2 and MathJax_3.
|
||||
# The default value is: MathJax_2.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_VERSION = MathJax_2
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
# http://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# the MathJax output. For more details about the output format see MathJax
|
||||
# version 2 (see:
|
||||
# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3
|
||||
# (see:
|
||||
# http://docs.mathjax.org/en/latest/web/components/output.html).
|
||||
# Possible values are: HTML-CSS (which is slower, but has the best
|
||||
# compatibility), NativeMML (i.e. MathML) and SVG.
|
||||
# compatibility. This is the name for Mathjax version 2, for MathJax version 3
|
||||
# this will be translated into chtml), NativeMML (i.e. MathML. Only supported
|
||||
# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This
|
||||
# is the name for Mathjax version 3, for MathJax version 2 this will be
|
||||
# translated into HTML-CSS) and SVG.
|
||||
# The default value is: HTML-CSS.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
@ -1561,22 +1697,29 @@ MATHJAX_FORMAT = HTML-CSS
|
||||
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from https://www.mathjax.org before deployment.
|
||||
# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
|
||||
# MathJax from https://www.mathjax.org before deployment. The default value is:
|
||||
# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2
|
||||
# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
|
||||
# extension names that should be enabled during MathJax rendering. For example
|
||||
# for MathJax version 2 (see
|
||||
# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions):
|
||||
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
|
||||
# For example for MathJax version 3 (see
|
||||
# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html):
|
||||
# MATHJAX_EXTENSIONS = ams
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_EXTENSIONS =
|
||||
|
||||
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
|
||||
# of code that will be used on startup of the MathJax code. See the MathJax site
|
||||
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# (see:
|
||||
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
|
||||
# example see the documentation.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
@ -1604,7 +1747,7 @@ MATHJAX_CODEFILE =
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a web server instead of a web client using Javascript. There
|
||||
# implemented using a web server instead of a web client using JavaScript. There
|
||||
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
|
||||
# setting. When disabled, doxygen will generate a PHP script for searching and
|
||||
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
|
||||
@ -1623,7 +1766,8 @@ SERVER_BASED_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: https://xapian.org/).
|
||||
# Xapian (see:
|
||||
# https://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
@ -1636,8 +1780,9 @@ EXTERNAL_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: https://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# Xapian (see:
|
||||
# https://xapian.org/). See the section "External Indexing and Searching" for
|
||||
# details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SEARCHENGINE_URL =
|
||||
@ -1708,10 +1853,11 @@ LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
|
||||
# generate index for LaTeX.
|
||||
# generate index for LaTeX. In case there is no backslash (\) as first character
|
||||
# it will be automatically added in the LaTeX code.
|
||||
# Note: This tag is used in the generated output file (.tex).
|
||||
# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
|
||||
# The default value is: \makeindex.
|
||||
# The default value is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_MAKEINDEX_CMD = \makeindex
|
||||
@ -1745,29 +1891,31 @@ PAPER_TYPE = a4
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
|
||||
# generated LaTeX document. The header should contain everything until the first
|
||||
# chapter. If it is left blank doxygen will generate a standard header. See
|
||||
# section "Doxygen usage" for information on how to let doxygen write the
|
||||
# default header to a separate file.
|
||||
# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for
|
||||
# the generated LaTeX document. The header should contain everything until the
|
||||
# first chapter. If it is left blank doxygen will generate a standard header. It
|
||||
# is highly recommended to start with a default header using
|
||||
# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty
|
||||
# and then modify the file new_header.tex. See also section "Doxygen usage" for
|
||||
# information on how to generate the default header that doxygen normally uses.
|
||||
#
|
||||
# Note: Only use a user-defined header if you know what you are doing! The
|
||||
# following commands have a special meaning inside the header: $title,
|
||||
# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
|
||||
# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
|
||||
# string, for the replacement values of the other commands the user is referred
|
||||
# to HTML_HEADER.
|
||||
# Note: Only use a user-defined header if you know what you are doing!
|
||||
# Note: The header is subject to change so you typically have to regenerate the
|
||||
# default header when upgrading to a newer version of doxygen. The following
|
||||
# commands have a special meaning inside the header (and footer): For a
|
||||
# description of the possible markers and block names see the documentation.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
|
||||
# generated LaTeX document. The footer should contain everything after the last
|
||||
# chapter. If it is left blank doxygen will generate a standard footer. See
|
||||
# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for
|
||||
# the generated LaTeX document. The footer should contain everything after the
|
||||
# last chapter. If it is left blank doxygen will generate a standard footer. See
|
||||
# LATEX_HEADER for more information on how to generate a default footer and what
|
||||
# special commands can be used inside the footer.
|
||||
#
|
||||
# Note: Only use a user-defined footer if you know what you are doing!
|
||||
# special commands can be used inside the footer. See also section "Doxygen
|
||||
# usage" for information on how to generate the default footer that doxygen
|
||||
# normally uses. Note: Only use a user-defined footer if you know what you are
|
||||
# doing!
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_FOOTER =
|
||||
@ -1800,9 +1948,11 @@ LATEX_EXTRA_FILES =
|
||||
|
||||
PDF_HYPERLINKS = YES
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
|
||||
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
|
||||
# higher quality PDF documentation.
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
|
||||
# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
|
||||
# files. Set this option to YES, to get a higher quality PDF documentation.
|
||||
#
|
||||
# See also section LATEX_CMD_NAME for selecting the engine.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
@ -1810,8 +1960,7 @@ USE_PDFLATEX = YES
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep running
|
||||
# if errors occur, instead of asking the user for help. This option is also used
|
||||
# when generating formulas in HTML.
|
||||
# if errors occur, instead of asking the user for help.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
@ -1824,16 +1973,6 @@ LATEX_BATCHMODE = NO
|
||||
|
||||
LATEX_HIDE_INDICES = NO
|
||||
|
||||
# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
|
||||
# code with syntax highlighting in the LaTeX output.
|
||||
#
|
||||
# Note that which sources are shown also depends on other settings such as
|
||||
# SOURCE_BROWSER.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_SOURCE_CODE = NO
|
||||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
@ -1914,16 +2053,6 @@ RTF_STYLESHEET_FILE =
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
|
||||
# with syntax highlighting in the RTF output.
|
||||
#
|
||||
# Note that which sources are shown also depends on other settings such as
|
||||
# SOURCE_BROWSER.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_SOURCE_CODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
@ -2020,15 +2149,6 @@ GENERATE_DOCBOOK = NO
|
||||
|
||||
DOCBOOK_OUTPUT = docbook
|
||||
|
||||
# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
|
||||
# program listings (including syntax highlighting and cross-referencing
|
||||
# information) to the DOCBOOK output. Note that enabling this will significantly
|
||||
# increase the size of the DOCBOOK output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
|
||||
|
||||
DOCBOOK_PROGRAMLISTING = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
@ -2203,34 +2323,10 @@ EXTERNAL_GROUPS = YES
|
||||
|
||||
EXTERNAL_PAGES = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of 'which perl').
|
||||
# The default file (with absolute path) is: /usr/bin/perl.
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
|
||||
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
|
||||
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
|
||||
# disabled, but it is recommended to install and use dot, since it yields more
|
||||
# powerful graphs.
|
||||
# The default value is: YES.
|
||||
|
||||
CLASS_DIAGRAMS = NO
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see:
|
||||
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
|
||||
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
|
||||
@ -2287,11 +2383,14 @@ DOT_FONTSIZE = 10
|
||||
|
||||
DOT_FONTPATH =
|
||||
|
||||
# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
|
||||
# each documented class showing the direct and indirect inheritance relations.
|
||||
# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
|
||||
# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a
|
||||
# graph for each documented class showing the direct and indirect inheritance
|
||||
# relations. In case HAVE_DOT is set as well dot will be used to draw the graph,
|
||||
# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set
|
||||
# to TEXT the direct and indirect inheritance relations will be shown as texts /
|
||||
# links.
|
||||
# Possible values are: NO, YES, TEXT and GRAPH.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CLASS_GRAPH = YES
|
||||
|
||||
@ -2328,10 +2427,32 @@ UML_LOOK = YES
|
||||
# but if the number exceeds 15, the total amount of fields shown is limited to
|
||||
# 10.
|
||||
# Minimum value: 0, maximum value: 100, default value: 10.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
# This tag requires that the tag UML_LOOK is set to YES.
|
||||
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
|
||||
# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
|
||||
# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
|
||||
# tag is set to YES, doxygen will add type and arguments for attributes and
|
||||
# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
|
||||
# will not generate fields with class member information in the UML graphs. The
|
||||
# class diagrams will look similar to the default class diagrams but using UML
|
||||
# notation for the relationships.
|
||||
# Possible values are: NO, YES and NONE.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag UML_LOOK is set to YES.
|
||||
|
||||
DOT_UML_DETAILS = NO
|
||||
|
||||
# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
|
||||
# to display on a single line. If the actual line length exceeds this threshold
|
||||
# significantly it will wrapped across multiple lines. Some heuristics are apply
|
||||
# to avoid ugly line breaks.
|
||||
# Minimum value: 0, maximum value: 1000, default value: 17.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_WRAP_THRESHOLD = 17
|
||||
|
||||
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
|
||||
# collaboration graphs will show the relations between templates and their
|
||||
# instances.
|
||||
@ -2398,6 +2519,13 @@ GRAPHICAL_HIERARCHY = YES
|
||||
|
||||
DIRECTORY_GRAPH = YES
|
||||
|
||||
# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels
|
||||
# of child directories generated in directory dependency graphs by dot.
|
||||
# Minimum value: 1, maximum value: 25, default value: 1.
|
||||
# This tag requires that the tag DIRECTORY_GRAPH is set to YES.
|
||||
|
||||
DIR_GRAPH_MAX_DEPTH = 1
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot. For an explanation of the image formats see the section
|
||||
# output formats in the documentation of the dot tool (Graphviz (see:
|
||||
@ -2451,10 +2579,10 @@ MSCFILE_DIRS =
|
||||
DIAFILE_DIRS =
|
||||
|
||||
# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
|
||||
# path where java can find the plantuml.jar file. If left blank, it is assumed
|
||||
# PlantUML is not used or called during a preprocessing step. Doxygen will
|
||||
# generate a warning when it encounters a \startuml command in this case and
|
||||
# will not generate output for the diagram.
|
||||
# path where java can find the plantuml.jar file or to the filename of jar file
|
||||
# to be used. If left blank, it is assumed PlantUML is not used or called during
|
||||
# a preprocessing step. Doxygen will generate a warning when it encounters a
|
||||
# \startuml command in this case and will not generate output for the diagram.
|
||||
|
||||
PLANTUML_JAR_PATH =
|
||||
|
||||
@ -2516,14 +2644,18 @@ DOT_MULTI_TARGETS = YES
|
||||
# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
|
||||
# explaining the meaning of the various boxes and arrows in the dot generated
|
||||
# graphs.
|
||||
# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal
|
||||
# graphical representation for inheritance and collaboration diagrams is used.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
|
||||
# files that are used to generate the various graphs.
|
||||
#
|
||||
# Note: This setting is not only used for dot files but also for msc temporary
|
||||
# files.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
|
@ -173,10 +173,37 @@ console:
|
||||
title-tick: true
|
||||
|
||||
aliases:
|
||||
#Examples:
|
||||
#showtheversion: version
|
||||
##This section allows you to add, remove or remap command aliases.
|
||||
##A single alias can call one or more other commands (or aliases).
|
||||
##Aliases defined here will override any command aliases declared by plugins or PocketMine-MP itself.
|
||||
|
||||
##To remove an alias, set it to [], like so (note that prefixed aliases like "pocketmine:stop" will remain and can't
|
||||
##be removed):
|
||||
#stop: []
|
||||
|
||||
##Commands are not removed, only their aliases. You can still refer to a command using its full (prefixed)
|
||||
##name, even if all its aliases are overwritten. The full name is usually something like "pocketmine:commandname" or
|
||||
##"pluginname:commandname".
|
||||
#abort: [pocketmine:stop]
|
||||
|
||||
##To add an alias, list the command(s) that it calls:
|
||||
#showtheversion: [version]
|
||||
#savestop: [save-all, stop]
|
||||
|
||||
##To invoke another command with arguments, use $1 to pass the first argument, $2 for the second etc:
|
||||
#giveadmin: [op $1] ## `giveadmin alex` -> `op alex`
|
||||
#kill: [suicide, say "I tried to kill $1"] ## `kill alex` -> `suicide` + `say "I tried to kill alex"`
|
||||
#giverandom: [give $1 $2, say "Someone has just received a $2!"] ## `giverandom alex diamond` -> `give alex diamond` + `say "Someone has just received a diamond!"`
|
||||
|
||||
##To make arguments mandatory (so that the command fails if they are not provided), use $$, e.g. $$1, $$2:
|
||||
#makeadmin: [op $$1] ## `makeadmin alex` -> `op alex`, `makeadmin` with no arguments = error
|
||||
|
||||
##To pass through a range of arguments, put a - (hyphen) after the index:
|
||||
#tpalias: [tp $1-] ## `tpalias 256 70 256` -> `tp 256 70 256` - this passes arguments 1 and everything after it to the `tp` command
|
||||
|
||||
##To change an existing command alias and make it do something else:
|
||||
#tp: [suicide]
|
||||
|
||||
worlds:
|
||||
#These settings will override the generator set in server.properties and allows loading multiple worlds
|
||||
#Example:
|
||||
|
@ -508,8 +508,13 @@ class MemoryManager{
|
||||
return "(error) ARRAY RECURSION LIMIT REACHED";
|
||||
}
|
||||
$data = [];
|
||||
$numeric = 0;
|
||||
foreach($from as $key => $value){
|
||||
$data[$key] = self::continueDump($value, $objects, $refCounts, $recursion + 1, $maxNesting, $maxStringSize);
|
||||
$data[$numeric] = [
|
||||
"k" => self::continueDump($key, $objects, $refCounts, $recursion + 1, $maxNesting, $maxStringSize),
|
||||
"v" => self::continueDump($value, $objects, $refCounts, $recursion + 1, $maxNesting, $maxStringSize),
|
||||
];
|
||||
$numeric++;
|
||||
}
|
||||
}elseif(is_string($from)){
|
||||
$data = "(string) len(" . strlen($from) . ") " . substr(Utils::printable($from), 0, $maxStringSize);
|
||||
|
@ -132,6 +132,7 @@ use function get_class;
|
||||
use function ini_set;
|
||||
use function is_array;
|
||||
use function is_dir;
|
||||
use function is_object;
|
||||
use function is_resource;
|
||||
use function is_string;
|
||||
use function json_decode;
|
||||
@ -1606,7 +1607,7 @@ class Server{
|
||||
"reportPaste" => base64_encode($dump->getEncodedData())
|
||||
], 10, [], $postUrlError);
|
||||
|
||||
if($reply !== null && ($data = json_decode($reply->getBody())) !== null){
|
||||
if($reply !== null && is_object($data = json_decode($reply->getBody()))){
|
||||
if(isset($data->crashId) && isset($data->crashUrl)){
|
||||
$reportId = $data->crashId;
|
||||
$reportUrl = $data->crashUrl;
|
||||
|
@ -31,9 +31,9 @@ use function str_repeat;
|
||||
|
||||
final class VersionInfo{
|
||||
public const NAME = "PocketMine-MP";
|
||||
public const BASE_VERSION = "4.1.0-BETA1";
|
||||
public const BASE_VERSION = "4.3.2";
|
||||
public const IS_DEVELOPMENT_BUILD = false;
|
||||
public const BUILD_CHANNEL = "beta";
|
||||
public const BUILD_CHANNEL = "stable";
|
||||
|
||||
private function __construct(){
|
||||
//NOOP
|
||||
|
@ -36,14 +36,14 @@ final class BambooSapling extends Flowable{
|
||||
private bool $ready = false;
|
||||
|
||||
public function readStateFromData(int $id, int $stateMeta) : void{
|
||||
$this->ready = ($stateMeta & BlockLegacyMetadata::SAPLING_FLAG_READY) !== 0;
|
||||
$this->ready = ($stateMeta & BlockLegacyMetadata::BAMBOO_SAPLING_FLAG_READY) !== 0;
|
||||
}
|
||||
|
||||
protected function writeStateToMeta() : int{
|
||||
return $this->ready ? BlockLegacyMetadata::SAPLING_FLAG_READY : 0;
|
||||
return $this->ready ? BlockLegacyMetadata::BAMBOO_SAPLING_FLAG_READY : 0;
|
||||
}
|
||||
|
||||
public function getStateBitmask() : int{ return 0b1000; }
|
||||
public function getStateBitmask() : int{ return 0b1; }
|
||||
|
||||
public function isReady() : bool{ return $this->ready; }
|
||||
|
||||
|
@ -166,7 +166,7 @@ class Bed extends Transparent{
|
||||
}
|
||||
|
||||
public function onNearbyBlockChange() : void{
|
||||
if(($other = $this->getOtherHalf()) !== null && $other->occupied !== $this->occupied){
|
||||
if(!$this->head && ($other = $this->getOtherHalf()) !== null && $other->occupied !== $this->occupied){
|
||||
$this->occupied = $other->occupied;
|
||||
$this->position->getWorld()->setBlock($this->position, $this);
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ use pocketmine\block\utils\BlockDataSerializer;
|
||||
use pocketmine\block\utils\HorizontalFacingTrait;
|
||||
use pocketmine\block\utils\InvalidBlockStateException;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Facing;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\player\Player;
|
||||
@ -78,6 +79,28 @@ final class Bell extends Transparent{
|
||||
return 0b1111;
|
||||
}
|
||||
|
||||
protected function recalculateCollisionBoxes() : array{
|
||||
if($this->attachmentType->equals(BellAttachmentType::FLOOR())){
|
||||
return [
|
||||
AxisAlignedBB::one()->squash(Facing::axis($this->facing), 1 / 4)->trim(Facing::UP, 3 / 16)
|
||||
];
|
||||
}
|
||||
if($this->attachmentType->equals(BellAttachmentType::CEILING())){
|
||||
return [
|
||||
AxisAlignedBB::one()->contract(1 / 4, 0, 1 / 4)->trim(Facing::DOWN, 1 / 4)
|
||||
];
|
||||
}
|
||||
|
||||
$box = AxisAlignedBB::one()
|
||||
->squash(Facing::axis(Facing::rotateY($this->facing, true)), 1 / 4)
|
||||
->trim(Facing::UP, 1 / 16)
|
||||
->trim(Facing::DOWN, 1 / 4);
|
||||
|
||||
return [
|
||||
$this->attachmentType->equals(BellAttachmentType::ONE_WALL()) ? $box->trim($this->facing, 3 / 16) : $box
|
||||
];
|
||||
}
|
||||
|
||||
public function getAttachmentType() : BellAttachmentType{ return $this->attachmentType; }
|
||||
|
||||
/** @return $this */
|
||||
|
@ -398,35 +398,42 @@ class BlockFactory{
|
||||
|
||||
//TODO: in the future this won't be the same for all the types
|
||||
$stoneSlabBreakInfo = new BlockBreakInfo(2.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0);
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(1, Meta::STONE_SLAB_BRICK), "Brick", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(1, Meta::STONE_SLAB_COBBLESTONE), "Cobblestone", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(1, Meta::STONE_SLAB_FAKE_WOODEN), "Fake Wooden", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(1, Meta::STONE_SLAB_NETHER_BRICK), "Nether Brick", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(1, Meta::STONE_SLAB_QUARTZ), "Quartz", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(1, Meta::STONE_SLAB_SANDSTONE), "Sandstone", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(1, Meta::STONE_SLAB_SMOOTH_STONE), "Smooth Stone", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(1, Meta::STONE_SLAB_STONE_BRICK), "Stone Brick", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(2, Meta::STONE_SLAB2_DARK_PRISMARINE), "Dark Prismarine", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(2, Meta::STONE_SLAB2_MOSSY_COBBLESTONE), "Mossy Cobblestone", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(2, Meta::STONE_SLAB2_PRISMARINE), "Prismarine", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(2, Meta::STONE_SLAB2_PRISMARINE_BRICKS), "Prismarine Bricks", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(2, Meta::STONE_SLAB2_PURPUR), "Purpur", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(2, Meta::STONE_SLAB2_RED_NETHER_BRICK), "Red Nether Brick", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(2, Meta::STONE_SLAB2_RED_SANDSTONE), "Red Sandstone", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(2, Meta::STONE_SLAB2_SMOOTH_SANDSTONE), "Smooth Sandstone", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(3, Meta::STONE_SLAB3_ANDESITE), "Andesite", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(3, Meta::STONE_SLAB3_DIORITE), "Diorite", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(3, Meta::STONE_SLAB3_END_STONE_BRICK), "End Stone Brick", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(3, Meta::STONE_SLAB3_GRANITE), "Granite", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(3, Meta::STONE_SLAB3_POLISHED_ANDESITE), "Polished Andesite", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(3, Meta::STONE_SLAB3_POLISHED_DIORITE), "Polished Diorite", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(3, Meta::STONE_SLAB3_POLISHED_GRANITE), "Polished Granite", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(3, Meta::STONE_SLAB3_SMOOTH_RED_SANDSTONE), "Smooth Red Sandstone", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(4, Meta::STONE_SLAB4_CUT_RED_SANDSTONE), "Cut Red Sandstone", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(4, Meta::STONE_SLAB4_CUT_SANDSTONE), "Cut Sandstone", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(4, Meta::STONE_SLAB4_MOSSY_STONE_BRICK), "Mossy Stone Brick", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(4, Meta::STONE_SLAB4_SMOOTH_QUARTZ), "Smooth Quartz", $stoneSlabBreakInfo));
|
||||
$this->registerSlabWithDoubleHighBitsRemapping(new Slab(BlockLegacyIdHelper::getStoneSlabIdentifier(4, Meta::STONE_SLAB4_STONE), "Stone", $stoneSlabBreakInfo));
|
||||
|
||||
$getStoneSlabId = static fn(int $stoneSlabId, int $meta) => BlockLegacyIdHelper::getStoneSlabIdentifier($stoneSlabId, $meta);
|
||||
foreach([
|
||||
new Slab($getStoneSlabId(1, Meta::STONE_SLAB_BRICK), "Brick", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(1, Meta::STONE_SLAB_COBBLESTONE), "Cobblestone", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(1, Meta::STONE_SLAB_FAKE_WOODEN), "Fake Wooden", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(1, Meta::STONE_SLAB_NETHER_BRICK), "Nether Brick", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(1, Meta::STONE_SLAB_QUARTZ), "Quartz", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(1, Meta::STONE_SLAB_SANDSTONE), "Sandstone", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(1, Meta::STONE_SLAB_SMOOTH_STONE), "Smooth Stone", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(1, Meta::STONE_SLAB_STONE_BRICK), "Stone Brick", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(2, Meta::STONE_SLAB2_DARK_PRISMARINE), "Dark Prismarine", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(2, Meta::STONE_SLAB2_MOSSY_COBBLESTONE), "Mossy Cobblestone", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(2, Meta::STONE_SLAB2_PRISMARINE), "Prismarine", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(2, Meta::STONE_SLAB2_PRISMARINE_BRICKS), "Prismarine Bricks", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(2, Meta::STONE_SLAB2_PURPUR), "Purpur", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(2, Meta::STONE_SLAB2_RED_NETHER_BRICK), "Red Nether Brick", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(2, Meta::STONE_SLAB2_RED_SANDSTONE), "Red Sandstone", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(2, Meta::STONE_SLAB2_SMOOTH_SANDSTONE), "Smooth Sandstone", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(3, Meta::STONE_SLAB3_ANDESITE), "Andesite", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(3, Meta::STONE_SLAB3_DIORITE), "Diorite", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(3, Meta::STONE_SLAB3_END_STONE_BRICK), "End Stone Brick", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(3, Meta::STONE_SLAB3_GRANITE), "Granite", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(3, Meta::STONE_SLAB3_POLISHED_ANDESITE), "Polished Andesite", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(3, Meta::STONE_SLAB3_POLISHED_DIORITE), "Polished Diorite", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(3, Meta::STONE_SLAB3_POLISHED_GRANITE), "Polished Granite", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(3, Meta::STONE_SLAB3_SMOOTH_RED_SANDSTONE), "Smooth Red Sandstone", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(4, Meta::STONE_SLAB4_CUT_RED_SANDSTONE), "Cut Red Sandstone", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(4, Meta::STONE_SLAB4_CUT_SANDSTONE), "Cut Sandstone", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(4, Meta::STONE_SLAB4_MOSSY_STONE_BRICK), "Mossy Stone Brick", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(4, Meta::STONE_SLAB4_SMOOTH_QUARTZ), "Smooth Quartz", $stoneSlabBreakInfo),
|
||||
new Slab($getStoneSlabId(4, Meta::STONE_SLAB4_STONE), "Stone", $stoneSlabBreakInfo),
|
||||
] as $slabType){
|
||||
$this->registerSlabWithDoubleHighBitsRemapping($slabType);
|
||||
}
|
||||
|
||||
$this->registerAllMeta(new Opaque(new BID(Ids::STONECUTTER, 0), "Stonecutter", new BlockBreakInfo(3.5, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())));
|
||||
$this->registerAllMeta(new Sugarcane(new BID(Ids::REEDS_BLOCK, 0, ItemIds::REEDS), "Sugarcane", BlockBreakInfo::instant()));
|
||||
$this->registerAllMeta(new SweetBerryBush(new BID(Ids::SWEET_BERRY_BUSH, 0, ItemIds::SWEET_BERRIES), "Sweet Berry Bush", BlockBreakInfo::instant()));
|
||||
|
@ -42,6 +42,8 @@ final class BlockLegacyMetadata{
|
||||
public const BAMBOO_LEAF_SIZE_SHIFT = 1;
|
||||
public const BAMBOO_LEAF_SIZE_MASK = 0x03;
|
||||
|
||||
public const BAMBOO_SAPLING_FLAG_READY = 0x01;
|
||||
|
||||
public const BARREL_FLAG_OPEN = 0x08;
|
||||
|
||||
public const BED_FLAG_HEAD = 0x08;
|
||||
|
@ -125,6 +125,24 @@ class BrewingStand extends Transparent{
|
||||
}
|
||||
|
||||
public function onScheduledUpdate() : void{
|
||||
//TODO
|
||||
$brewing = $this->position->getWorld()->getTile($this->position);
|
||||
if($brewing instanceof TileBrewingStand){
|
||||
if($brewing->onUpdate()){
|
||||
$this->position->getWorld()->scheduleDelayedBlockUpdate($this->position, 1);
|
||||
}
|
||||
|
||||
$changed = false;
|
||||
foreach(BrewingStandSlot::getAll() as $slot){
|
||||
$occupied = !$brewing->getInventory()->isSlotEmpty($slot->getSlotNumber());
|
||||
if($occupied !== $this->hasSlot($slot)){
|
||||
$this->setSlot($slot, $occupied);
|
||||
$changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if($changed){
|
||||
$this->position->getWorld()->setBlock($this->position, $this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,9 @@ class Cobweb extends Flowable{
|
||||
}
|
||||
|
||||
public function getDropsForCompatibleTool(Item $item) : array{
|
||||
if(($item->getBlockToolType() & BlockToolType::SHEARS) !== 0){
|
||||
return [$this->asItem()];
|
||||
}
|
||||
return [
|
||||
VanillaItems::STRING()
|
||||
];
|
||||
|
@ -66,4 +66,8 @@ class EnderChest extends Transparent{
|
||||
VanillaBlocks::OBSIDIAN()->asItem()->setCount(8)
|
||||
];
|
||||
}
|
||||
|
||||
public function isAffectedBySilkTouch() : bool{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ class Fire extends Flowable{
|
||||
}
|
||||
|
||||
public function onNearbyBlockChange() : void{
|
||||
if(!$this->getSide(Facing::DOWN)->isSolid() && !$this->hasAdjacentFlammableBlocks()){
|
||||
if($this->getSide(Facing::DOWN)->isTransparent() && !$this->hasAdjacentFlammableBlocks()){
|
||||
$this->position->getWorld()->setBlock($this->position, VanillaBlocks::AIR());
|
||||
}else{
|
||||
$this->position->getWorld()->scheduleDelayedBlockUpdate($this->position, mt_rand(30, 40));
|
||||
@ -129,7 +129,7 @@ class Fire extends Flowable{
|
||||
}
|
||||
}elseif(!$this->hasAdjacentFlammableBlocks()){
|
||||
$canSpread = false;
|
||||
if(!$down->isSolid() || $this->age > 3){
|
||||
if($down->isTransparent() || $this->age > 3){
|
||||
$result = VanillaBlocks::AIR();
|
||||
}
|
||||
}
|
||||
@ -180,14 +180,16 @@ class Fire extends Flowable{
|
||||
if(!$ev->isCancelled()){
|
||||
$block->onIncinerate();
|
||||
|
||||
$spreadedFire = false;
|
||||
if(mt_rand(0, $this->age + 9) < 5){ //TODO: check rain
|
||||
$fire = clone $this;
|
||||
$fire->age = min(15, $fire->age + (mt_rand(0, 4) >> 2));
|
||||
$spreadedFire = $this->spreadBlock($block, $fire);
|
||||
}
|
||||
if(!$spreadedFire){
|
||||
$this->position->getWorld()->setBlock($block->position, VanillaBlocks::AIR());
|
||||
if($this->position->getWorld()->getBlock($block->getPosition())->isSameState($block)){
|
||||
$spreadedFire = false;
|
||||
if(mt_rand(0, $this->age + 9) < 5){ //TODO: check rain
|
||||
$fire = clone $this;
|
||||
$fire->age = min(15, $fire->age + (mt_rand(0, 4) >> 2));
|
||||
$spreadedFire = $this->spreadBlock($block, $fire);
|
||||
}
|
||||
if(!$spreadedFire){
|
||||
$this->position->getWorld()->setBlock($block->position, VanillaBlocks::AIR());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ use pocketmine\block\utils\NormalHorizontalFacingInMetadataTrait;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\player\Player;
|
||||
use function mt_rand;
|
||||
|
||||
class Furnace extends Opaque{
|
||||
use FacesOppositePlacingPlayerTrait;
|
||||
@ -84,6 +85,9 @@ class Furnace extends Opaque{
|
||||
public function onScheduledUpdate() : void{
|
||||
$furnace = $this->position->getWorld()->getTile($this->position);
|
||||
if($furnace instanceof TileFurnace && $furnace->onUpdate()){
|
||||
if(mt_rand(1, 60) === 1){ //in vanilla this is between 1 and 5 seconds; try to average about 3
|
||||
$this->position->getWorld()->addSound($this->position, $furnace->getFurnaceType()->getCookSound());
|
||||
}
|
||||
$this->position->getWorld()->scheduleDelayedBlockUpdate($this->position, 1); //TODO: check this
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\utils\PillarRotationInMetadataTrait;
|
||||
use pocketmine\entity\Entity;
|
||||
|
||||
class HayBale extends Opaque{
|
||||
use PillarRotationInMetadataTrait;
|
||||
@ -35,4 +36,9 @@ class HayBale extends Opaque{
|
||||
public function getFlammability() : int{
|
||||
return 20;
|
||||
}
|
||||
|
||||
public function onEntityLand(Entity $entity) : ?float{
|
||||
$entity->fallDistance *= 0.2;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,8 @@ use pocketmine\math\Facing;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\world\BlockTransaction;
|
||||
use function is_infinite;
|
||||
use function is_nan;
|
||||
use function lcg_value;
|
||||
|
||||
class ItemFrame extends Flowable{
|
||||
@ -111,6 +113,9 @@ class ItemFrame extends Flowable{
|
||||
|
||||
/** @return $this */
|
||||
public function setItemDropChance(float $itemDropChance) : self{
|
||||
if($itemDropChance < 0.0 || $itemDropChance > 1.0 || is_nan($itemDropChance) || is_infinite($itemDropChance)){
|
||||
throw new \InvalidArgumentException("Drop chance must be in range 0-1");
|
||||
}
|
||||
$this->itemDropChance = $itemDropChance;
|
||||
return $this;
|
||||
}
|
||||
|
@ -83,6 +83,9 @@ abstract class Liquid extends Transparent{
|
||||
|
||||
/** @return $this */
|
||||
public function setDecay(int $decay) : self{
|
||||
if($decay < 0 || $decay > 7){
|
||||
throw new \InvalidArgumentException("Decay must be in range 0-7");
|
||||
}
|
||||
$this->decay = $decay;
|
||||
return $this;
|
||||
}
|
||||
@ -339,7 +342,7 @@ abstract class Liquid extends Transparent{
|
||||
$ev = new BlockSpreadEvent($block, $this, $new);
|
||||
$ev->call();
|
||||
if(!$ev->isCancelled()){
|
||||
if($block->getId() > 0){
|
||||
if($block->getId() !== BlockLegacyIds::AIR){
|
||||
$this->position->getWorld()->useBreakOn($block->position);
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class Mycelium extends Opaque{
|
||||
$y = mt_rand($this->position->y - 2, $this->position->y + 2);
|
||||
$z = mt_rand($this->position->z - 1, $this->position->z + 1);
|
||||
$block = $this->position->getWorld()->getBlockAt($x, $y, $z);
|
||||
if($block->getId() === BlockLegacyIds::DIRT){
|
||||
if($block instanceof Dirt && !$block->isCoarse()){
|
||||
if($block->getSide(Facing::UP) instanceof Transparent){
|
||||
$ev = new BlockSpreadEvent($block, $this, VanillaBlocks::MYCELIUM());
|
||||
$ev->call();
|
||||
|
@ -91,7 +91,7 @@ class ShulkerBox extends Opaque{
|
||||
$shulker = $this->position->getWorld()->getTile($this->position);
|
||||
if($shulker instanceof TileShulkerBox){
|
||||
if(
|
||||
$this->getSide($this->facing)->getId() !== BlockLegacyIds::AIR ||
|
||||
$this->getSide($this->facing)->isSolid() ||
|
||||
!$shulker->canOpenWith($item->getCustomName())
|
||||
){
|
||||
return true;
|
||||
|
@ -24,7 +24,13 @@ declare(strict_types=1);
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\utils\ColorInMetadataTrait;
|
||||
use pocketmine\block\utils\DyeColor;
|
||||
|
||||
final class StainedGlass extends Glass{
|
||||
use ColorInMetadataTrait;
|
||||
|
||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo){
|
||||
$this->color = DyeColor::WHITE();
|
||||
parent::__construct($idInfo, $name, $breakInfo);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,13 @@ declare(strict_types=1);
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\utils\ColorInMetadataTrait;
|
||||
use pocketmine\block\utils\DyeColor;
|
||||
|
||||
final class StainedGlassPane extends GlassPane{
|
||||
use ColorInMetadataTrait;
|
||||
|
||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo){
|
||||
$this->color = DyeColor::WHITE();
|
||||
parent::__construct($idInfo, $name, $breakInfo);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,13 @@ declare(strict_types=1);
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\utils\ColorInMetadataTrait;
|
||||
use pocketmine\block\utils\DyeColor;
|
||||
|
||||
final class StainedHardenedClay extends HardenedClay{
|
||||
use ColorInMetadataTrait;
|
||||
|
||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo){
|
||||
$this->color = DyeColor::WHITE();
|
||||
parent::__construct($idInfo, $name, $breakInfo);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,13 @@ declare(strict_types=1);
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\utils\ColorInMetadataTrait;
|
||||
use pocketmine\block\utils\DyeColor;
|
||||
|
||||
final class StainedHardenedGlass extends HardenedGlass{
|
||||
use ColorInMetadataTrait;
|
||||
|
||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo){
|
||||
$this->color = DyeColor::WHITE();
|
||||
parent::__construct($idInfo, $name, $breakInfo);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,13 @@ declare(strict_types=1);
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\utils\ColorInMetadataTrait;
|
||||
use pocketmine\block\utils\DyeColor;
|
||||
|
||||
final class StainedHardenedGlassPane extends HardenedGlassPane{
|
||||
use ColorInMetadataTrait;
|
||||
|
||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo){
|
||||
$this->color = DyeColor::WHITE();
|
||||
parent::__construct($idInfo, $name, $breakInfo);
|
||||
}
|
||||
}
|
||||
|
@ -151,9 +151,11 @@ class SweetBerryBush extends Flowable{
|
||||
}
|
||||
|
||||
public function onEntityInside(Entity $entity) : bool{
|
||||
//TODO: in MCPE, this only triggers if moving while inside the bush block - we don't have the system to deal
|
||||
//with that reliably right now
|
||||
if($this->age >= self::STAGE_BUSH_NO_BERRIES && $entity instanceof Living){
|
||||
$entity->resetFallDistance();
|
||||
|
||||
//TODO: in MCPE, this only triggers if moving while inside the bush block - we don't have the system to deal
|
||||
//with that reliably right now
|
||||
$entity->attack(new EntityDamageByBlockEvent($this, $entity, EntityDamageByBlockEvent::CAUSE_CONTACT, 1));
|
||||
}
|
||||
return true;
|
||||
|
@ -24,16 +24,29 @@ declare(strict_types=1);
|
||||
namespace pocketmine\block\tile;
|
||||
|
||||
use pocketmine\block\inventory\BrewingStandInventory;
|
||||
use pocketmine\crafting\BrewingRecipe;
|
||||
use pocketmine\event\block\BrewingFuelUseEvent;
|
||||
use pocketmine\event\block\BrewItemEvent;
|
||||
use pocketmine\inventory\CallbackInventoryListener;
|
||||
use pocketmine\inventory\Inventory;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\VanillaItems;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\network\mcpe\protocol\ContainerSetDataPacket;
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\world\sound\PotionFinishBrewingSound;
|
||||
use pocketmine\world\World;
|
||||
use function array_map;
|
||||
use function count;
|
||||
|
||||
class BrewingStand extends Spawnable implements Container, Nameable{
|
||||
|
||||
use NameableTrait {
|
||||
addAdditionalSpawnData as addNameSpawnData;
|
||||
}
|
||||
use ContainerTrait;
|
||||
use NameableTrait;
|
||||
|
||||
public const BREW_TIME_TICKS = 400; // Brew time in ticks
|
||||
|
||||
private const TAG_BREW_TIME = "BrewTime"; //TAG_Short
|
||||
private const TAG_BREW_TIME_PE = "CookTime"; //TAG_Short
|
||||
@ -41,15 +54,11 @@ class BrewingStand extends Spawnable implements Container, Nameable{
|
||||
private const TAG_REMAINING_FUEL_TIME = "Fuel"; //TAG_Byte
|
||||
private const TAG_REMAINING_FUEL_TIME_PE = "FuelAmount"; //TAG_Short
|
||||
|
||||
/** @var BrewingStandInventory */
|
||||
private $inventory;
|
||||
private BrewingStandInventory $inventory;
|
||||
|
||||
/** @var int */
|
||||
private $brewTime = 0;
|
||||
/** @var int */
|
||||
private $maxFuelTime = 0;
|
||||
/** @var int */
|
||||
private $remainingFuelTime = 0;
|
||||
private int $brewTime = 0;
|
||||
private int $maxFuelTime = 0;
|
||||
private int $remainingFuelTime = 0;
|
||||
|
||||
public function __construct(World $world, Vector3 $pos){
|
||||
parent::__construct($world, $pos);
|
||||
@ -83,6 +92,14 @@ class BrewingStand extends Spawnable implements Container, Nameable{
|
||||
$nbt->setShort(self::TAG_REMAINING_FUEL_TIME_PE, $this->remainingFuelTime);
|
||||
}
|
||||
|
||||
protected function addAdditionalSpawnData(CompoundTag $nbt) : void{
|
||||
$this->addNameSpawnData($nbt);
|
||||
|
||||
$nbt->setShort(self::TAG_BREW_TIME_PE, $this->brewTime);
|
||||
$nbt->setShort(self::TAG_MAX_FUEL_TIME, $this->maxFuelTime);
|
||||
$nbt->setShort(self::TAG_REMAINING_FUEL_TIME_PE, $this->remainingFuelTime);
|
||||
}
|
||||
|
||||
public function getDefaultName() : string{
|
||||
return "Brewing Stand";
|
||||
}
|
||||
@ -108,4 +125,137 @@ class BrewingStand extends Spawnable implements Container, Nameable{
|
||||
public function getRealInventory(){
|
||||
return $this->inventory;
|
||||
}
|
||||
|
||||
private function checkFuel(Item $item) : void{
|
||||
$ev = new BrewingFuelUseEvent($this);
|
||||
if(!$item->equals(VanillaItems::BLAZE_POWDER(), true, false)){
|
||||
$ev->cancel();
|
||||
}
|
||||
|
||||
$ev->call();
|
||||
if($ev->isCancelled()){
|
||||
return;
|
||||
}
|
||||
|
||||
$item->pop();
|
||||
$this->inventory->setItem(BrewingStandInventory::SLOT_FUEL, $item);
|
||||
|
||||
$this->maxFuelTime = $this->remainingFuelTime = $ev->getFuelTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BrewingRecipe[]
|
||||
* @phpstan-return array<int, BrewingRecipe>
|
||||
*/
|
||||
private function getBrewableRecipes() : array{
|
||||
$ingredient = $this->inventory->getItem(BrewingStandInventory::SLOT_INGREDIENT);
|
||||
if($ingredient->isNull()){
|
||||
return [];
|
||||
}
|
||||
|
||||
$recipes = [];
|
||||
$craftingManager = $this->position->getWorld()->getServer()->getCraftingManager();
|
||||
foreach([BrewingStandInventory::SLOT_BOTTLE_LEFT, BrewingStandInventory::SLOT_BOTTLE_MIDDLE, BrewingStandInventory::SLOT_BOTTLE_RIGHT] as $slot){
|
||||
$input = $this->inventory->getItem($slot);
|
||||
if($input->isNull()){
|
||||
continue;
|
||||
}
|
||||
|
||||
if(($recipe = $craftingManager->matchBrewingRecipe($input, $ingredient)) !== null){
|
||||
$recipes[$slot] = $recipe;
|
||||
}
|
||||
}
|
||||
|
||||
return $recipes;
|
||||
}
|
||||
|
||||
public function onUpdate() : bool{
|
||||
if($this->closed){
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->timings->startTiming();
|
||||
|
||||
$prevBrewTime = $this->brewTime;
|
||||
$prevRemainingFuelTime = $this->remainingFuelTime;
|
||||
$prevMaxFuelTime = $this->maxFuelTime;
|
||||
|
||||
$ret = false;
|
||||
|
||||
$fuel = $this->inventory->getItem(BrewingStandInventory::SLOT_FUEL);
|
||||
$ingredient = $this->inventory->getItem(BrewingStandInventory::SLOT_INGREDIENT);
|
||||
|
||||
$recipes = $this->getBrewableRecipes();
|
||||
$canBrew = count($recipes) !== 0;
|
||||
|
||||
if($this->remainingFuelTime <= 0 && $canBrew){
|
||||
$this->checkFuel($fuel);
|
||||
}
|
||||
|
||||
if($this->remainingFuelTime > 0){
|
||||
if($canBrew){
|
||||
if($this->brewTime === 0){
|
||||
$this->brewTime = self::BREW_TIME_TICKS;
|
||||
--$this->remainingFuelTime;
|
||||
}
|
||||
|
||||
--$this->brewTime;
|
||||
|
||||
if($this->brewTime <= 0){
|
||||
$anythingBrewed = false;
|
||||
foreach($recipes as $slot => $recipe){
|
||||
$input = $this->inventory->getItem($slot);
|
||||
$output = $recipe->getResultFor($input);
|
||||
if($output === null){
|
||||
continue;
|
||||
}
|
||||
|
||||
$ev = new BrewItemEvent($this, $slot, $input, $output, $recipe);
|
||||
$ev->call();
|
||||
if($ev->isCancelled()){
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->inventory->setItem($slot, $ev->getResult());
|
||||
$anythingBrewed = true;
|
||||
}
|
||||
|
||||
if($anythingBrewed){
|
||||
$this->position->getWorld()->addSound($this->position->add(0.5, 0.5, 0.5), new PotionFinishBrewingSound());
|
||||
}
|
||||
|
||||
$ingredient->pop();
|
||||
$this->inventory->setItem(BrewingStandInventory::SLOT_INGREDIENT, $ingredient);
|
||||
|
||||
$this->brewTime = 0;
|
||||
}else{
|
||||
$ret = true;
|
||||
}
|
||||
}else{
|
||||
$this->brewTime = 0;
|
||||
}
|
||||
}else{
|
||||
$this->brewTime = $this->remainingFuelTime = $this->maxFuelTime = 0;
|
||||
}
|
||||
|
||||
$viewers = array_map(fn(Player $p) => $p->getNetworkSession()->getInvManager(), $this->inventory->getViewers());
|
||||
foreach($viewers as $v){
|
||||
if($v === null){
|
||||
continue;
|
||||
}
|
||||
if($prevBrewTime !== $this->brewTime){
|
||||
$v->syncData($this->inventory, ContainerSetDataPacket::PROPERTY_BREWING_STAND_BREW_TIME, $this->brewTime);
|
||||
}
|
||||
if($prevRemainingFuelTime !== $this->remainingFuelTime){
|
||||
$v->syncData($this->inventory, ContainerSetDataPacket::PROPERTY_BREWING_STAND_FUEL_AMOUNT, $this->remainingFuelTime);
|
||||
}
|
||||
if($prevMaxFuelTime !== $this->maxFuelTime){
|
||||
$v->syncData($this->inventory, ContainerSetDataPacket::PROPERTY_BREWING_STAND_FUEL_TOTAL, $this->maxFuelTime);
|
||||
}
|
||||
}
|
||||
|
||||
$this->timings->stopTiming();
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ trait ContainerTrait{
|
||||
abstract public function getRealInventory();
|
||||
|
||||
protected function loadItems(CompoundTag $tag) : void{
|
||||
if(($inventoryTag = $tag->getTag(Container::TAG_ITEMS)) instanceof ListTag){
|
||||
if(($inventoryTag = $tag->getTag(Container::TAG_ITEMS)) instanceof ListTag && $inventoryTag->getTagType() === NBT::TAG_Compound){
|
||||
$inventory = $this->getRealInventory();
|
||||
$listeners = $inventory->getListeners()->toArray();
|
||||
$inventory->getListeners()->remove(...$listeners); //prevent any events being fired by initialization
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block\utils;
|
||||
|
||||
use pocketmine\block\inventory\BrewingStandInventory;
|
||||
use pocketmine\utils\EnumTrait;
|
||||
|
||||
/**
|
||||
@ -36,13 +37,24 @@ use pocketmine\utils\EnumTrait;
|
||||
* @method static BrewingStandSlot SOUTHWEST()
|
||||
*/
|
||||
final class BrewingStandSlot{
|
||||
use EnumTrait;
|
||||
use EnumTrait {
|
||||
__construct as Enum___construct;
|
||||
}
|
||||
|
||||
protected static function setup() : void{
|
||||
self::registerAll(
|
||||
new self("east"),
|
||||
new self("northwest"),
|
||||
new self("southwest")
|
||||
new self("east", BrewingStandInventory::SLOT_BOTTLE_LEFT),
|
||||
new self("northwest", BrewingStandInventory::SLOT_BOTTLE_MIDDLE),
|
||||
new self("southwest", BrewingStandInventory::SLOT_BOTTLE_RIGHT)
|
||||
);
|
||||
}
|
||||
|
||||
private function __construct(string $enumName, private int $slotNumber){
|
||||
$this->Enum___construct($enumName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the brewing stand inventory slot number associated with this visual slot.
|
||||
*/
|
||||
public function getSlotNumber() : int{ return $this->slotNumber; }
|
||||
}
|
||||
|
@ -41,11 +41,13 @@ interface CommandSender extends Permissible{
|
||||
/**
|
||||
* Returns the line height of the command-sender's screen. Used for determining sizes for command output pagination
|
||||
* such as in the /help command.
|
||||
* @phpstan-return positive-int
|
||||
*/
|
||||
public function getScreenLineHeight() : int;
|
||||
|
||||
/**
|
||||
* Sets the line height used for command output pagination for this command sender. `null` will reset it to default.
|
||||
* @phpstan-param positive-int|null $height
|
||||
*/
|
||||
public function setScreenLineHeight(?int $height) : void;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class DumpMemoryCommand extends VanillaCommand{
|
||||
return true;
|
||||
}
|
||||
|
||||
$sender->getServer()->getMemoryManager()->dumpServerMemory($args[0] ?? (Path::join($sender->getServer()->getDataPath(), "memory_dumps" . date("D_M_j-H.i.s-T_Y"))), 48, 80);
|
||||
$sender->getServer()->getMemoryManager()->dumpServerMemory($args[0] ?? (Path::join($sender->getServer()->getDataPath(), "memory_dumps", date("D_M_j-H.i.s-T_Y"))), 48, 80);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,10 @@ class ConsoleCommandSender implements CommandSender{
|
||||
|
||||
/** @var Server */
|
||||
private $server;
|
||||
/** @var int|null */
|
||||
/**
|
||||
* @var int|null
|
||||
* @phpstan-var positive-int|null
|
||||
*/
|
||||
protected $lineHeight = null;
|
||||
/** @var Language */
|
||||
private $language;
|
||||
|
30
src/crafting/BrewingRecipe.php
Normal file
30
src/crafting/BrewingRecipe.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\crafting;
|
||||
|
||||
use pocketmine\item\Item;
|
||||
|
||||
interface BrewingRecipe{
|
||||
public function getResultFor(Item $input) : ?Item;
|
||||
}
|
@ -45,6 +45,18 @@ class CraftingManager{
|
||||
*/
|
||||
protected $furnaceRecipeManagers;
|
||||
|
||||
/**
|
||||
* @var PotionTypeRecipe[][]
|
||||
* @phpstan-var array<string, array<string, PotionTypeRecipe>>
|
||||
*/
|
||||
protected $potionTypeRecipes = [];
|
||||
|
||||
/**
|
||||
* @var PotionContainerChangeRecipe[][]
|
||||
* @phpstan-var array<int, array<string, PotionContainerChangeRecipe>>
|
||||
*/
|
||||
protected $potionContainerChangeRecipes = [];
|
||||
|
||||
/**
|
||||
* @var ObjectSet
|
||||
* @phpstan-var ObjectSet<\Closure() : void>
|
||||
@ -140,6 +152,22 @@ class CraftingManager{
|
||||
return $this->furnaceRecipeManagers[$furnaceType->id()];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PotionTypeRecipe[][]
|
||||
* @phpstan-return array<string, array<string, PotionTypeRecipe>>
|
||||
*/
|
||||
public function getPotionTypeRecipes() : array{
|
||||
return $this->potionTypeRecipes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PotionContainerChangeRecipe[][]
|
||||
* @phpstan-return array<int, array<string, PotionContainerChangeRecipe>>
|
||||
*/
|
||||
public function getPotionContainerChangeRecipes() : array{
|
||||
return $this->potionContainerChangeRecipes;
|
||||
}
|
||||
|
||||
public function registerShapedRecipe(ShapedRecipe $recipe) : void{
|
||||
$this->shapedRecipes[self::hashOutputs($recipe->getResults())][] = $recipe;
|
||||
|
||||
@ -156,6 +184,25 @@ class CraftingManager{
|
||||
}
|
||||
}
|
||||
|
||||
public function registerPotionTypeRecipe(PotionTypeRecipe $recipe) : void{
|
||||
$input = $recipe->getInput();
|
||||
$ingredient = $recipe->getIngredient();
|
||||
$this->potionTypeRecipes[$input->getId() . ":" . $input->getMeta()][$ingredient->getId() . ":" . ($ingredient->hasAnyDamageValue() ? "?" : $ingredient->getMeta())] = $recipe;
|
||||
|
||||
foreach($this->recipeRegisteredCallbacks as $callback){
|
||||
$callback();
|
||||
}
|
||||
}
|
||||
|
||||
public function registerPotionContainerChangeRecipe(PotionContainerChangeRecipe $recipe) : void{
|
||||
$ingredient = $recipe->getIngredient();
|
||||
$this->potionContainerChangeRecipes[$recipe->getInputItemId()][$ingredient->getId() . ":" . ($ingredient->hasAnyDamageValue() ? "?" : $ingredient->getMeta())] = $recipe;
|
||||
|
||||
foreach($this->recipeRegisteredCallbacks as $callback){
|
||||
$callback();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Item[] $outputs
|
||||
*/
|
||||
@ -206,4 +253,11 @@ class CraftingManager{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function matchBrewingRecipe(Item $input, Item $ingredient) : ?BrewingRecipe{
|
||||
return $this->potionTypeRecipes[$input->getId() . ":" . $input->getMeta()][$ingredient->getId() . ":" . $ingredient->getMeta()] ??
|
||||
$this->potionTypeRecipes[$input->getId() . ":" . $input->getMeta()][$ingredient->getId() . ":?"] ??
|
||||
$this->potionContainerChangeRecipes[$input->getId()][$ingredient->getId() . ":" . $ingredient->getMeta()] ??
|
||||
$this->potionContainerChangeRecipes[$input->getId()][$ingredient->getId() . ":?"] ?? null;
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,20 @@ final class CraftingManagerFromDataHelper{
|
||||
Item::jsonDeserialize($recipe["input"]))
|
||||
);
|
||||
}
|
||||
foreach($recipes["potion_type"] as $recipe){
|
||||
$result->registerPotionTypeRecipe(new PotionTypeRecipe(
|
||||
Item::jsonDeserialize($recipe["input"]),
|
||||
Item::jsonDeserialize($recipe["ingredient"]),
|
||||
Item::jsonDeserialize($recipe["output"])
|
||||
));
|
||||
}
|
||||
foreach($recipes["potion_container_change"] as $recipe){
|
||||
$result->registerPotionContainerChangeRecipe(new PotionContainerChangeRecipe(
|
||||
$recipe["input_item_id"],
|
||||
Item::jsonDeserialize($recipe["ingredient"]),
|
||||
$recipe["output_item_id"]
|
||||
));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
@ -24,6 +24,10 @@ declare(strict_types=1);
|
||||
namespace pocketmine\crafting;
|
||||
|
||||
use pocketmine\utils\EnumTrait;
|
||||
use pocketmine\world\sound\BlastFurnaceSound;
|
||||
use pocketmine\world\sound\FurnaceSound;
|
||||
use pocketmine\world\sound\SmokerSound;
|
||||
use pocketmine\world\sound\Sound;
|
||||
|
||||
/**
|
||||
* This doc-block is generated automatically, do not modify it manually.
|
||||
@ -42,15 +46,17 @@ final class FurnaceType{
|
||||
|
||||
protected static function setup() : void{
|
||||
self::registerAll(
|
||||
new self("furnace", 200),
|
||||
new self("blast_furnace", 100),
|
||||
new self("smoker", 100),
|
||||
new self("furnace", 200, new FurnaceSound()),
|
||||
new self("blast_furnace", 100, new BlastFurnaceSound()),
|
||||
new self("smoker", 100, new SmokerSound()),
|
||||
);
|
||||
}
|
||||
|
||||
private function __construct(string $enumName, private int $cookDurationTicks){
|
||||
private function __construct(string $enumName, private int $cookDurationTicks, private Sound $cookSound){
|
||||
$this->Enum___construct($enumName);
|
||||
}
|
||||
|
||||
public function getCookDurationTicks() : int{ return $this->cookDurationTicks; }
|
||||
|
||||
public function getCookSound() : Sound{ return $this->cookSound; }
|
||||
}
|
||||
|
54
src/crafting/PotionContainerChangeRecipe.php
Normal file
54
src/crafting/PotionContainerChangeRecipe.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\crafting;
|
||||
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemFactory;
|
||||
|
||||
class PotionContainerChangeRecipe implements BrewingRecipe{
|
||||
|
||||
public function __construct(
|
||||
private int $inputItemId,
|
||||
private Item $ingredient,
|
||||
private int $outputItemId
|
||||
){
|
||||
$this->ingredient = clone $ingredient;
|
||||
}
|
||||
|
||||
public function getInputItemId() : int{
|
||||
return $this->inputItemId;
|
||||
}
|
||||
|
||||
public function getIngredient() : Item{
|
||||
return clone $this->ingredient;
|
||||
}
|
||||
|
||||
public function getOutputItemId() : int{
|
||||
return $this->outputItemId;
|
||||
}
|
||||
|
||||
public function getResultFor(Item $input) : ?Item{
|
||||
return $input->getId() === $this->getInputItemId() ? ItemFactory::getInstance()->get($this->getOutputItemId(), $input->getMeta()) : null;
|
||||
}
|
||||
}
|
55
src/crafting/PotionTypeRecipe.php
Normal file
55
src/crafting/PotionTypeRecipe.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\crafting;
|
||||
|
||||
use pocketmine\item\Item;
|
||||
|
||||
class PotionTypeRecipe implements BrewingRecipe{
|
||||
|
||||
public function __construct(
|
||||
private Item $input,
|
||||
private Item $ingredient,
|
||||
private Item $output
|
||||
){
|
||||
$this->input = clone $input;
|
||||
$this->ingredient = clone $ingredient;
|
||||
$this->output = clone $output;
|
||||
}
|
||||
|
||||
public function getInput() : Item{
|
||||
return clone $this->input;
|
||||
}
|
||||
|
||||
public function getIngredient() : Item{
|
||||
return clone $this->ingredient;
|
||||
}
|
||||
|
||||
public function getOutput() : Item{
|
||||
return clone $this->output;
|
||||
}
|
||||
|
||||
public function getResultFor(Item $input) : ?Item{
|
||||
return $input->equals($this->input, true, false) ? $this->getOutput() : null;
|
||||
}
|
||||
}
|
@ -44,10 +44,11 @@ final class CrashDumpRenderer{
|
||||
$this->addLine($this->data->general->name . " Crash Dump " . date("D M j H:i:s T Y", (int) $this->data->time));
|
||||
$this->addLine();
|
||||
|
||||
$this->addLine("Error: " . $this->data->error["message"]);
|
||||
$this->addLine("File: " . $this->data->error["file"]);
|
||||
$this->addLine("Line: " . $this->data->error["line"]);
|
||||
$this->addLine("Type: " . $this->data->error["type"]);
|
||||
$version = new VersionString($this->data->general->base_version, $this->data->general->is_dev, $this->data->general->build);
|
||||
$this->addLine($this->data->general->name . " version: " . $version->getFullVersion(true) . " [Protocol " . $this->data->general->protocol . "]");
|
||||
$this->addLine("Git commit: " . $this->data->general->git);
|
||||
$this->addLine("PHP version: " . $this->data->general->php);
|
||||
$this->addLine("OS: " . $this->data->general->php_os . ", " . $this->data->general->os);
|
||||
|
||||
if($this->data->plugin_involvement !== CrashDump::PLUGIN_INVOLVEMENT_NONE){
|
||||
$this->addLine();
|
||||
@ -62,30 +63,21 @@ final class CrashDumpRenderer{
|
||||
}
|
||||
|
||||
$this->addLine();
|
||||
$this->addLine("Code:");
|
||||
|
||||
foreach($this->data->code as $lineNumber => $line){
|
||||
$this->addLine("[$lineNumber] $line");
|
||||
}
|
||||
|
||||
$this->addLine();
|
||||
$this->addLine("Error: " . $this->data->error["message"]);
|
||||
$this->addLine("File: " . $this->data->error["file"]);
|
||||
$this->addLine("Line: " . $this->data->error["line"]);
|
||||
$this->addLine("Type: " . $this->data->error["type"]);
|
||||
$this->addLine("Backtrace:");
|
||||
foreach($this->data->trace as $line){
|
||||
$this->addLine($line);
|
||||
}
|
||||
|
||||
$this->addLine();
|
||||
$this->addLine("Code:");
|
||||
|
||||
$version = new VersionString($this->data->general->base_version, $this->data->general->is_dev, $this->data->general->build);
|
||||
|
||||
$this->addLine($this->data->general->name . " version: " . $version->getFullVersion(true) . " [Protocol " . $this->data->general->protocol . "]");
|
||||
$this->addLine("Git commit: " . $this->data->general->git);
|
||||
$this->addLine("uname -a: " . $this->data->general->uname);
|
||||
$this->addLine("PHP Version: " . $this->data->general->php);
|
||||
$this->addLine("Zend version: " . $this->data->general->zend);
|
||||
$this->addLine("OS: " . $this->data->general->php_os . ", " . $this->data->general->os);
|
||||
$this->addLine("Composer libraries: ");
|
||||
foreach(Utils::stringifyKeys($this->data->general->composer_libraries) as $library => $libraryVersion){
|
||||
$this->addLine("- $library $libraryVersion");
|
||||
foreach($this->data->code as $lineNumber => $line){
|
||||
$this->addLine("[$lineNumber] $line");
|
||||
}
|
||||
|
||||
if(count($this->data->plugins) > 0){
|
||||
@ -95,6 +87,14 @@ final class CrashDumpRenderer{
|
||||
$this->addLine($p->name . " " . $p->version . " by " . implode(", ", $p->authors) . " for API(s) " . implode(", ", $p->api));
|
||||
}
|
||||
}
|
||||
|
||||
$this->addLine();
|
||||
$this->addLine("uname -a: " . $this->data->general->uname);
|
||||
$this->addLine("Zend version: " . $this->data->general->zend);
|
||||
$this->addLine("Composer libraries: ");
|
||||
foreach(Utils::stringifyKeys($this->data->general->composer_libraries) as $library => $libraryVersion){
|
||||
$this->addLine("- $library $libraryVersion");
|
||||
}
|
||||
}
|
||||
|
||||
public function addLine(string $line = "") : void{
|
||||
|
@ -56,6 +56,7 @@ use pocketmine\player\Player;
|
||||
use pocketmine\Server;
|
||||
use pocketmine\timings\Timings;
|
||||
use pocketmine\timings\TimingsHandler;
|
||||
use pocketmine\utils\Utils;
|
||||
use pocketmine\world\format\Chunk;
|
||||
use pocketmine\world\Position;
|
||||
use pocketmine\world\sound\Sound;
|
||||
@ -69,8 +70,6 @@ use function deg2rad;
|
||||
use function floor;
|
||||
use function fmod;
|
||||
use function get_class;
|
||||
use function is_infinite;
|
||||
use function is_nan;
|
||||
use function lcg_value;
|
||||
use function sin;
|
||||
use function spl_object_id;
|
||||
@ -217,7 +216,15 @@ abstract class Entity{
|
||||
/** @var int|null */
|
||||
protected $targetId = null;
|
||||
|
||||
private bool $constructorCalled = false;
|
||||
|
||||
public function __construct(Location $location, ?CompoundTag $nbt = null){
|
||||
if($this->constructorCalled){
|
||||
throw new \LogicException("Attempted to call constructor for an Entity multiple times");
|
||||
}
|
||||
$this->constructorCalled = true;
|
||||
Utils::checkLocationNotInfOrNaN($location);
|
||||
|
||||
$this->timings = Timings::getEntityTimings($this);
|
||||
|
||||
$this->size = $this->getInitialSizeInfo();
|
||||
@ -226,11 +233,6 @@ abstract class Entity{
|
||||
$this->server = $location->getWorld()->getServer();
|
||||
|
||||
$this->location = $location->asLocation();
|
||||
assert(
|
||||
!is_nan($this->location->x) && !is_infinite($this->location->x) &&
|
||||
!is_nan($this->location->y) && !is_infinite($this->location->y) &&
|
||||
!is_nan($this->location->z) && !is_infinite($this->location->z)
|
||||
);
|
||||
|
||||
$this->boundingBox = new AxisAlignedBB(0, 0, 0, 0, 0, 0);
|
||||
$this->recalculateBoundingBox();
|
||||
@ -280,6 +282,7 @@ abstract class Entity{
|
||||
|
||||
public function setNameTagVisible(bool $value = true) : void{
|
||||
$this->nameTagVisible = $value;
|
||||
$this->networkPropertiesDirty = true;
|
||||
}
|
||||
|
||||
public function setNameTagAlwaysVisible(bool $value = true) : void{
|
||||
@ -766,21 +769,29 @@ abstract class Entity{
|
||||
}
|
||||
|
||||
protected function broadcastMovement(bool $teleport = false) : void{
|
||||
$this->server->broadcastPackets($this->hasSpawned, [MoveActorAbsolutePacket::create(
|
||||
$this->id,
|
||||
$this->getOffsetPosition($this->location),
|
||||
|
||||
//this looks very odd but is correct as of 1.5.0.7
|
||||
//for arrows this is actually x/y/z rotation
|
||||
//for mobs x and z are used for pitch and yaw, and y is used for headyaw
|
||||
$this->location->pitch,
|
||||
$this->location->yaw,
|
||||
$this->location->yaw,
|
||||
(
|
||||
($teleport ? MoveActorAbsolutePacket::FLAG_TELEPORT : 0) |
|
||||
($this->onGround ? MoveActorAbsolutePacket::FLAG_GROUND : 0)
|
||||
)
|
||||
)]);
|
||||
if($teleport){
|
||||
//TODO: HACK! workaround for https://github.com/pmmp/PocketMine-MP/issues/4394
|
||||
//this happens because MoveActor*Packet doesn't clear interpolation targets on the client, so the entity
|
||||
//snaps to the teleport position, but then lerps back to the original position if a normal movement for the
|
||||
//entity was recently broadcasted. This can be seen with players throwing ender pearls.
|
||||
//TODO: remove this if the bug ever gets fixed (lol)
|
||||
foreach($this->hasSpawned as $player){
|
||||
$this->despawnFrom($player);
|
||||
$this->spawnTo($player);
|
||||
}
|
||||
}else{
|
||||
$this->server->broadcastPackets($this->hasSpawned, [MoveActorAbsolutePacket::create(
|
||||
$this->id,
|
||||
$this->getOffsetPosition($this->location),
|
||||
$this->location->pitch,
|
||||
$this->location->yaw,
|
||||
$this->location->yaw,
|
||||
(
|
||||
//TODO: if the above hack for #4394 gets removed, we should be setting FLAG_TELEPORT here
|
||||
($this->onGround ? MoveActorAbsolutePacket::FLAG_GROUND : 0)
|
||||
)
|
||||
)]);
|
||||
}
|
||||
}
|
||||
|
||||
protected function broadcastMotion() : void{
|
||||
@ -1332,6 +1343,8 @@ abstract class Entity{
|
||||
}
|
||||
|
||||
public function setRotation(float $yaw, float $pitch) : void{
|
||||
Utils::checkFloatNotInfOrNaN("yaw", $yaw);
|
||||
Utils::checkFloatNotInfOrNaN("pitch", $pitch);
|
||||
$this->location->yaw = $yaw;
|
||||
$this->location->pitch = $pitch;
|
||||
$this->scheduleUpdate();
|
||||
@ -1357,6 +1370,7 @@ abstract class Entity{
|
||||
}
|
||||
|
||||
public function setMotion(Vector3 $motion) : bool{
|
||||
Utils::checkVector3NotInfOrNaN($motion);
|
||||
if(!$this->justCreated){
|
||||
$ev = new EntityMotionEvent($this, $motion);
|
||||
$ev->call();
|
||||
@ -1378,6 +1392,9 @@ abstract class Entity{
|
||||
* Adds the given values to the entity's motion vector.
|
||||
*/
|
||||
public function addMotion(float $x, float $y, float $z) : void{
|
||||
Utils::checkFloatNotInfOrNaN("x", $x);
|
||||
Utils::checkFloatNotInfOrNaN("y", $y);
|
||||
Utils::checkFloatNotInfOrNaN("z", $z);
|
||||
$this->motion = $this->motion->add($x, $y, $z);
|
||||
}
|
||||
|
||||
@ -1389,10 +1406,18 @@ abstract class Entity{
|
||||
* @param Vector3|Position|Location $pos
|
||||
*/
|
||||
public function teleport(Vector3 $pos, ?float $yaw = null, ?float $pitch = null) : bool{
|
||||
Utils::checkVector3NotInfOrNaN($pos);
|
||||
if($pos instanceof Location){
|
||||
$yaw = $yaw ?? $pos->yaw;
|
||||
$pitch = $pitch ?? $pos->pitch;
|
||||
}
|
||||
if($yaw !== null){
|
||||
Utils::checkFloatNotInfOrNaN("yaw", $yaw);
|
||||
}
|
||||
if($pitch !== null){
|
||||
Utils::checkFloatNotInfOrNaN("pitch", $pitch);
|
||||
}
|
||||
|
||||
$from = $this->location->asPosition();
|
||||
$to = Position::fromObject($pos, $pos instanceof Position ? $pos->getWorld() : $this->getWorld());
|
||||
$ev = new EntityTeleportEvent($this, $from, $to);
|
||||
|
@ -32,6 +32,8 @@ use pocketmine\nbt\tag\FloatTag;
|
||||
use pocketmine\nbt\tag\ListTag;
|
||||
use pocketmine\world\World;
|
||||
use function count;
|
||||
use function is_infinite;
|
||||
use function is_nan;
|
||||
|
||||
final class EntityDataHelper{
|
||||
|
||||
@ -39,6 +41,18 @@ final class EntityDataHelper{
|
||||
//NOOP
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws SavedDataLoadingException
|
||||
*/
|
||||
private static function validateFloat(string $tagName, string $component, float $value) : void{
|
||||
if(is_infinite($value)){
|
||||
throw new SavedDataLoadingException("$component component of '$tagName' contains invalid infinite value");
|
||||
}
|
||||
if(is_nan($value)){
|
||||
throw new SavedDataLoadingException("$component component of '$tagName' contains invalid NaN value");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws SavedDataLoadingException
|
||||
*/
|
||||
@ -54,6 +68,8 @@ final class EntityDataHelper{
|
||||
if(count($values) !== 2){
|
||||
throw new SavedDataLoadingException("Expected exactly 2 entries for 'Rotation'");
|
||||
}
|
||||
self::validateFloat("Rotation", "yaw", $values[0]->getValue());
|
||||
self::validateFloat("Rotation", "pitch", $values[1]->getValue());
|
||||
|
||||
return Location::fromObject($pos, $world, $values[0]->getValue(), $values[1]->getValue());
|
||||
}
|
||||
@ -74,6 +90,15 @@ final class EntityDataHelper{
|
||||
if(count($values) !== 3){
|
||||
throw new SavedDataLoadingException("Expected exactly 3 entries in '$tagName' tag");
|
||||
}
|
||||
return new Vector3($values[0]->getValue(), $values[1]->getValue(), $values[2]->getValue());
|
||||
|
||||
$x = $values[0]->getValue();
|
||||
$y = $values[1]->getValue();
|
||||
$z = $values[2]->getValue();
|
||||
|
||||
self::validateFloat($tagName, "x", $x);
|
||||
self::validateFloat($tagName, "y", $y);
|
||||
self::validateFloat($tagName, "z", $z);
|
||||
|
||||
return new Vector3($x, $y, $z);
|
||||
}
|
||||
}
|
||||
|
@ -27,10 +27,11 @@ use DaveRandom\CallbackValidator\CallbackType;
|
||||
use DaveRandom\CallbackValidator\ParameterType;
|
||||
use DaveRandom\CallbackValidator\ReturnType;
|
||||
use pocketmine\block\BlockFactory;
|
||||
use pocketmine\data\bedrock\EntityLegacyIds;
|
||||
use pocketmine\data\bedrock\EntityLegacyIds as LegacyIds;
|
||||
use pocketmine\data\bedrock\PotionTypeIdMap;
|
||||
use pocketmine\data\bedrock\PotionTypeIds;
|
||||
use pocketmine\data\SavedDataLoadingException;
|
||||
use pocketmine\entity\EntityDataHelper as Helper;
|
||||
use pocketmine\entity\object\ExperienceOrb;
|
||||
use pocketmine\entity\object\FallingBlock;
|
||||
use pocketmine\entity\object\ItemEntity;
|
||||
@ -81,20 +82,20 @@ final class EntityFactory{
|
||||
//TODO: index them by version to allow proper multi-save compatibility
|
||||
|
||||
$this->register(Arrow::class, function(World $world, CompoundTag $nbt) : Arrow{
|
||||
return new Arrow(EntityDataHelper::parseLocation($nbt, $world), null, $nbt->getByte(Arrow::TAG_CRIT, 0) === 1, $nbt);
|
||||
}, ['Arrow', 'minecraft:arrow'], EntityLegacyIds::ARROW);
|
||||
return new Arrow(Helper::parseLocation($nbt, $world), null, $nbt->getByte(Arrow::TAG_CRIT, 0) === 1, $nbt);
|
||||
}, ['Arrow', 'minecraft:arrow'], LegacyIds::ARROW);
|
||||
|
||||
$this->register(Egg::class, function(World $world, CompoundTag $nbt) : Egg{
|
||||
return new Egg(EntityDataHelper::parseLocation($nbt, $world), null, $nbt);
|
||||
}, ['Egg', 'minecraft:egg'], EntityLegacyIds::EGG);
|
||||
return new Egg(Helper::parseLocation($nbt, $world), null, $nbt);
|
||||
}, ['Egg', 'minecraft:egg'], LegacyIds::EGG);
|
||||
|
||||
$this->register(EnderPearl::class, function(World $world, CompoundTag $nbt) : EnderPearl{
|
||||
return new EnderPearl(EntityDataHelper::parseLocation($nbt, $world), null, $nbt);
|
||||
}, ['ThrownEnderpearl', 'minecraft:ender_pearl'], EntityLegacyIds::ENDER_PEARL);
|
||||
return new EnderPearl(Helper::parseLocation($nbt, $world), null, $nbt);
|
||||
}, ['ThrownEnderpearl', 'minecraft:ender_pearl'], LegacyIds::ENDER_PEARL);
|
||||
|
||||
$this->register(ExperienceBottle::class, function(World $world, CompoundTag $nbt) : ExperienceBottle{
|
||||
return new ExperienceBottle(EntityDataHelper::parseLocation($nbt, $world), null, $nbt);
|
||||
}, ['ThrownExpBottle', 'minecraft:xp_bottle'], EntityLegacyIds::XP_BOTTLE);
|
||||
return new ExperienceBottle(Helper::parseLocation($nbt, $world), null, $nbt);
|
||||
}, ['ThrownExpBottle', 'minecraft:xp_bottle'], LegacyIds::XP_BOTTLE);
|
||||
|
||||
$this->register(ExperienceOrb::class, function(World $world, CompoundTag $nbt) : ExperienceOrb{
|
||||
$value = 1;
|
||||
@ -104,12 +105,12 @@ final class EntityFactory{
|
||||
$value = $valuePeTag->getValue();
|
||||
}
|
||||
|
||||
return new ExperienceOrb(EntityDataHelper::parseLocation($nbt, $world), $value, $nbt);
|
||||
}, ['XPOrb', 'minecraft:xp_orb'], EntityLegacyIds::XP_ORB);
|
||||
return new ExperienceOrb(Helper::parseLocation($nbt, $world), $value, $nbt);
|
||||
}, ['XPOrb', 'minecraft:xp_orb'], LegacyIds::XP_ORB);
|
||||
|
||||
$this->register(FallingBlock::class, function(World $world, CompoundTag $nbt) : FallingBlock{
|
||||
return new FallingBlock(EntityDataHelper::parseLocation($nbt, $world), FallingBlock::parseBlockNBT(BlockFactory::getInstance(), $nbt), $nbt);
|
||||
}, ['FallingSand', 'minecraft:falling_block'], EntityLegacyIds::FALLING_BLOCK);
|
||||
return new FallingBlock(Helper::parseLocation($nbt, $world), FallingBlock::parseBlockNBT(BlockFactory::getInstance(), $nbt), $nbt);
|
||||
}, ['FallingSand', 'minecraft:falling_block'], LegacyIds::FALLING_BLOCK);
|
||||
|
||||
$this->register(ItemEntity::class, function(World $world, CompoundTag $nbt) : ItemEntity{
|
||||
$itemTag = $nbt->getCompoundTag("Item");
|
||||
@ -121,8 +122,8 @@ final class EntityFactory{
|
||||
if($item->isNull()){
|
||||
throw new SavedDataLoadingException("Item is invalid");
|
||||
}
|
||||
return new ItemEntity(EntityDataHelper::parseLocation($nbt, $world), $item, $nbt);
|
||||
}, ['Item', 'minecraft:item'], EntityLegacyIds::ITEM);
|
||||
return new ItemEntity(Helper::parseLocation($nbt, $world), $item, $nbt);
|
||||
}, ['Item', 'minecraft:item'], LegacyIds::ITEM);
|
||||
|
||||
$this->register(Painting::class, function(World $world, CompoundTag $nbt) : Painting{
|
||||
$motive = PaintingMotive::getMotiveByName($nbt->getString("Motive"));
|
||||
@ -138,39 +139,39 @@ final class EntityFactory{
|
||||
throw new SavedDataLoadingException("Missing facing info");
|
||||
}
|
||||
|
||||
return new Painting(EntityDataHelper::parseLocation($nbt, $world), $blockIn, $facing, $motive, $nbt);
|
||||
}, ['Painting', 'minecraft:painting'], EntityLegacyIds::PAINTING);
|
||||
return new Painting(Helper::parseLocation($nbt, $world), $blockIn, $facing, $motive, $nbt);
|
||||
}, ['Painting', 'minecraft:painting'], LegacyIds::PAINTING);
|
||||
|
||||
$this->register(PrimedTNT::class, function(World $world, CompoundTag $nbt) : PrimedTNT{
|
||||
return new PrimedTNT(EntityDataHelper::parseLocation($nbt, $world), $nbt);
|
||||
}, ['PrimedTnt', 'PrimedTNT', 'minecraft:tnt'], EntityLegacyIds::TNT);
|
||||
return new PrimedTNT(Helper::parseLocation($nbt, $world), $nbt);
|
||||
}, ['PrimedTnt', 'PrimedTNT', 'minecraft:tnt'], LegacyIds::TNT);
|
||||
|
||||
$this->register(Snowball::class, function(World $world, CompoundTag $nbt) : Snowball{
|
||||
return new Snowball(EntityDataHelper::parseLocation($nbt, $world), null, $nbt);
|
||||
}, ['Snowball', 'minecraft:snowball'], EntityLegacyIds::SNOWBALL);
|
||||
return new Snowball(Helper::parseLocation($nbt, $world), null, $nbt);
|
||||
}, ['Snowball', 'minecraft:snowball'], LegacyIds::SNOWBALL);
|
||||
|
||||
$this->register(SplashPotion::class, function(World $world, CompoundTag $nbt) : SplashPotion{
|
||||
$potionType = PotionTypeIdMap::getInstance()->fromId($nbt->getShort("PotionId", PotionTypeIds::WATER));
|
||||
if($potionType === null){
|
||||
throw new SavedDataLoadingException("No such potion type");
|
||||
}
|
||||
return new SplashPotion(EntityDataHelper::parseLocation($nbt, $world), null, $potionType, $nbt);
|
||||
}, ['ThrownPotion', 'minecraft:potion', 'thrownpotion'], EntityLegacyIds::SPLASH_POTION);
|
||||
return new SplashPotion(Helper::parseLocation($nbt, $world), null, $potionType, $nbt);
|
||||
}, ['ThrownPotion', 'minecraft:potion', 'thrownpotion'], LegacyIds::SPLASH_POTION);
|
||||
|
||||
$this->register(Squid::class, function(World $world, CompoundTag $nbt) : Squid{
|
||||
return new Squid(EntityDataHelper::parseLocation($nbt, $world), $nbt);
|
||||
}, ['Squid', 'minecraft:squid'], EntityLegacyIds::SQUID);
|
||||
return new Squid(Helper::parseLocation($nbt, $world), $nbt);
|
||||
}, ['Squid', 'minecraft:squid'], LegacyIds::SQUID);
|
||||
|
||||
$this->register(Villager::class, function(World $world, CompoundTag $nbt) : Villager{
|
||||
return new Villager(EntityDataHelper::parseLocation($nbt, $world), $nbt);
|
||||
}, ['Villager', 'minecraft:villager'], EntityLegacyIds::VILLAGER);
|
||||
return new Villager(Helper::parseLocation($nbt, $world), $nbt);
|
||||
}, ['Villager', 'minecraft:villager'], LegacyIds::VILLAGER);
|
||||
|
||||
$this->register(Zombie::class, function(World $world, CompoundTag $nbt) : Zombie{
|
||||
return new Zombie(EntityDataHelper::parseLocation($nbt, $world), $nbt);
|
||||
}, ['Zombie', 'minecraft:zombie'], EntityLegacyIds::ZOMBIE);
|
||||
return new Zombie(Helper::parseLocation($nbt, $world), $nbt);
|
||||
}, ['Zombie', 'minecraft:zombie'], LegacyIds::ZOMBIE);
|
||||
|
||||
$this->register(Human::class, function(World $world, CompoundTag $nbt) : Human{
|
||||
return new Human(EntityDataHelper::parseLocation($nbt, $world), Human::parseSkinNBT($nbt), $nbt);
|
||||
return new Human(Helper::parseLocation($nbt, $world), Human::parseSkinNBT($nbt), $nbt);
|
||||
}, ['Human']);
|
||||
|
||||
PaintingMotive::init();
|
||||
|
@ -55,6 +55,7 @@ use pocketmine\network\mcpe\protocol\types\DeviceOS;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\EntityIds;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\StringMetadataProperty;
|
||||
use pocketmine\network\mcpe\protocol\types\GameMode;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper;
|
||||
use pocketmine\network\mcpe\protocol\types\PlayerListEntry;
|
||||
use pocketmine\player\Player;
|
||||
@ -473,6 +474,7 @@ class Human extends Living implements ProjectileSource, InventoryHolder{
|
||||
$this->location->yaw,
|
||||
$this->location->yaw, //TODO: head yaw
|
||||
ItemStackWrapper::legacy(TypeConverter::getInstance()->coreItemStackToNet($this->getInventory()->getItemInHand())),
|
||||
GameMode::SURVIVAL,
|
||||
$this->getAllNetworkData(),
|
||||
AdventureSettingsPacket::create(0, 0, 0, 0, 0, $this->getId()), //TODO
|
||||
[], //TODO: entity links
|
||||
|
@ -27,6 +27,7 @@ use pocketmine\block\Block;
|
||||
use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\utils\Utils;
|
||||
|
||||
class BlockTeleportEvent extends BlockEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
@ -44,6 +45,7 @@ class BlockTeleportEvent extends BlockEvent implements Cancellable{
|
||||
}
|
||||
|
||||
public function setTo(Vector3 $to) : void{
|
||||
Utils::checkVector3NotInfOrNaN($to);
|
||||
$this->to = $to;
|
||||
}
|
||||
}
|
||||
|
71
src/event/block/BrewItemEvent.php
Normal file
71
src/event/block/BrewItemEvent.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\event\block;
|
||||
|
||||
use pocketmine\block\tile\BrewingStand;
|
||||
use pocketmine\crafting\BrewingRecipe;
|
||||
use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
use pocketmine\item\Item;
|
||||
|
||||
class BrewItemEvent extends BlockEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
||||
public function __construct(
|
||||
private BrewingStand $brewingStand,
|
||||
private int $slot,
|
||||
private Item $input,
|
||||
private Item $result,
|
||||
private BrewingRecipe $recipe
|
||||
){
|
||||
parent::__construct($brewingStand->getBlock());
|
||||
}
|
||||
|
||||
public function getBrewingStand() : BrewingStand{
|
||||
return $this->brewingStand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns which slot of the brewing stand's inventory the potion is in.
|
||||
*/
|
||||
public function getSlot() : int{
|
||||
return $this->slot;
|
||||
}
|
||||
|
||||
public function getInput() : Item{
|
||||
return clone $this->input;
|
||||
}
|
||||
|
||||
public function getResult() : Item{
|
||||
return clone $this->result;
|
||||
}
|
||||
|
||||
public function setResult(Item $result) : void{
|
||||
$this->result = clone $result;
|
||||
}
|
||||
|
||||
public function getRecipe() : BrewingRecipe{
|
||||
return $this->recipe;
|
||||
}
|
||||
}
|
64
src/event/block/BrewingFuelUseEvent.php
Normal file
64
src/event/block/BrewingFuelUseEvent.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\event\block;
|
||||
|
||||
use pocketmine\block\tile\BrewingStand;
|
||||
use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
|
||||
/**
|
||||
* Called when a brewing stand consumes a new fuel item.
|
||||
*/
|
||||
class BrewingFuelUseEvent extends BlockEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
||||
private int $fuelTime = 20;
|
||||
|
||||
public function __construct(
|
||||
private BrewingStand $brewingStand
|
||||
){
|
||||
parent::__construct($brewingStand->getBlock());
|
||||
}
|
||||
|
||||
public function getBrewingStand() : BrewingStand{
|
||||
return $this->brewingStand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns how many times the fuel can be used for potion brewing before it runs out.
|
||||
*/
|
||||
public function getFuelTime() : int{
|
||||
return $this->fuelTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets how many times the fuel can be used for potion brewing before it runs out.
|
||||
*/
|
||||
public function setFuelTime(int $fuelTime) : void{
|
||||
if($fuelTime <= 0){
|
||||
throw new \InvalidArgumentException("Fuel time must be positive");
|
||||
}
|
||||
$this->fuelTime = $fuelTime;
|
||||
}
|
||||
}
|
@ -26,6 +26,7 @@ namespace pocketmine\event\entity;
|
||||
use pocketmine\entity\Entity;
|
||||
use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
use pocketmine\utils\Utils;
|
||||
use pocketmine\world\Position;
|
||||
|
||||
/**
|
||||
@ -54,6 +55,7 @@ class EntityTeleportEvent extends EntityEvent implements Cancellable{
|
||||
}
|
||||
|
||||
public function setTo(Position $to) : void{
|
||||
Utils::checkVector3NotInfOrNaN($to);
|
||||
$this->to = $to;
|
||||
}
|
||||
}
|
||||
|
@ -53,9 +53,6 @@ class PlayerChangeSkinEvent extends PlayerEvent implements Cancellable{
|
||||
return $this->newSkin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \InvalidArgumentException if the specified skin is not valid
|
||||
*/
|
||||
public function setNewSkin(Skin $skin) : void{
|
||||
$this->newSkin = $skin;
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ use pocketmine\entity\Location;
|
||||
use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\utils\Utils;
|
||||
|
||||
class PlayerMoveEvent extends PlayerEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
@ -51,6 +52,7 @@ class PlayerMoveEvent extends PlayerEvent implements Cancellable{
|
||||
}
|
||||
|
||||
public function setTo(Location $to) : void{
|
||||
Utils::checkLocationNotInfOrNaN($to);
|
||||
$this->to = $to;
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ use function count;
|
||||
|
||||
/**
|
||||
* Called when a player connects to the server, prior to authentication taking place.
|
||||
* Cancelling this event will cause the player to be disconnected with the kick message set.
|
||||
* Set a kick reason to cancel the event and disconnect the player with the kick message set.
|
||||
*
|
||||
* This event should be used to decide if the player may continue to login to the server. Do things like checking
|
||||
* bans, whitelisting, server-full etc here.
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\event\player;
|
||||
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\utils\Utils;
|
||||
use pocketmine\world\Position;
|
||||
|
||||
/**
|
||||
@ -46,6 +47,7 @@ class PlayerRespawnEvent extends PlayerEvent{
|
||||
if(!$position->isValid()){
|
||||
throw new \InvalidArgumentException("Spawn position must reference a valid and loaded World");
|
||||
}
|
||||
Utils::checkVector3NotInfOrNaN($position);
|
||||
$this->position = $position;
|
||||
}
|
||||
}
|
||||
|
55
src/event/player/PlayerViewDistanceChangeEvent.php
Normal file
55
src/event/player/PlayerViewDistanceChangeEvent.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\event\player;
|
||||
|
||||
use pocketmine\player\Player;
|
||||
|
||||
/**
|
||||
* Called when a player requests a different viewing distance than the current one.
|
||||
*/
|
||||
class PlayerViewDistanceChangeEvent extends PlayerEvent{
|
||||
protected int $newDistance;
|
||||
protected int $oldDistance;
|
||||
|
||||
public function __construct(Player $player, int $oldDistance, int $newDistance){
|
||||
$this->player = $player;
|
||||
$this->oldDistance = $oldDistance;
|
||||
$this->newDistance = $newDistance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the new view radius, measured in chunks.
|
||||
*/
|
||||
public function getNewDistance() : int{
|
||||
return $this->newDistance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the old view radius, measured in chunks.
|
||||
* A value of -1 means that the player has just connected and did not have a view distance before this event.
|
||||
*/
|
||||
public function getOldDistance() : int{
|
||||
return $this->oldDistance;
|
||||
}
|
||||
}
|
@ -55,6 +55,25 @@ abstract class BaseInventory implements Inventory{
|
||||
return $this->maxStackSize;
|
||||
}
|
||||
|
||||
public function setMaxStackSize(int $size) : void{
|
||||
$this->maxStackSize = $size;
|
||||
}
|
||||
|
||||
abstract protected function internalSetItem(int $index, Item $item) : void;
|
||||
|
||||
public function setItem(int $index, Item $item) : void{
|
||||
if($item->isNull()){
|
||||
$item = VanillaItems::AIR();
|
||||
}else{
|
||||
$item = clone $item;
|
||||
}
|
||||
|
||||
$oldItem = $this->getItem($index);
|
||||
|
||||
$this->internalSetItem($index, $item);
|
||||
$this->onSlotChange($index, $oldItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Item[] $items
|
||||
*/
|
||||
@ -85,21 +104,6 @@ abstract class BaseInventory implements Inventory{
|
||||
$this->onContentChange($oldContents);
|
||||
}
|
||||
|
||||
abstract protected function internalSetItem(int $index, Item $item) : void;
|
||||
|
||||
public function setItem(int $index, Item $item) : void{
|
||||
if($item->isNull()){
|
||||
$item = VanillaItems::AIR();
|
||||
}else{
|
||||
$item = clone $item;
|
||||
}
|
||||
|
||||
$oldItem = $this->getItem($index);
|
||||
|
||||
$this->internalSetItem($index, $item);
|
||||
$this->onSlotChange($index, $oldItem);
|
||||
}
|
||||
|
||||
public function contains(Item $item) : bool{
|
||||
$count = max(1, $item->getCount());
|
||||
$checkDamage = !$item->hasAnyDamageValue();
|
||||
@ -128,18 +132,6 @@ abstract class BaseInventory implements Inventory{
|
||||
|
||||
return $slots;
|
||||
}
|
||||
|
||||
public function remove(Item $item) : void{
|
||||
$checkDamage = !$item->hasAnyDamageValue();
|
||||
$checkTags = $item->hasNamedTag();
|
||||
|
||||
foreach($this->getContents() as $index => $i){
|
||||
if($item->equals($i, $checkDamage, $checkTags)){
|
||||
$this->clear($index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function first(Item $item, bool $exact = false) : int{
|
||||
$count = $exact ? $item->getCount() : max(1, $item->getCount());
|
||||
$checkDamage = $exact || !$item->hasAnyDamageValue();
|
||||
@ -253,6 +245,17 @@ abstract class BaseInventory implements Inventory{
|
||||
return $slot;
|
||||
}
|
||||
|
||||
public function remove(Item $item) : void{
|
||||
$checkDamage = !$item->hasAnyDamageValue();
|
||||
$checkTags = $item->hasNamedTag();
|
||||
|
||||
foreach($this->getContents() as $index => $i){
|
||||
if($item->equals($i, $checkDamage, $checkTags)){
|
||||
$this->clear($index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function removeItem(Item ...$slots) : array{
|
||||
/** @var Item[] $itemSlots */
|
||||
/** @var Item[] $slots */
|
||||
@ -323,10 +326,6 @@ abstract class BaseInventory implements Inventory{
|
||||
}
|
||||
}
|
||||
|
||||
public function setMaxStackSize(int $size) : void{
|
||||
$this->maxStackSize = $size;
|
||||
}
|
||||
|
||||
public function onOpen(Player $who) : void{
|
||||
$this->viewers[spl_object_id($who)] = $who;
|
||||
}
|
||||
|
@ -46,6 +46,16 @@ interface Inventory{
|
||||
*/
|
||||
public function setItem(int $index, Item $item) : void;
|
||||
|
||||
/**
|
||||
* @return Item[]
|
||||
*/
|
||||
public function getContents(bool $includeEmpty = false) : array;
|
||||
|
||||
/**
|
||||
* @param Item[] $items
|
||||
*/
|
||||
public function setContents(array $items) : void;
|
||||
|
||||
/**
|
||||
* Stores the given Items in the inventory. This will try to fill
|
||||
* existing stacks and empty slots as well as it can.
|
||||
@ -66,24 +76,6 @@ interface Inventory{
|
||||
*/
|
||||
public function getAddableItemQuantity(Item $item) : int;
|
||||
|
||||
/**
|
||||
* Removes the given Item from the inventory.
|
||||
* It will return the Items that couldn't be removed.
|
||||
*
|
||||
* @return Item[]
|
||||
*/
|
||||
public function removeItem(Item ...$slots) : array;
|
||||
|
||||
/**
|
||||
* @return Item[]
|
||||
*/
|
||||
public function getContents(bool $includeEmpty = false) : array;
|
||||
|
||||
/**
|
||||
* @param Item[] $items
|
||||
*/
|
||||
public function setContents(array $items) : void;
|
||||
|
||||
/**
|
||||
* Checks if the inventory contains any Item with the same material data.
|
||||
* It will check id, amount, and metadata (if not null)
|
||||
@ -121,6 +113,14 @@ interface Inventory{
|
||||
*/
|
||||
public function remove(Item $item) : void;
|
||||
|
||||
/**
|
||||
* Removes the given Item from the inventory.
|
||||
* It will return the Items that couldn't be removed.
|
||||
*
|
||||
* @return Item[]
|
||||
*/
|
||||
public function removeItem(Item ...$slots) : array;
|
||||
|
||||
/**
|
||||
* Will clear a specific slot
|
||||
*/
|
||||
|
@ -49,7 +49,7 @@ class PlayerInventory extends SimpleInventory{
|
||||
}
|
||||
|
||||
public function isHotbarSlot(int $slot) : bool{
|
||||
return $slot >= 0 && $slot <= $this->getHotbarSize();
|
||||
return $slot >= 0 && $slot < $this->getHotbarSize();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,6 +52,10 @@ class SimpleInventory extends BaseInventory{
|
||||
return $this->slots[$index] !== null ? clone $this->slots[$index] : VanillaItems::AIR();
|
||||
}
|
||||
|
||||
protected function internalSetItem(int $index, Item $item) : void{
|
||||
$this->slots[$index] = $item->isNull() ? null : $item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Item[]
|
||||
*/
|
||||
@ -78,8 +82,4 @@ class SimpleInventory extends BaseInventory{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function internalSetItem(int $index, Item $item) : void{
|
||||
$this->slots[$index] = $item->isNull() ? null : $item;
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,9 @@ class DropItemAction extends InventoryAction{
|
||||
|
||||
public function onPreExecute(Player $source) : bool{
|
||||
$ev = new PlayerDropItemEvent($source, $this->targetItem);
|
||||
if($source->isSpectator()){
|
||||
$ev->cancel();
|
||||
}
|
||||
$ev->call();
|
||||
if($ev->isCancelled()){
|
||||
return false;
|
||||
|
@ -29,6 +29,7 @@ use pocketmine\block\utils\BannerPatternLayer;
|
||||
use pocketmine\block\utils\DyeColor;
|
||||
use pocketmine\data\bedrock\BannerPatternTypeIdMap;
|
||||
use pocketmine\data\bedrock\DyeColorIdMap;
|
||||
use pocketmine\nbt\NBT;
|
||||
use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\nbt\tag\ListTag;
|
||||
use function count;
|
||||
@ -98,7 +99,7 @@ class Banner extends ItemBlockWallOrFloor{
|
||||
$colorIdMap = DyeColorIdMap::getInstance();
|
||||
$patternIdMap = BannerPatternTypeIdMap::getInstance();
|
||||
$patterns = $tag->getListTag(self::TAG_PATTERNS);
|
||||
if($patterns !== null){
|
||||
if($patterns !== null && $patterns->getTagType() === NBT::TAG_Compound){
|
||||
/** @var CompoundTag $t */
|
||||
foreach($patterns as $t){
|
||||
$patternColor = $colorIdMap->fromInvertedId($t->getInt(self::TAG_PATTERN_COLOR)) ?? DyeColor::BLACK(); //TODO: missing pattern colour should be an error
|
||||
|
@ -306,7 +306,7 @@ class Item implements \JsonSerializable{
|
||||
|
||||
$this->canPlaceOn = [];
|
||||
$canPlaceOn = $tag->getListTag("CanPlaceOn");
|
||||
if($canPlaceOn !== null){
|
||||
if($canPlaceOn !== null && $canPlaceOn->getTagType() === NBT::TAG_String){
|
||||
/** @var StringTag $entry */
|
||||
foreach($canPlaceOn as $entry){
|
||||
$this->canPlaceOn[$entry->getValue()] = $entry->getValue();
|
||||
@ -314,7 +314,7 @@ class Item implements \JsonSerializable{
|
||||
}
|
||||
$this->canDestroy = [];
|
||||
$canDestroy = $tag->getListTag("CanDestroy");
|
||||
if($canDestroy !== null){
|
||||
if($canDestroy !== null && $canDestroy->getTagType() === NBT::TAG_String){
|
||||
/** @var StringTag $entry */
|
||||
foreach($canDestroy as $entry){
|
||||
$this->canDestroy[$entry->getValue()] = $entry->getValue();
|
||||
@ -659,8 +659,9 @@ class Item implements \JsonSerializable{
|
||||
->setByte("Count", Binary::signByte($this->count))
|
||||
->setShort("Damage", $this->getMeta());
|
||||
|
||||
if($this->hasNamedTag()){
|
||||
$result->setTag("tag", $this->getNamedTag());
|
||||
$tag = $this->getNamedTag();
|
||||
if($tag->count() > 0){
|
||||
$result->setTag("tag", $tag);
|
||||
}
|
||||
|
||||
if($slot !== -1){
|
||||
|
@ -49,7 +49,7 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock($prefix("bed"), fn() => VanillaBlocks::BED()->setColor($color));
|
||||
$result->registerBlock($prefix("carpet"), fn() => VanillaBlocks::CARPET()->setColor($color));
|
||||
$result->registerBlock($prefix("concrete"), fn() => VanillaBlocks::CONCRETE()->setColor($color));
|
||||
$result->registerBlock($prefix("concrete_powder"), fn() => VanillaBlocks::CONCRETE()->setColor($color));
|
||||
$result->registerBlock($prefix("concrete_powder"), fn() => VanillaBlocks::CONCRETE_POWDER()->setColor($color));
|
||||
$result->registerBlock($prefix("stained_clay"), fn() => VanillaBlocks::STAINED_CLAY()->setColor($color));
|
||||
$result->registerBlock($prefix("stained_glass"), fn() => VanillaBlocks::STAINED_GLASS()->setColor($color));
|
||||
$result->registerBlock($prefix("stained_glass_pane"), fn() => VanillaBlocks::STAINED_GLASS_PANE()->setColor($color));
|
||||
|
@ -1829,6 +1829,10 @@ final class KnownTranslationFactory{
|
||||
]);
|
||||
}
|
||||
|
||||
public static function pocketmine_plugin_mainClassAbstract() : Translatable{
|
||||
return new Translatable(KnownTranslationKeys::POCKETMINE_PLUGIN_MAINCLASSABSTRACT, []);
|
||||
}
|
||||
|
||||
public static function pocketmine_plugin_mainClassNotFound() : Translatable{
|
||||
return new Translatable(KnownTranslationKeys::POCKETMINE_PLUGIN_MAINCLASSNOTFOUND, []);
|
||||
}
|
||||
|
@ -379,6 +379,7 @@ final class KnownTranslationKeys{
|
||||
public const POCKETMINE_PLUGIN_INVALIDMANIFEST = "pocketmine.plugin.invalidManifest";
|
||||
public const POCKETMINE_PLUGIN_LOAD = "pocketmine.plugin.load";
|
||||
public const POCKETMINE_PLUGIN_LOADERROR = "pocketmine.plugin.loadError";
|
||||
public const POCKETMINE_PLUGIN_MAINCLASSABSTRACT = "pocketmine.plugin.mainClassAbstract";
|
||||
public const POCKETMINE_PLUGIN_MAINCLASSNOTFOUND = "pocketmine.plugin.mainClassNotFound";
|
||||
public const POCKETMINE_PLUGIN_MAINCLASSWRONGTYPE = "pocketmine.plugin.mainClassWrongType";
|
||||
public const POCKETMINE_PLUGIN_RESTRICTEDNAME = "pocketmine.plugin.restrictedName";
|
||||
|
@ -72,7 +72,7 @@ class ChunkRequestTask extends AsyncTask{
|
||||
$subCount = ChunkSerializer::getSubChunkCount($chunk) + ChunkSerializer::LOWER_PADDING_SIZE;
|
||||
$encoderContext = new PacketSerializerContext(GlobalItemTypeDictionary::getInstance()->getDictionary());
|
||||
$payload = ChunkSerializer::serializeFullChunk($chunk, RuntimeBlockMapping::getInstance(), $encoderContext, $this->tiles);
|
||||
$this->setResult($this->compressor->compress(PacketBatch::fromPackets($encoderContext, LevelChunkPacket::create($this->chunkX, $this->chunkZ, $subCount, null, $payload))->getBuffer()));
|
||||
$this->setResult($this->compressor->compress(PacketBatch::fromPackets($encoderContext, LevelChunkPacket::create($this->chunkX, $this->chunkZ, $subCount, false, null, $payload))->getBuffer()));
|
||||
}
|
||||
|
||||
public function onError() : void{
|
||||
|
@ -37,6 +37,7 @@ use pocketmine\inventory\Inventory;
|
||||
use pocketmine\inventory\transaction\action\SlotChangeAction;
|
||||
use pocketmine\inventory\transaction\InventoryTransaction;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\network\mcpe\convert\TypeConversionException;
|
||||
use pocketmine\network\mcpe\convert\TypeConverter;
|
||||
use pocketmine\network\mcpe\protocol\ClientboundPacket;
|
||||
use pocketmine\network\mcpe\protocol\ContainerClosePacket;
|
||||
@ -50,13 +51,17 @@ use pocketmine\network\mcpe\protocol\types\BlockPosition;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ContainerIds;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\CreativeContentEntry;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\WindowTypes;
|
||||
use pocketmine\network\PacketHandlingException;
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\utils\AssumptionFailedError;
|
||||
use pocketmine\utils\ObjectSet;
|
||||
use function array_map;
|
||||
use function array_search;
|
||||
use function get_class;
|
||||
use function max;
|
||||
use function spl_object_id;
|
||||
|
||||
/**
|
||||
* @phpstan-type ContainerOpenClosure \Closure(int $id, Inventory $inventory) : (list<ClientboundPacket>|null)
|
||||
@ -145,6 +150,24 @@ class InventoryManager{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param NetworkInventoryAction[] $networkInventoryActions
|
||||
* @throws PacketHandlingException
|
||||
*/
|
||||
public function addPredictedSlotChanges(array $networkInventoryActions) : void{
|
||||
foreach($networkInventoryActions as $action){
|
||||
if($action->sourceType === NetworkInventoryAction::SOURCE_CONTAINER && isset($this->windowMap[$action->windowId])){
|
||||
//this won't cover stuff like crafting grid due to too much magic
|
||||
try{
|
||||
$item = TypeConverter::getInstance()->netItemStackToCore($action->newItem->getItemStack());
|
||||
}catch(TypeConversionException $e){
|
||||
throw new PacketHandlingException($e->getMessage(), 0, $e);
|
||||
}
|
||||
$this->initiatedSlotChanges[$action->windowId][$action->inventorySlot] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function onCurrentWindowChange(Inventory $inventory) : void{
|
||||
$this->onCurrentWindowRemove();
|
||||
$this->add($this->lastInventoryNetworkId = max(ContainerIds::FIRST, ($this->lastInventoryNetworkId + 1) % self::RESERVED_WINDOW_ID_RANGE_START), $inventory);
|
||||
@ -283,6 +306,28 @@ class InventoryManager{
|
||||
}
|
||||
}
|
||||
|
||||
public function syncMismatchedPredictedSlotChanges() : void{
|
||||
foreach($this->initiatedSlotChanges as $windowId => $slots){
|
||||
if(!isset($this->windowMap[$windowId])){
|
||||
continue;
|
||||
}
|
||||
$inventory = $this->windowMap[$windowId];
|
||||
|
||||
foreach($slots as $slot => $expectedItem){
|
||||
if(!$inventory->slotExists($slot)){
|
||||
continue; //TODO: size desync ???
|
||||
}
|
||||
$actualItem = $inventory->getItem($slot);
|
||||
if(!$actualItem->equalsExact($expectedItem)){
|
||||
$this->session->getLogger()->debug("Detected prediction mismatch in inventory " . get_class($inventory) . "#" . spl_object_id($inventory) . " slot $slot");
|
||||
$this->syncSlot($inventory, $slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->initiatedSlotChanges = [];
|
||||
}
|
||||
|
||||
public function syncData(Inventory $inventory, int $propertyId, int $value) : void{
|
||||
$windowId = $this->getWindowId($inventory);
|
||||
if($windowId !== null){
|
||||
|
@ -124,12 +124,15 @@ use function count;
|
||||
use function get_class;
|
||||
use function in_array;
|
||||
use function json_encode;
|
||||
use function ksort;
|
||||
use function strcasecmp;
|
||||
use function strlen;
|
||||
use function strtolower;
|
||||
use function substr;
|
||||
use function time;
|
||||
use function ucfirst;
|
||||
use const JSON_THROW_ON_ERROR;
|
||||
use const SORT_NUMERIC;
|
||||
|
||||
class NetworkSession{
|
||||
private \PrefixedLogger $logger;
|
||||
@ -633,7 +636,7 @@ class NetworkSession{
|
||||
continue;
|
||||
}
|
||||
$info = $existingSession->getPlayerInfo();
|
||||
if($info !== null && ($info->getUsername() === $this->info->getUsername() || $info->getUuid()->equals($this->info->getUuid()))){
|
||||
if($info !== null && (strcasecmp($info->getUsername(), $this->info->getUsername()) === 0 || $info->getUuid()->equals($this->info->getUuid()))){
|
||||
if($kickForXUIDMismatch($info instanceof XboxLivePlayerInfo ? $info->getXuid() : "")){
|
||||
return;
|
||||
}
|
||||
@ -821,6 +824,9 @@ class NetworkSession{
|
||||
* @phpstan-param array<int, MetadataProperty> $properties
|
||||
*/
|
||||
public function syncActorData(Entity $entity, array $properties) : void{
|
||||
//TODO: HACK! as of 1.18.10, the client responds differently to the same data ordered in different orders - for
|
||||
//example, sending HEIGHT in the list before FLAGS when unsetting the SWIMMING flag results in a hitbox glitch
|
||||
ksort($properties, SORT_NUMERIC);
|
||||
$this->sendDataPacket(SetActorDataPacket::create($entity->getId(), $properties, 0));
|
||||
}
|
||||
|
||||
|
37
src/network/mcpe/cache/CraftingDataCache.php
vendored
37
src/network/mcpe/cache/CraftingDataCache.php
vendored
@ -26,12 +26,15 @@ namespace pocketmine\network\mcpe\cache;
|
||||
use pocketmine\crafting\CraftingManager;
|
||||
use pocketmine\crafting\FurnaceType;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\network\mcpe\convert\ItemTranslator;
|
||||
use pocketmine\network\mcpe\convert\TypeConverter;
|
||||
use pocketmine\network\mcpe\protocol\CraftingDataPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStack;
|
||||
use pocketmine\network\mcpe\protocol\types\recipe\CraftingRecipeBlockName;
|
||||
use pocketmine\network\mcpe\protocol\types\recipe\FurnaceRecipe as ProtocolFurnaceRecipe;
|
||||
use pocketmine\network\mcpe\protocol\types\recipe\FurnaceRecipeBlockName;
|
||||
use pocketmine\network\mcpe\protocol\types\recipe\PotionContainerChangeRecipe as ProtocolPotionContainerChangeRecipe;
|
||||
use pocketmine\network\mcpe\protocol\types\recipe\PotionTypeRecipe as ProtocolPotionTypeRecipe;
|
||||
use pocketmine\network\mcpe\protocol\types\recipe\RecipeIngredient;
|
||||
use pocketmine\network\mcpe\protocol\types\recipe\ShapedRecipe as ProtocolShapedRecipe;
|
||||
use pocketmine\network\mcpe\protocol\types\recipe\ShapelessRecipe as ProtocolShapelessRecipe;
|
||||
@ -137,7 +140,39 @@ final class CraftingDataCache{
|
||||
}
|
||||
}
|
||||
|
||||
$potionTypeRecipes = [];
|
||||
foreach($manager->getPotionTypeRecipes() as $recipes){
|
||||
foreach($recipes as $recipe){
|
||||
$input = $converter->coreItemStackToNet($recipe->getInput());
|
||||
$ingredient = $converter->coreItemStackToNet($recipe->getIngredient());
|
||||
$output = $converter->coreItemStackToNet($recipe->getOutput());
|
||||
$potionTypeRecipes[] = new ProtocolPotionTypeRecipe(
|
||||
$input->getId(),
|
||||
$input->getMeta(),
|
||||
$ingredient->getId(),
|
||||
$ingredient->getMeta(),
|
||||
$output->getId(),
|
||||
$output->getMeta()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$potionContainerChangeRecipes = [];
|
||||
$itemTranslator = ItemTranslator::getInstance();
|
||||
foreach($manager->getPotionContainerChangeRecipes() as $recipes){
|
||||
foreach($recipes as $recipe){
|
||||
$input = $itemTranslator->toNetworkId($recipe->getInputItemId(), 0);
|
||||
$ingredient = $itemTranslator->toNetworkId($recipe->getIngredient()->getId(), 0);
|
||||
$output = $itemTranslator->toNetworkId($recipe->getOutputItemId(), 0);
|
||||
$potionContainerChangeRecipes[] = new ProtocolPotionContainerChangeRecipe(
|
||||
$input[0],
|
||||
$ingredient[0],
|
||||
$output[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Timings::$craftingDataCacheRebuild->stopTiming();
|
||||
return CraftingDataPacket::create($recipesWithTypeIds, [], [], [], true);
|
||||
return CraftingDataPacket::create($recipesWithTypeIds, $potionTypeRecipes, $potionContainerChangeRecipes, [], true);
|
||||
}
|
||||
}
|
||||
|
@ -48,9 +48,16 @@ final class RuntimeBlockMapping{
|
||||
/** @var CompoundTag[] */
|
||||
private $bedrockKnownStates;
|
||||
|
||||
private function __construct(){
|
||||
private static function make() : self{
|
||||
return new self(
|
||||
Path::join(\pocketmine\BEDROCK_DATA_PATH, "canonical_block_states.nbt"),
|
||||
Path::join(\pocketmine\BEDROCK_DATA_PATH, "r12_to_current_block_map.bin")
|
||||
);
|
||||
}
|
||||
|
||||
public function __construct(string $canonicalBlockStatesFile, string $r12ToCurrentBlockMapFile){
|
||||
$stream = PacketSerializer::decoder(
|
||||
Utils::assumeNotFalse(file_get_contents(Path::join(\pocketmine\BEDROCK_DATA_PATH, "canonical_block_states.nbt")), "Missing required resource file"),
|
||||
Utils::assumeNotFalse(file_get_contents($canonicalBlockStatesFile), "Missing required resource file"),
|
||||
0,
|
||||
new PacketSerializerContext(GlobalItemTypeDictionary::getInstance()->getDictionary())
|
||||
);
|
||||
@ -60,15 +67,15 @@ final class RuntimeBlockMapping{
|
||||
}
|
||||
$this->bedrockKnownStates = $list;
|
||||
|
||||
$this->setupLegacyMappings();
|
||||
$this->setupLegacyMappings($r12ToCurrentBlockMapFile);
|
||||
}
|
||||
|
||||
private function setupLegacyMappings() : void{
|
||||
private function setupLegacyMappings(string $r12ToCurrentBlockMapFile) : void{
|
||||
$legacyIdMap = LegacyBlockIdToStringIdMap::getInstance();
|
||||
/** @var R12ToCurrentBlockMapEntry[] $legacyStateMap */
|
||||
$legacyStateMap = [];
|
||||
$legacyStateMapReader = PacketSerializer::decoder(
|
||||
Utils::assumeNotFalse(file_get_contents(Path::join(\pocketmine\BEDROCK_DATA_PATH, "r12_to_current_block_map.bin")), "Missing required resource file"),
|
||||
Utils::assumeNotFalse(file_get_contents($r12ToCurrentBlockMapFile), "Missing required resource file"),
|
||||
0,
|
||||
new PacketSerializerContext(GlobalItemTypeDictionary::getInstance()->getDictionary())
|
||||
);
|
||||
|
@ -232,6 +232,9 @@ class TypeConverter{
|
||||
$compound = null;
|
||||
}
|
||||
}
|
||||
if($meta < 0 || $meta >= 0x7fff){ //this meta value may have been restored from the NBT
|
||||
throw new TypeConversionException("Item meta must be in range 0 ... " . 0x7fff . " (received $meta)");
|
||||
}
|
||||
|
||||
try{
|
||||
return ItemFactory::getInstance()->get(
|
||||
|
@ -61,7 +61,7 @@ class EncryptionContext{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an EncryptionContext suitable for decrypting Minecraft packets from 1.16.200 and up.
|
||||
* Returns an EncryptionContext suitable for decrypting Minecraft packets from 1.16.220.50 (protocol version 429) and up.
|
||||
*
|
||||
* MCPE uses GCM, but without the auth tag, which defeats the whole purpose of using GCM.
|
||||
* GCM is just a wrapper around CTR which adds the auth tag, so CTR can replace GCM for this case.
|
||||
|
@ -228,15 +228,21 @@ class InGamePacketHandler extends PacketHandler{
|
||||
$this->player->jump();
|
||||
}
|
||||
|
||||
//TODO: this packet has WAYYYYY more useful information that we're not using
|
||||
$this->player->handleMovement($newPos);
|
||||
if(!$this->forceMoveSync){
|
||||
//TODO: this packet has WAYYYYY more useful information that we're not using
|
||||
$this->player->handleMovement($newPos);
|
||||
}
|
||||
|
||||
$packetHandled = true;
|
||||
|
||||
$useItemTransaction = $packet->getItemInteractionData();
|
||||
if($useItemTransaction !== null && !$this->handleUseItemTransaction($useItemTransaction->getTransactionData())){
|
||||
$packetHandled = false;
|
||||
$this->session->getLogger()->debug("Unhandled transaction in PlayerAuthInputPacket (type " . $useItemTransaction->getTransactionData()->getActionType() . ")");
|
||||
if($useItemTransaction !== null){
|
||||
if(!$this->handleUseItemTransaction($useItemTransaction->getTransactionData())){
|
||||
$packetHandled = false;
|
||||
$this->session->getLogger()->debug("Unhandled transaction in PlayerAuthInputPacket (type " . $useItemTransaction->getTransactionData()->getActionType() . ")");
|
||||
}else{
|
||||
$this->inventoryManager->syncMismatchedPredictedSlotChanges();
|
||||
}
|
||||
}
|
||||
|
||||
$blockActions = $packet->getBlockActions();
|
||||
@ -304,6 +310,8 @@ class InGamePacketHandler extends PacketHandler{
|
||||
|
||||
if(!$result){
|
||||
$this->inventoryManager->syncAll();
|
||||
}else{
|
||||
$this->inventoryManager->syncMismatchedPredictedSlotChanges();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
@ -411,6 +419,7 @@ class InGamePacketHandler extends PacketHandler{
|
||||
|
||||
private function handleUseItemTransaction(UseItemTransactionData $data) : bool{
|
||||
$this->player->selectHotbarSlot($data->getHotbarSlot());
|
||||
$this->inventoryManager->addPredictedSlotChanges($data->getActions());
|
||||
|
||||
switch($data->getActionType()){
|
||||
case UseItemTransactionData::ACTION_CLICK_BLOCK:
|
||||
@ -450,13 +459,10 @@ class InGamePacketHandler extends PacketHandler{
|
||||
if(!$this->player->consumeHeldItem()){
|
||||
$hungerAttr = $this->player->getAttributeMap()->get(Attribute::HUNGER) ?? throw new AssumptionFailedError();
|
||||
$hungerAttr->markSynchronized(false);
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if(!$this->player->useHeldItem()){
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
}
|
||||
$this->player->useHeldItem();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -476,7 +482,6 @@ class InGamePacketHandler extends PacketHandler{
|
||||
* Internal function used to execute rollbacks when an action fails on a block.
|
||||
*/
|
||||
private function onFailedBlockAction(Vector3 $blockPos, ?int $face) : void{
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
if($blockPos->distanceSquared($this->player->getLocation()) < 10000){
|
||||
$blocks = $blockPos->sidesArray();
|
||||
if($face !== null){
|
||||
@ -500,18 +505,15 @@ class InGamePacketHandler extends PacketHandler{
|
||||
}
|
||||
|
||||
$this->player->selectHotbarSlot($data->getHotbarSlot());
|
||||
$this->inventoryManager->addPredictedSlotChanges($data->getActions());
|
||||
|
||||
//TODO: use transactiondata for rollbacks here
|
||||
switch($data->getActionType()){
|
||||
case UseItemOnEntityTransactionData::ACTION_INTERACT:
|
||||
if(!$this->player->interactEntity($target, $data->getClickPosition())){
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
}
|
||||
$this->player->interactEntity($target, $data->getClickPosition());
|
||||
return true;
|
||||
case UseItemOnEntityTransactionData::ACTION_ATTACK:
|
||||
if(!$this->player->attackEntity($target)){
|
||||
$this->inventoryManager->syncSlot($this->player->getInventory(), $this->player->getInventory()->getHeldItemIndex());
|
||||
}
|
||||
$this->player->attackEntity($target);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -520,6 +522,7 @@ class InGamePacketHandler extends PacketHandler{
|
||||
|
||||
private function handleReleaseItemTransaction(ReleaseItemTransactionData $data) : bool{
|
||||
$this->player->selectHotbarSlot($data->getHotbarSlot());
|
||||
$this->inventoryManager->addPredictedSlotChanges($data->getActions());
|
||||
|
||||
//TODO: use transactiondata for rollbacks here (resending entire inventory is very wasteful)
|
||||
switch($data->getActionType()){
|
||||
|
@ -78,7 +78,7 @@ final class ChunkSerializer{
|
||||
|
||||
//TODO: right now we don't support 3D natively, so we just 3Dify our 2D biomes so they fill the column
|
||||
$encodedBiomePalette = self::serializeBiomesAsPalette($chunk);
|
||||
$stream->put(str_repeat($encodedBiomePalette, 25));
|
||||
$stream->put(str_repeat($encodedBiomePalette, 24));
|
||||
|
||||
$stream->putByte(0); //border block array count
|
||||
//Border block entry format: 1 byte (4 bits X, 4 bits Z). These are however useless since they crash the regular client.
|
||||
|
@ -174,7 +174,7 @@ class UPnP{
|
||||
'/upnp:controlURL'
|
||||
), "xpath query is borked");
|
||||
|
||||
if(count($xpathResult) === 0){
|
||||
if($xpathResult === null || count($xpathResult) === 0){
|
||||
throw new UPnPException("Your router does not support portforwarding");
|
||||
}
|
||||
$controlURL = (string) $xpathResult[0];
|
||||
|
@ -73,6 +73,7 @@ use pocketmine\event\player\PlayerToggleSneakEvent;
|
||||
use pocketmine\event\player\PlayerToggleSprintEvent;
|
||||
use pocketmine\event\player\PlayerToggleSwimEvent;
|
||||
use pocketmine\event\player\PlayerTransferEvent;
|
||||
use pocketmine\event\player\PlayerViewDistanceChangeEvent;
|
||||
use pocketmine\form\Form;
|
||||
use pocketmine\form\FormValidationException;
|
||||
use pocketmine\inventory\CallbackInventoryListener;
|
||||
@ -252,6 +253,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
protected bool $blockCollision = true;
|
||||
protected bool $flying = false;
|
||||
|
||||
/** @phpstan-var positive-int|null */
|
||||
protected ?int $lineHeight = null;
|
||||
protected string $locale = "en_US";
|
||||
|
||||
@ -311,6 +313,16 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
$this->setNameTag($this->username);
|
||||
}
|
||||
|
||||
private function callDummyItemHeldEvent() : void{
|
||||
$slot = $this->inventory->getHeldItemIndex();
|
||||
|
||||
$event = new PlayerItemHeldEvent($this, $this->inventory->getItem($slot), $slot);
|
||||
$event->call();
|
||||
//TODO: this event is actually cancellable, but cancelling it here has no meaningful result, so we
|
||||
//just ignore it. We fire this only because the content of the held slot changed, not because the
|
||||
//held slot index changed. We can't prevent that from here, and nor would it be sensible to.
|
||||
}
|
||||
|
||||
protected function initEntity(CompoundTag $nbt) : void{
|
||||
parent::initEntity($nbt);
|
||||
$this->addDefaultWindows();
|
||||
@ -319,10 +331,13 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
function(Inventory $unused, int $slot) : void{
|
||||
if($slot === $this->inventory->getHeldItemIndex()){
|
||||
$this->setUsingItem(false);
|
||||
|
||||
$this->callDummyItemHeldEvent();
|
||||
}
|
||||
},
|
||||
function() : void{
|
||||
$this->setUsingItem(false);
|
||||
$this->callDummyItemHeldEvent();
|
||||
}
|
||||
));
|
||||
|
||||
@ -507,7 +522,14 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
}
|
||||
|
||||
public function setViewDistance(int $distance) : void{
|
||||
$this->viewDistance = $this->server->getAllowedViewDistance($distance);
|
||||
$newViewDistance = $this->server->getAllowedViewDistance($distance);
|
||||
|
||||
if($newViewDistance !== $this->viewDistance){
|
||||
$ev = new PlayerViewDistanceChangeEvent($this, $this->viewDistance, $newViewDistance);
|
||||
$ev->call();
|
||||
}
|
||||
|
||||
$this->viewDistance = $newViewDistance;
|
||||
|
||||
$this->spawnThreshold = (int) (min($this->viewDistance, $this->server->getConfigGroup()->getPropertyInt("chunk-sending.spawn-radius", 4)) ** 2 * M_PI);
|
||||
|
||||
@ -1355,8 +1377,14 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
public function chat(string $message) : bool{
|
||||
$this->removeCurrentWindow();
|
||||
|
||||
//Fast length check, to make sure we don't get hung trying to explode MBs of string ...
|
||||
$maxTotalLength = $this->messageCounter * (self::MAX_CHAT_BYTE_LENGTH + 1);
|
||||
if(strlen($message) > $maxTotalLength){
|
||||
return false;
|
||||
}
|
||||
|
||||
$message = TextFormat::clean($message, false);
|
||||
foreach(explode("\n", $message) as $messagePart){
|
||||
foreach(explode("\n", $message, $this->messageCounter + 1) as $messagePart){
|
||||
if(trim($messagePart) !== "" && strlen($messagePart) <= self::MAX_CHAT_BYTE_LENGTH && mb_strlen($messagePart, 'UTF-8') <= self::MAX_CHAT_CHAR_LENGTH && $this->messageCounter-- > 0){
|
||||
if(strpos($messagePart, './') === 0){
|
||||
$messagePart = substr($messagePart, 1);
|
||||
@ -2287,7 +2315,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
|
||||
if($this->isCreative()
|
||||
&& $source->getCause() !== EntityDamageEvent::CAUSE_SUICIDE
|
||||
&& $source->getCause() !== EntityDamageEvent::CAUSE_VOID
|
||||
){
|
||||
$source->cancel();
|
||||
}elseif($this->allowFlight && $source->getCause() === EntityDamageEvent::CAUSE_FALL){
|
||||
|
@ -71,6 +71,7 @@ class DiskResourceProvider implements ResourceProvider{
|
||||
public function getResources() : array{
|
||||
$resources = [];
|
||||
if(is_dir($this->file)){
|
||||
/** @var \SplFileInfo $resource */
|
||||
foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->file)) as $resource){
|
||||
if($resource->isFile()){
|
||||
$path = str_replace(DIRECTORY_SEPARATOR, "/", substr((string) $resource, strlen($this->file)));
|
||||
|
@ -156,7 +156,7 @@ class PluginDescription{
|
||||
$k = $v;
|
||||
$v = "*";
|
||||
}
|
||||
$this->extensions[$k] = array_map('strval', is_array($v) ? $v : [$v]);
|
||||
$this->extensions[(string) $k] = array_map('strval', is_array($v) ? $v : [$v]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,6 +166,14 @@ class PluginManager{
|
||||
)));
|
||||
return null;
|
||||
}
|
||||
$reflect = new \ReflectionClass($mainClass); //this shouldn't throw; we already checked that it exists
|
||||
if(!$reflect->isInstantiable()){
|
||||
$this->server->getLogger()->error($language->translate(KnownTranslationFactory::pocketmine_plugin_loadError(
|
||||
$description->getName(),
|
||||
KnownTranslationFactory::pocketmine_plugin_mainClassAbstract()
|
||||
)));
|
||||
return null;
|
||||
}
|
||||
|
||||
$permManager = PermissionManager::getInstance();
|
||||
foreach($description->getPermissions() as $permsGroup){
|
||||
@ -435,10 +443,11 @@ class PluginManager{
|
||||
|
||||
$plugin->getScheduler()->setEnabled(true);
|
||||
$plugin->onEnableStateChange(true);
|
||||
if($plugin->isEnabled()){ //the plugin may have disabled itself during onEnable()
|
||||
$this->enabledPlugins[$plugin->getDescription()->getName()] = $plugin;
|
||||
|
||||
$this->enabledPlugins[$plugin->getDescription()->getName()] = $plugin;
|
||||
|
||||
(new PluginEnableEvent($plugin))->call();
|
||||
(new PluginEnableEvent($plugin))->call();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -462,8 +471,12 @@ class PluginManager{
|
||||
}
|
||||
|
||||
public function tickSchedulers(int $currentTick) : void{
|
||||
foreach($this->enabledPlugins as $p){
|
||||
$p->getScheduler()->mainThreadHeartbeat($currentTick);
|
||||
foreach($this->enabledPlugins as $pluginName => $p){
|
||||
if(isset($this->enabledPlugins[$pluginName])){
|
||||
//the plugin may have been disabled as a result of updating other plugins' schedulers, and therefore
|
||||
//removed from enabledPlugins; however, foreach will still see it due to copy-on-write
|
||||
$p->getScheduler()->mainThreadHeartbeat($currentTick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,13 @@ class ZippedResourcePack implements ResourcePack{
|
||||
if(!file_exists($zipPath)){
|
||||
throw new ResourcePackException("File not found");
|
||||
}
|
||||
$size = filesize($zipPath);
|
||||
if($size === false){
|
||||
throw new ResourcePackException("Unable to determine size of file");
|
||||
}
|
||||
if($size === 0){
|
||||
throw new ResourcePackException("Empty file, probably corrupted");
|
||||
}
|
||||
|
||||
$archive = new \ZipArchive();
|
||||
if(($openResult = $archive->open($zipPath)) !== true){
|
||||
@ -106,7 +113,6 @@ class ZippedResourcePack implements ResourcePack{
|
||||
}
|
||||
|
||||
$mapper = new \JsonMapper();
|
||||
$mapper->bExceptionOnUndefinedProperty = true;
|
||||
$mapper->bExceptionOnMissingData = true;
|
||||
|
||||
try{
|
||||
|
@ -130,6 +130,9 @@ class TaskScheduler{
|
||||
}
|
||||
|
||||
public function mainThreadHeartbeat(int $currentTick) : void{
|
||||
if(!$this->enabled){
|
||||
throw new \LogicException("Cannot run heartbeat on a disabled scheduler");
|
||||
}
|
||||
$this->currentTick = $currentTick;
|
||||
while($this->isReady($this->currentTick)){
|
||||
/** @var TaskHandler $task */
|
||||
|
@ -64,6 +64,9 @@ class ThreadManager extends \Volatile{
|
||||
*/
|
||||
public function getAll() : array{
|
||||
$array = [];
|
||||
/**
|
||||
* @var Worker|Thread $thread
|
||||
*/
|
||||
foreach($this as $key => $thread){
|
||||
$array[$key] = $thread;
|
||||
}
|
||||
|
@ -23,8 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\utils;
|
||||
|
||||
use function preg_match;
|
||||
|
||||
trait EnumTrait{
|
||||
use RegistryTrait;
|
||||
use NotCloneable;
|
||||
@ -70,9 +68,7 @@ trait EnumTrait{
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
private function __construct(string $enumName){
|
||||
if(preg_match('/^\D[A-Za-z\d_]+$/u', $enumName, $matches) === 0){
|
||||
throw new \InvalidArgumentException("Invalid enum member name \"$enumName\", should only contain letters, numbers and underscores, and must not start with a number");
|
||||
}
|
||||
self::verifyName($enumName);
|
||||
$this->enumName = $enumName;
|
||||
if(self::$nextId === null){
|
||||
self::$nextId = Process::pid(); //this provides enough base entropy to prevent hardcoding
|
||||
|
@ -32,7 +32,6 @@ use function curl_getinfo;
|
||||
use function curl_init;
|
||||
use function curl_setopt_array;
|
||||
use function explode;
|
||||
use function is_int;
|
||||
use function is_string;
|
||||
use function preg_match;
|
||||
use function socket_close;
|
||||
@ -160,7 +159,7 @@ class Internet{
|
||||
*
|
||||
* @param string[]|string $args
|
||||
* @param string[] $extraHeaders
|
||||
* @param string|null $err reference parameter, will be set to the output of curl_error(). Use this to retrieve errors that occured during the operation.
|
||||
* @param string|null $err reference parameter, will be set to the output of curl_error(). Use this to retrieve errors that occurred during the operation.
|
||||
* @phpstan-param string|array<string, string> $args
|
||||
* @phpstan-param list<string> $extraHeaders
|
||||
*/
|
||||
@ -220,7 +219,6 @@ class Internet{
|
||||
}
|
||||
if(!is_string($raw)) throw new AssumptionFailedError("curl_exec() should return string|false when CURLOPT_RETURNTRANSFER is set");
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
if(!is_int($httpCode)) throw new AssumptionFailedError("curl_getinfo(CURLINFO_HTTP_CODE) always returns int");
|
||||
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||
$rawHeaders = substr($raw, 0, $headerSize);
|
||||
$body = substr($raw, $headerSize);
|
||||
|
@ -26,17 +26,25 @@ namespace pocketmine\utils;
|
||||
use function array_map;
|
||||
use function count;
|
||||
use function mb_strtoupper;
|
||||
use function preg_match;
|
||||
|
||||
trait RegistryTrait{
|
||||
/** @var object[] */
|
||||
private static $members = null;
|
||||
|
||||
private static function verifyName(string $name) : void{
|
||||
if(preg_match('/^(?!\d)[A-Za-z\d_]+$/u', $name) === 0){
|
||||
throw new \InvalidArgumentException("Invalid member name \"$name\", should only contain letters, numbers and underscores, and must not start with a number");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the given object to the registry.
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
private static function _registryRegister(string $name, object $member) : void{
|
||||
self::verifyName($name);
|
||||
$upperName = mb_strtoupper($name);
|
||||
if(isset(self::$members[$upperName])){
|
||||
throw new \InvalidArgumentException("\"$upperName\" is already reserved");
|
||||
|
@ -28,7 +28,9 @@ declare(strict_types=1);
|
||||
namespace pocketmine\utils;
|
||||
|
||||
use DaveRandom\CallbackValidator\CallbackType;
|
||||
use pocketmine\entity\Location;
|
||||
use pocketmine\errorhandler\ErrorTypeToStringMap;
|
||||
use pocketmine\math\Vector3;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Ramsey\Uuid\UuidInterface;
|
||||
use function array_combine;
|
||||
@ -57,7 +59,9 @@ use function interface_exists;
|
||||
use function is_a;
|
||||
use function is_array;
|
||||
use function is_bool;
|
||||
use function is_infinite;
|
||||
use function is_int;
|
||||
use function is_nan;
|
||||
use function is_object;
|
||||
use function is_string;
|
||||
use function mb_check_encoding;
|
||||
@ -602,4 +606,27 @@ final class Utils{
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function checkFloatNotInfOrNaN(string $name, float $float) : void{
|
||||
if(is_nan($float)){
|
||||
throw new \InvalidArgumentException("$name cannot be NaN");
|
||||
}
|
||||
if(is_infinite($float)){
|
||||
throw new \InvalidArgumentException("$name cannot be infinite");
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkVector3NotInfOrNaN(Vector3 $vector3) : void{
|
||||
if($vector3 instanceof Location){ //location could be masquerading as vector3
|
||||
self::checkFloatNotInfOrNaN("yaw", $vector3->yaw);
|
||||
self::checkFloatNotInfOrNaN("pitch", $vector3->pitch);
|
||||
}
|
||||
self::checkFloatNotInfOrNaN("x", $vector3->x);
|
||||
self::checkFloatNotInfOrNaN("y", $vector3->y);
|
||||
self::checkFloatNotInfOrNaN("z", $vector3->z);
|
||||
}
|
||||
|
||||
public static function checkLocationNotInfOrNaN(Location $location) : void{
|
||||
self::checkVector3NotInfOrNaN($location);
|
||||
}
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ class World implements ChunkManager{
|
||||
|
||||
foreach(BlockFactory::getInstance()->getAllKnownStates() as $state){
|
||||
$dontTickName = $dontTickBlocks[$state->getTypeId()] ?? null;
|
||||
if($dontTickName === null && !$state->ticksRandomly()){
|
||||
if($dontTickName === null && $state->ticksRandomly()){
|
||||
$this->randomTickBlocks[$state->getFullId()] = true;
|
||||
}
|
||||
}
|
||||
@ -971,6 +971,8 @@ class World implements ChunkManager{
|
||||
public function createBlockUpdatePackets(array $blocks) : array{
|
||||
$packets = [];
|
||||
|
||||
$blockMapping = RuntimeBlockMapping::getInstance();
|
||||
|
||||
foreach($blocks as $b){
|
||||
if(!($b instanceof Vector3)){
|
||||
throw new \TypeError("Expected Vector3 in blocks array, got " . (is_object($b) ? get_class($b) : gettype($b)));
|
||||
@ -980,7 +982,7 @@ class World implements ChunkManager{
|
||||
$blockPosition = BlockPosition::fromVector3($b);
|
||||
$packets[] = UpdateBlockPacket::create(
|
||||
$blockPosition,
|
||||
RuntimeBlockMapping::getInstance()->toRuntimeId($fullBlock->getFullId()),
|
||||
$blockMapping->toRuntimeId($fullBlock->getFullId()),
|
||||
UpdateBlockPacket::FLAG_NETWORK,
|
||||
UpdateBlockPacket::DATA_LAYER_NORMAL
|
||||
);
|
||||
@ -1129,6 +1131,7 @@ class World implements ChunkManager{
|
||||
$entity->onRandomUpdate();
|
||||
}
|
||||
|
||||
$blockFactory = BlockFactory::getInstance();
|
||||
foreach($chunk->getSubChunks() as $Y => $subChunk){
|
||||
if(!$subChunk->isEmptyFast()){
|
||||
$k = 0;
|
||||
@ -1145,8 +1148,7 @@ class World implements ChunkManager{
|
||||
$state = $subChunk->getFullBlock($x, $y, $z);
|
||||
|
||||
if(isset($this->randomTickBlocks[$state])){
|
||||
/** @var Block $block */
|
||||
$block = BlockFactory::getInstance()->fromFullBlock($state);
|
||||
$block = $blockFactory->fromFullBlock($state);
|
||||
$block->position($this, $chunkX * Chunk::EDGE_LENGTH + $x, ($Y << SubChunk::COORD_BIT_SIZE) + $y, $chunkZ * Chunk::EDGE_LENGTH + $z);
|
||||
$block->onRandomTick();
|
||||
}
|
||||
@ -2651,8 +2653,13 @@ class World implements ChunkManager{
|
||||
unset($this->changedBlocks[$chunkHash]);
|
||||
|
||||
if(array_key_exists($chunkHash, $this->chunkPopulationRequestMap)){
|
||||
$this->logger->debug("Rejecting population promise for chunk $x $z");
|
||||
$this->chunkPopulationRequestMap[$chunkHash]->reject();
|
||||
unset($this->chunkPopulationRequestMap[$chunkHash]);
|
||||
if(isset($this->activeChunkPopulationTasks[$chunkHash])){
|
||||
$this->logger->debug("Marking population task for chunk $x $z as orphaned");
|
||||
$this->activeChunkPopulationTasks[$chunkHash] = false;
|
||||
}
|
||||
}
|
||||
|
||||
$this->timings->doChunkUnload->stopTiming();
|
||||
@ -2828,7 +2835,7 @@ class World implements ChunkManager{
|
||||
unset($this->chunkPopulationRequestQueueIndex[$nextChunkHash]);
|
||||
World::getXZ($nextChunkHash, $nextChunkX, $nextChunkZ);
|
||||
if(isset($this->chunkPopulationRequestMap[$nextChunkHash])){
|
||||
assert(!isset($this->activeChunkPopulationTasks[$nextChunkHash]), "Population for chunk $nextChunkX $nextChunkZ already running");
|
||||
assert(!($this->activeChunkPopulationTasks[$nextChunkHash] ?? false), "Population for chunk $nextChunkX $nextChunkZ already running");
|
||||
if(
|
||||
!$this->orderChunkPopulation($nextChunkX, $nextChunkZ, null)->isResolved() &&
|
||||
!isset($this->activeChunkPopulationTasks[$nextChunkHash])
|
||||
@ -2997,10 +3004,13 @@ class World implements ChunkManager{
|
||||
}
|
||||
|
||||
$index = World::chunkHash($x, $z);
|
||||
if(!isset($this->chunkPopulationRequestMap[$index])){
|
||||
$this->logger->debug("Discarding population result for chunk x=$x,z=$z - promise was already broken");
|
||||
if(!isset($this->activeChunkPopulationTasks[$index])){
|
||||
throw new AssumptionFailedError("This should always be set, regardless of whether the task was orphaned or not");
|
||||
}
|
||||
if(!$this->activeChunkPopulationTasks[$index]){
|
||||
$this->logger->debug("Discarding orphaned population result for chunk x=$x,z=$z");
|
||||
unset($this->activeChunkPopulationTasks[$index]);
|
||||
}elseif(isset($this->activeChunkPopulationTasks[$index])){
|
||||
}else{
|
||||
if($dirtyChunks === 0){
|
||||
$oldChunk = $this->loadChunk($x, $z);
|
||||
$this->setChunk($x, $z, $chunk);
|
||||
|
@ -153,16 +153,18 @@ class WorldManager{
|
||||
}
|
||||
|
||||
$this->server->getLogger()->info($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_level_unloading($world->getDisplayName())));
|
||||
try{
|
||||
$safeSpawn = $this->defaultWorld !== null ? $this->defaultWorld->getSafeSpawn() : null;
|
||||
}catch(WorldException $e){
|
||||
$safeSpawn = null;
|
||||
}
|
||||
foreach($world->getPlayers() as $player){
|
||||
if($world === $this->defaultWorld || $safeSpawn === null){
|
||||
$player->disconnect("Forced default world unload");
|
||||
}else{
|
||||
$player->teleport($safeSpawn);
|
||||
if(count($world->getPlayers()) !== 0){
|
||||
try{
|
||||
$safeSpawn = $this->defaultWorld !== null && $this->defaultWorld !== $world ? $this->defaultWorld->getSafeSpawn() : null;
|
||||
}catch(WorldException $e){
|
||||
$safeSpawn = null;
|
||||
}
|
||||
foreach($world->getPlayers() as $player){
|
||||
if($safeSpawn === null){
|
||||
$player->disconnect("Forced default world unload");
|
||||
}else{
|
||||
$player->teleport($safeSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,14 +29,12 @@ use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\nbt\tag\IntTag;
|
||||
use pocketmine\nbt\tag\StringTag;
|
||||
use pocketmine\nbt\TreeRoot;
|
||||
use pocketmine\network\mcpe\protocol\ProtocolInfo;
|
||||
use pocketmine\utils\Binary;
|
||||
use pocketmine\utils\Filesystem;
|
||||
use pocketmine\utils\Limits;
|
||||
use pocketmine\world\format\io\exception\CorruptedWorldException;
|
||||
use pocketmine\world\format\io\exception\UnsupportedWorldFormatException;
|
||||
use pocketmine\world\generator\Flat;
|
||||
use pocketmine\world\generator\Generator;
|
||||
use pocketmine\world\generator\GeneratorManager;
|
||||
use pocketmine\world\World;
|
||||
use pocketmine\world\WorldCreationOptions;
|
||||
@ -50,6 +48,12 @@ use function time;
|
||||
class BedrockWorldData extends BaseNbtWorldData{
|
||||
|
||||
public const CURRENT_STORAGE_VERSION = 8;
|
||||
/**
|
||||
* WARNING: In the future, this should be only as high as the newest world format currently supported. We don't
|
||||
* actually support worlds from 1.18.10 yet, but due to an old stupid bug, all worlds created by PM will report this
|
||||
* version.
|
||||
*/
|
||||
public const CURRENT_STORAGE_NETWORK_VERSION = 486; // 1.18.10
|
||||
|
||||
public const GENERATOR_LIMITED = 0;
|
||||
public const GENERATOR_INFINITE = 1;
|
||||
@ -74,7 +78,7 @@ class BedrockWorldData extends BaseNbtWorldData{
|
||||
->setInt("Generator", $generatorType)
|
||||
->setLong("LastPlayed", time())
|
||||
->setString("LevelName", $name)
|
||||
->setInt("NetworkVersion", ProtocolInfo::CURRENT_PROTOCOL)
|
||||
->setInt("NetworkVersion", self::CURRENT_STORAGE_NETWORK_VERSION)
|
||||
//->setInt("Platform", 2) //TODO: find out what the possible values are for
|
||||
->setLong("RandomSeed", $options->getSeed())
|
||||
->setInt("SpawnX", $options->getSpawnPosition()->getFloorX())
|
||||
@ -161,7 +165,7 @@ class BedrockWorldData extends BaseNbtWorldData{
|
||||
}
|
||||
|
||||
public function save() : void{
|
||||
$this->compoundTag->setInt("NetworkVersion", ProtocolInfo::CURRENT_PROTOCOL);
|
||||
$this->compoundTag->setInt("NetworkVersion", self::CURRENT_STORAGE_NETWORK_VERSION);
|
||||
$this->compoundTag->setInt("StorageVersion", self::CURRENT_STORAGE_VERSION);
|
||||
|
||||
$nbt = new LittleEndianNbtSerializer();
|
||||
|
@ -263,6 +263,7 @@ class LevelDB extends BaseWorldProvider implements WritableWorldProvider{
|
||||
case 11: //MCPE 1.11.0.1 beta (???)
|
||||
case 10: //MCPE 1.9 (???)
|
||||
case 9: //MCPE 1.8 (???)
|
||||
case 8: //MCPE 1.2.13 (paletted subchunks)
|
||||
case 7: //MCPE 1.2 (???)
|
||||
case 6: //MCPE 1.2.0.2 beta (???)
|
||||
case 4: //MCPE 1.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user