From 7e3d099d5b5668eedfecd6b3ea63fe7cbd6df35a Mon Sep 17 00:00:00 2001 From: Dylan T Date: Tue, 17 May 2022 15:08:52 +0100 Subject: [PATCH 01/10] Update dependabot.yml --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b33ae2404..9bc4bc073 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,3 +11,8 @@ updates: directory: "/" schedule: interval: daily + +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily From dea7031b8667037f5d80bc6ad113205f53f971cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 15:15:52 +0100 Subject: [PATCH 02/10] Bump actions/cache from 2 to 3 (#5044) Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/draft-release.yml | 2 +- .github/workflows/main.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 71363897c..beeca4275 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -23,7 +23,7 @@ jobs: php-version: 8.0 - name: Restore Composer package cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.cache/composer/files diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 896887b49..b34de0af6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,7 @@ jobs: run: curl -sS https://getcomposer.org/installer | php - name: Restore Composer package cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.cache/composer/files @@ -84,7 +84,7 @@ jobs: run: curl -sS https://getcomposer.org/installer | php - name: Restore Composer package cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.cache/composer/files @@ -124,7 +124,7 @@ jobs: run: curl -sS https://getcomposer.org/installer | php - name: Restore Composer package cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.cache/composer/files @@ -162,7 +162,7 @@ jobs: run: curl -sS https://getcomposer.org/installer | php - name: Restore Composer package cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.cache/composer/files From e767796986fe5efa163f99e7715452646770cfc1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 15:16:08 +0100 Subject: [PATCH 03/10] Bump shivammathur/setup-php from 2.12.0 to 2.18.1 (#5043) Bumps [shivammathur/setup-php](https://github.com/shivammathur/setup-php) from 2.12.0 to 2.18.1. - [Release notes](https://github.com/shivammathur/setup-php/releases) - [Commits](https://github.com/shivammathur/setup-php/compare/2.12.0...2.18.1) --- updated-dependencies: - dependency-name: shivammathur/setup-php dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/draft-release.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index beeca4275..5bb71b50c 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -18,7 +18,7 @@ jobs: submodules: true - name: Setup PHP - uses: shivammathur/setup-php@2.12.0 + uses: shivammathur/setup-php@2.18.1 with: php-version: 8.0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b34de0af6..cfae71681 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -195,7 +195,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup PHP and tools - uses: shivammathur/setup-php@2.15.0 + uses: shivammathur/setup-php@2.18.1 with: php-version: 8.0 tools: php-cs-fixer:3.2 From 80d4c1106109af3d9b9f5b85b634cf1e8f34a7ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 15:17:33 +0100 Subject: [PATCH 04/10] Bump ncipollo/release-action from 1.8.6 to 1.10.0 (#5040) Bumps [ncipollo/release-action](https://github.com/ncipollo/release-action) from 1.8.6 to 1.10.0. - [Release notes](https://github.com/ncipollo/release-action/releases) - [Commits](https://github.com/ncipollo/release-action/compare/v1.8.6...v1.10.0) --- updated-dependencies: - dependency-name: ncipollo/release-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/draft-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 5bb71b50c..df0088347 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -69,7 +69,7 @@ jobs: ${{ github.workspace }}/build_info.json - name: Create draft release - uses: ncipollo/release-action@v1.8.6 + uses: ncipollo/release-action@v1.10.0 with: artifacts: ${{ github.workspace }}/PocketMine-MP.phar,${{ github.workspace }}/start.*,${{ github.workspace }}/build_info.json commit: ${{ github.sha }} From ab41594da28eddbeb48bf10c7f25dedf4731ea36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 15:24:23 +0100 Subject: [PATCH 05/10] Bump actions/checkout from 2 to 3 (#5041) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-docker-image.yml | 2 +- .github/workflows/draft-release.yml | 2 +- .github/workflows/main.yml | 10 +++++----- .github/workflows/update-updater-api.yml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 214f232d9..1d8d7da8d 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -21,7 +21,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Clone pmmp/PocketMine-Docker repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: pmmp/PocketMine-Docker fetch-depth: 1 diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index df0088347..aa9f44545 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cfae71681..f501ba425 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,7 @@ jobs: php: [8.0.18] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440 @@ -72,7 +72,7 @@ jobs: php: [8.0.18] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440 @@ -110,7 +110,7 @@ jobs: php: [8.0.18] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true @@ -150,7 +150,7 @@ jobs: php: [8.0.18] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP uses: pmmp/setup-php-action@aa636a4fe0c1c035fd9a3f05e360eadd86e06440 @@ -192,7 +192,7 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP and tools uses: shivammathur/setup-php@2.18.1 diff --git a/.github/workflows/update-updater-api.yml b/.github/workflows/update-updater-api.yml index 0d8fe3a8a..aaac9b4d2 100644 --- a/.github/workflows/update-updater-api.yml +++ b/.github/workflows/update-updater-api.yml @@ -13,7 +13,7 @@ jobs: - name: Install jq run: sudo apt update && sudo apt install jq -y - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: repository: pmmp/update.pmmp.io ssh-key: ${{ secrets.UPDATE_PMMP_IO_DEPLOY_KEY }} From 161ab5af169acd80ae5e4d7fd16aef12e38cb1b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 15:24:47 +0100 Subject: [PATCH 06/10] Bump docker/setup-buildx-action from 1 to 2 (#5042) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 1d8d7da8d..41fba3e57 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub uses: docker/login-action@v1 From 30815bc8a26902a56552dafe5cb98e6528dc6344 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 May 2022 13:29:19 +0100 Subject: [PATCH 07/10] Bump actions/upload-artifact from 2 to 3 (#5047) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/draft-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index aa9f44545..eed290607 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -60,7 +60,7 @@ jobs: run: php build/generate-build-info-json.php ${{ github.sha }} ${{ steps.get-pm-version.outputs.PM_VERSION }} ${{ github.repository }} ${{ steps.build-number.outputs.BUILD_NUMBER }} > build_info.json - name: Upload release artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: release_artifacts path: | From 79caba22a72c2c547f2cf1bf8c5c901fe73d4998 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 May 2022 13:29:44 +0100 Subject: [PATCH 08/10] Bump docker/build-push-action from 2.10.0 to 3.0.0 (#5046) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.10.0 to 3.0.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2.10.0...v3.0.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-docker-image.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 41fba3e57..cf2abd4b2 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -46,7 +46,7 @@ jobs: run: echo ::set-output name=NAME::$(echo "${GITHUB_REPOSITORY,,}") - name: Build image for tag - uses: docker/build-push-action@v2.10.0 + uses: docker/build-push-action@v3.0.0 with: push: true context: ./pocketmine-mp @@ -59,7 +59,7 @@ jobs: - name: Build image for major tag if: steps.channel.outputs.CHANNEL == 'stable' - uses: docker/build-push-action@v2.10.0 + uses: docker/build-push-action@v3.0.0 with: push: true context: ./pocketmine-mp @@ -72,7 +72,7 @@ jobs: - name: Build image for minor tag if: steps.channel.outputs.CHANNEL == 'stable' - uses: docker/build-push-action@v2.10.0 + uses: docker/build-push-action@v3.0.0 with: push: true context: ./pocketmine-mp @@ -85,7 +85,7 @@ jobs: - name: Build image for latest tag if: steps.channel.outputs.CHANNEL == 'stable' - uses: docker/build-push-action@v2.10.0 + uses: docker/build-push-action@v3.0.0 with: push: true context: ./pocketmine-mp From a323a5e56d97efa656bac7c695aee2a309f10d86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 May 2022 13:30:39 +0100 Subject: [PATCH 09/10] Bump docker/login-action from 1 to 2 (#5048) Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index cf2abd4b2..0d1553bcb 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -15,7 +15,7 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} From 0ea3861d434b017055dfaac5c11e4c90f3779fac Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 20 May 2022 11:12:55 +0100 Subject: [PATCH 10/10] Fixed paintings not working in newly generated worlds Paintings would not work unless at least one entity was loaded from disk (or saved). --- src/entity/EntityFactory.php | 2 -- src/entity/object/PaintingMotive.php | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/entity/EntityFactory.php b/src/entity/EntityFactory.php index 4bd743042..84838670a 100644 --- a/src/entity/EntityFactory.php +++ b/src/entity/EntityFactory.php @@ -173,8 +173,6 @@ final class EntityFactory{ $this->register(Human::class, function(World $world, CompoundTag $nbt) : Human{ return new Human(Helper::parseLocation($nbt, $world), Human::parseSkinNBT($nbt), $nbt); }, ['Human']); - - PaintingMotive::init(); } /** diff --git a/src/entity/object/PaintingMotive.php b/src/entity/object/PaintingMotive.php index a21bba2fc..28b52efe3 100644 --- a/src/entity/object/PaintingMotive.php +++ b/src/entity/object/PaintingMotive.php @@ -24,6 +24,8 @@ declare(strict_types=1); namespace pocketmine\entity\object; class PaintingMotive{ + private static bool $initialized = false; + /** @var PaintingMotive[] */ protected static $motives = []; @@ -76,6 +78,9 @@ class PaintingMotive{ * @return PaintingMotive[] */ public static function getAll() : array{ + if(!self::$initialized){ + self::init(); + } return self::$motives; }