Merge 'stable' into 'minor-next'

Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11769186885
This commit is contained in:
github-actions 2024-11-10 22:56:08 +00:00
commit fa3529966f
5 changed files with 10 additions and 10 deletions

View File

@ -53,7 +53,7 @@ jobs:
run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT
- name: Build image for tag - name: Build image for tag
uses: docker/build-push-action@v6.8.0 uses: docker/build-push-action@v6.9.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp
@ -66,7 +66,7 @@ jobs:
- name: Build image for major tag - name: Build image for major tag
if: steps.channel.outputs.CHANNEL == 'stable' if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v6.8.0 uses: docker/build-push-action@v6.9.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp
@ -79,7 +79,7 @@ jobs:
- name: Build image for minor tag - name: Build image for minor tag
if: steps.channel.outputs.CHANNEL == 'stable' if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v6.8.0 uses: docker/build-push-action@v6.9.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp
@ -92,7 +92,7 @@ jobs:
- name: Build image for latest tag - name: Build image for latest tag
if: steps.channel.outputs.CHANNEL == 'stable' if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v6.8.0 uses: docker/build-push-action@v6.9.0
with: with:
push: true push: true
context: ./pocketmine-mp context: ./pocketmine-mp

View File

@ -34,7 +34,7 @@ jobs:
steps: steps:
- name: Post draft release URL on PR - name: Post draft release URL on PR
uses: thollander/actions-comment-pull-request@v2 uses: thollander/actions-comment-pull-request@v3
with: 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." message: "[Draft release ${{ needs.draft.outputs.version }}](${{ needs.draft.outputs.draft-url }}) has been created for commit ${{ github.sha }}. Please review and publish it."

View File

@ -57,7 +57,7 @@ class EntityDamageByEntityEvent extends EntityDamageEvent{
$this->setModifier($this->getBaseDamage() * 0.3 * $strength->getEffectLevel(), self::MODIFIER_STRENGTH); $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); $this->setModifier(-($this->getBaseDamage() * 0.2 * $weakness->getEffectLevel()), self::MODIFIER_WEAKNESS);
} }
} }

View File

@ -30,7 +30,7 @@ class GoldenAppleEnchanted extends GoldenApple{
public function getAdditionalEffects() : array{ public function getAdditionalEffects() : array{
return [ return [
new EffectInstance(VanillaEffects::REGENERATION(), 600, 4), new EffectInstance(VanillaEffects::REGENERATION(), 600, 1),
new EffectInstance(VanillaEffects::ABSORPTION(), 2400, 3), new EffectInstance(VanillaEffects::ABSORPTION(), 2400, 3),
new EffectInstance(VanillaEffects::RESISTANCE(), 6000), new EffectInstance(VanillaEffects::RESISTANCE(), 6000),
new EffectInstance(VanillaEffects::FIRE_RESISTANCE(), 6000) new EffectInstance(VanillaEffects::FIRE_RESISTANCE(), 6000)

View File

@ -1625,7 +1625,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
return false; return false;
} }
$this->resetItemCooldown($item); $this->resetItemCooldown($oldItem);
$this->returnItemsFromAction($oldItem, $item, $returnedItems); $this->returnItemsFromAction($oldItem, $item, $returnedItems);
$this->setUsingItem($item instanceof Releasable && $item->canStartUsingItem($this)); $this->setUsingItem($item instanceof Releasable && $item->canStartUsingItem($this));
@ -1654,7 +1654,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
} }
$this->setUsingItem(false); $this->setUsingItem(false);
$this->resetItemCooldown($slot); $this->resetItemCooldown($oldItem);
$slot->pop(); $slot->pop();
$this->returnItemsFromAction($oldItem, $slot, [$slot->getResidue()]); $this->returnItemsFromAction($oldItem, $slot, [$slot->getResidue()]);
@ -1682,7 +1682,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$returnedItems = []; $returnedItems = [];
$result = $item->onReleaseUsing($this, $returnedItems); $result = $item->onReleaseUsing($this, $returnedItems);
if($result === ItemUseResult::SUCCESS){ if($result === ItemUseResult::SUCCESS){
$this->resetItemCooldown($item); $this->resetItemCooldown($oldItem);
$this->returnItemsFromAction($oldItem, $item, $returnedItems); $this->returnItemsFromAction($oldItem, $item, $returnedItems);
return true; return true;
} }