Added some sounds, fixed DestroyBlockParticle wrong particles for blocks with different meta values

This commit is contained in:
Dylan K. Taylor
2017-05-04 16:50:13 +01:00
parent 40f2d7fcdc
commit 13fd8b681e
6 changed files with 76 additions and 47 deletions

View File

@ -2469,7 +2469,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
if(!$this->canInteract($blockVector->add(0.5, 0.5, 0.5), 13) or $this->isSpectator()){
}elseif($this->isCreative()){
$item = $this->inventory->getItemInHand();
if($this->level->useItemOn($blockVector, $item, $packet->face, $packet->fx, $packet->fy, $packet->fz, $this) === true){
if($this->level->useItemOn($blockVector, $item, $packet->face, $packet->fx, $packet->fy, $packet->fz, $this, true) === true){
return true;
}
}elseif(!$this->inventory->getItemInHand()->equals($packet->item)){
@ -2478,7 +2478,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$item = $this->inventory->getItemInHand();
$oldItem = clone $item;
//TODO: Implement adventure mode checks
if($this->level->useItemOn($blockVector, $item, $packet->face, $packet->fx, $packet->fy, $packet->fz, $this)){
if($this->level->useItemOn($blockVector, $item, $packet->face, $packet->fx, $packet->fy, $packet->fz, $this, true)){
if(!$item->equals($oldItem) or $item->getCount() !== $oldItem->getCount()){
$this->inventory->setItemInHand($item);
$this->inventory->sendHeldItem($this->hasSpawned);