mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11769186885
This commit is contained in:
commit
80b7f6aba4
8
.github/workflows/build-docker-image.yml
vendored
8
.github/workflows/build-docker-image.yml
vendored
@ -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
|
||||
|
2
.github/workflows/draft-release-from-pr.yml
vendored
2
.github/workflows/draft-release-from-pr.yml
vendored
@ -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."
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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{
|
||||
|
@ -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;
|
||||
}
|
||||
|
35
src/world/sound/BottleEmptySound.php
Normal file
35
src/world/sound/BottleEmptySound.php
Normal 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)];
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user