mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +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;
|
||||
|
||||
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(!$item->deepEquals($oldItem) or $item->getCount() !== $oldItem->getCount()){
|
||||
$this->inventory->setItemInHand($item);
|
||||
|
@ -1572,12 +1572,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
|
||||
if($createParticles){
|
||||
$players = $this->getChunkPlayers($target->x >> 4, $target->z >> 4);
|
||||
if($player !== null){
|
||||
unset($players[$player->getLoaderId()]);
|
||||
}
|
||||
|
||||
$this->addParticle(new DestroyBlockParticle($target->add(0.5), $target), $players);
|
||||
$this->addParticle(new DestroyBlockParticle($target->add(0.5, 0.5, 0.5), $target));
|
||||
}
|
||||
|
||||
$target->onBreak($item);
|
||||
|
Loading…
x
Reference in New Issue
Block a user