mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 09:39:56 +00:00
Fixed DestroyBlockParticle
This commit is contained in:
parent
27f2aec160
commit
91fd99d76a
@ -2361,7 +2361,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
|
|
||||||
$oldItem = clone $item;
|
$oldItem = clone $item;
|
||||||
|
|
||||||
if($this->canInteract($vector->add(0.5, 0.5, 0.5), $this->isCreative() ? 13 : 6) and $this->level->useBreakOn($vector, $item, $this)){
|
if($this->canInteract($vector->add(0.5, 0.5, 0.5), $this->isCreative() ? 13 : 6) and $this->level->useBreakOn($vector, $item, $this, true)){
|
||||||
if($this->isSurvival()){
|
if($this->isSurvival()){
|
||||||
if(!$item->deepEquals($oldItem) or $item->getCount() !== $oldItem->getCount()){
|
if(!$item->deepEquals($oldItem) or $item->getCount() !== $oldItem->getCount()){
|
||||||
$this->inventory->setItemInHand($item);
|
$this->inventory->setItemInHand($item);
|
||||||
|
@ -1572,12 +1572,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($createParticles){
|
if($createParticles){
|
||||||
$players = $this->getChunkPlayers($target->x >> 4, $target->z >> 4);
|
$this->addParticle(new DestroyBlockParticle($target->add(0.5, 0.5, 0.5), $target));
|
||||||
if($player !== null){
|
|
||||||
unset($players[$player->getLoaderId()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->addParticle(new DestroyBlockParticle($target->add(0.5), $target), $players);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$target->onBreak($item);
|
$target->onBreak($item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user