mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fixed block durability
This commit is contained in:
parent
5683dca9f6
commit
e42314ade7
5 changed files with 6 additions and 7 deletions
|
|
@ -275,8 +275,7 @@ class BlockAPI{
|
|||
if($target->onBreak($item, $player) === false){
|
||||
return $this->cancelAction($target, $player, false);
|
||||
}
|
||||
$item->useOn($target);
|
||||
if($item->getMetadata() >= $item->getMaxDurability()){
|
||||
if($item->useOn($target) and ($player->gamemode & 0x01) === 0 and $item->getMetadata() >= $item->getMaxDurability()){
|
||||
$player->setSlot($player->slot, new Item(AIR, 0, 0), false);
|
||||
}
|
||||
$drops = $target->getDrops($item, $player);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue