mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Fixed block durability
This commit is contained in:
parent
5683dca9f6
commit
e42314ade7
5 changed files with 6 additions and 7 deletions
|
|
@ -1519,8 +1519,7 @@ class Player{
|
|||
}
|
||||
$target->harm($damage, $this->eid);
|
||||
if($slot->isTool() === true and ($this->gamemode & 0x01) === 0){
|
||||
$slot->useOn($target);
|
||||
if($slot->getMetadata() >= $slot->getMaxDurability()){
|
||||
if($slot->useOn($target) and $slot->getMetadata() >= $slot->getMaxDurability()){
|
||||
$this->setSlot($this->slot, new Item(AIR, 0, 0), false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue