Tool: cleanup durability handling, closes #379

long overdue... this isn't quite as extensible as the original api3/blocks system was, but this is primarily intended to replace Item->useOn(). If plugins want to use it it can be extended later on.
This commit is contained in:
Dylan K. Taylor
2018-05-10 19:48:51 +01:00
parent b8523cb304
commit b21572774a
13 changed files with 103 additions and 56 deletions

View File

@ -1718,7 +1718,7 @@ class Level implements ChunkManager, Metadatable{
$this->destroyBlockInternal($t, $item, $player, $createParticles);
}
$item->useOn($target);
$item->onDestroyBlock($target);
if(!empty($drops)){
$dropPos = $target->add(0.5, 0.5, 0.5);