mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
rewritten how item durability/count is handled on serverside
This commit is contained in:
parent
4880be5452
commit
841e12b9ea
30 changed files with 128 additions and 152 deletions
|
|
@ -5,11 +5,11 @@ class ShearsItem extends ItemTool{
|
|||
parent::__construct(SHEARS, $meta, $count, "Shears");
|
||||
}
|
||||
|
||||
public function useOn($object, $force = false){
|
||||
if(($object instanceof Sheep) and $this->id === SHEARS){
|
||||
$this->meta++;
|
||||
public function mineBlock(Block $block, Player $player){
|
||||
if($block->getID() === LEAVES || $block->getID() === COBWEB){
|
||||
$this->hurtAndBreak(1, $player);
|
||||
return true;
|
||||
}
|
||||
parent::useOn($object, $force);
|
||||
return parent::mineBlock($block, $player);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue