Fixed DestroyBlockParticle

This commit is contained in:
Dylan K. Taylor 2017-02-12 16:01:23 +00:00
parent 27f2aec160
commit 91fd99d76a
2 changed files with 2 additions and 7 deletions

View File

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

View File

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