Merge 'minor-next' into 'major-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:09 +00:00
commit 80b7f6aba4
7 changed files with 47 additions and 11 deletions

View File

@ -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

View File

@ -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."

View File

@ -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);
}
}

View File

@ -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)

View File

@ -26,6 +26,7 @@ namespace pocketmine\item;
use pocketmine\data\runtime\RuntimeDataDescriber;
use pocketmine\entity\Living;
use pocketmine\player\Player;
use pocketmine\world\sound\BottleEmptySound;
class Potion extends Item implements ConsumableItem{
@ -50,7 +51,7 @@ class Potion extends Item implements ConsumableItem{
}
public function onConsume(Living $consumer) : void{
$consumer->broadcastSound(new BottleEmptySound());
}
public function getAdditionalEffects() : array{

View File

@ -1630,7 +1630,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));
@ -1659,7 +1659,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()]);
@ -1687,7 +1687,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;
}

View File

@ -0,0 +1,35 @@
<?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\world\sound;
use pocketmine\math\Vector3;
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
use pocketmine\network\mcpe\protocol\types\LevelSoundEvent;
class BottleEmptySound implements Sound{
public function encode(Vector3 $pos) : array{
return [LevelSoundEventPacket::nonActorSound(LevelSoundEvent::BOTTLE_EMPTY, $pos, false)];
}
}