diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 7f5eae32a..4325c63f2 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -53,7 +53,7 @@ jobs: run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT - name: Build image for tag - uses: docker/build-push-action@v6.8.0 + uses: docker/build-push-action@v6.9.0 with: push: true context: ./pocketmine-mp @@ -66,7 +66,7 @@ jobs: - name: Build image for major tag if: steps.channel.outputs.CHANNEL == 'stable' - uses: docker/build-push-action@v6.8.0 + uses: docker/build-push-action@v6.9.0 with: push: true context: ./pocketmine-mp @@ -79,7 +79,7 @@ jobs: - name: Build image for minor tag if: steps.channel.outputs.CHANNEL == 'stable' - uses: docker/build-push-action@v6.8.0 + uses: docker/build-push-action@v6.9.0 with: push: true context: ./pocketmine-mp @@ -92,7 +92,7 @@ jobs: - name: Build image for latest tag if: steps.channel.outputs.CHANNEL == 'stable' - uses: docker/build-push-action@v6.8.0 + uses: docker/build-push-action@v6.9.0 with: push: true context: ./pocketmine-mp diff --git a/.github/workflows/draft-release-from-pr.yml b/.github/workflows/draft-release-from-pr.yml index 3936a2649..8a347853b 100644 --- a/.github/workflows/draft-release-from-pr.yml +++ b/.github/workflows/draft-release-from-pr.yml @@ -34,7 +34,7 @@ jobs: steps: - name: Post draft release URL on PR - uses: thollander/actions-comment-pull-request@v2 + uses: thollander/actions-comment-pull-request@v3 with: message: "[Draft release ${{ needs.draft.outputs.version }}](${{ needs.draft.outputs.draft-url }}) has been created for commit ${{ github.sha }}. Please review and publish it." diff --git a/src/event/entity/EntityDamageByEntityEvent.php b/src/event/entity/EntityDamageByEntityEvent.php index 5ef6c4b8e..052be9a15 100644 --- a/src/event/entity/EntityDamageByEntityEvent.php +++ b/src/event/entity/EntityDamageByEntityEvent.php @@ -57,7 +57,7 @@ class EntityDamageByEntityEvent extends EntityDamageEvent{ $this->setModifier($this->getBaseDamage() * 0.3 * $strength->getEffectLevel(), self::MODIFIER_STRENGTH); } - if(($weakness = $effects->get(VanillaEffects::WEAKNESS())) !== null){ + if(($weakness = $effects->get(VanillaEffects::WEAKNESS())) !== null && $this->getCause() === EntityDamageEvent::CAUSE_ENTITY_ATTACK){ $this->setModifier(-($this->getBaseDamage() * 0.2 * $weakness->getEffectLevel()), self::MODIFIER_WEAKNESS); } } diff --git a/src/item/GoldenAppleEnchanted.php b/src/item/GoldenAppleEnchanted.php index 5b68f5f21..28e43a7a4 100644 --- a/src/item/GoldenAppleEnchanted.php +++ b/src/item/GoldenAppleEnchanted.php @@ -30,7 +30,7 @@ class GoldenAppleEnchanted extends GoldenApple{ public function getAdditionalEffects() : array{ return [ - new EffectInstance(VanillaEffects::REGENERATION(), 600, 4), + new EffectInstance(VanillaEffects::REGENERATION(), 600, 1), new EffectInstance(VanillaEffects::ABSORPTION(), 2400, 3), new EffectInstance(VanillaEffects::RESISTANCE(), 6000), new EffectInstance(VanillaEffects::FIRE_RESISTANCE(), 6000) diff --git a/src/player/Player.php b/src/player/Player.php index 8ae206e1a..192e26a5f 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -1625,7 +1625,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ return false; } - $this->resetItemCooldown($item); + $this->resetItemCooldown($oldItem); $this->returnItemsFromAction($oldItem, $item, $returnedItems); $this->setUsingItem($item instanceof Releasable && $item->canStartUsingItem($this)); @@ -1654,7 +1654,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ } $this->setUsingItem(false); - $this->resetItemCooldown($slot); + $this->resetItemCooldown($oldItem); $slot->pop(); $this->returnItemsFromAction($oldItem, $slot, [$slot->getResidue()]); @@ -1682,7 +1682,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ $returnedItems = []; $result = $item->onReleaseUsing($this, $returnedItems); if($result === ItemUseResult::SUCCESS){ - $this->resetItemCooldown($item); + $this->resetItemCooldown($oldItem); $this->returnItemsFromAction($oldItem, $item, $returnedItems); return true; }