Block breaking part 1

This commit is contained in:
Shoghi Cervantes
2015-05-17 19:33:41 +02:00
parent b14d14d3d5
commit f3c46b12c5
18 changed files with 155 additions and 38 deletions

View File

@ -2223,7 +2223,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$oldItem = clone $item;
if($this->canInteract($vector->add(0.5, 0.5, 0.5), 13) and $this->level->useBreakOn($vector, $item, $this, true)){
if($this->canInteract($vector->add(0.5, 0.5, 0.5), $this->isCreative() ? 13 : 6) and $this->level->useBreakOn($vector, $item, $this)){
if($this->isSurvival()){
if(!$item->equals($oldItem, true) or $item->getCount() !== $oldItem->getCount()){
$this->inventory->setItemInHand($item, $this);