mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
better break time checks, added block materials
This commit is contained in:
parent
71da620aa3
commit
625e9ca71f
143 changed files with 496 additions and 54 deletions
|
|
@ -16,5 +16,15 @@ class ItemShovel extends ItemTool
|
|||
default => false,
|
||||
};
|
||||
}
|
||||
|
||||
public function canDestroySpecial($id, $meta){
|
||||
return $id == SNOW_LAYER || $id == SNOW_BLOCK;
|
||||
}
|
||||
public function getDestroySpeed($id, $meta){
|
||||
$effMult = ItemTool::TIER_EFFICIENCY_MULTIPLIER[$this->getLevel()] ?? ItemTool::TIER_EFFICIENCY_MULTIPLIER[0];
|
||||
|
||||
if($id == GRASS || $id == DIRT || $id == SAND || $id == GRAVEL || $id == SNOW_LAYER || $id == SNOW || $id == CLAY || $id == FARMLAND) return $effMult;
|
||||
return parent::getDestroySpeed($id, $meta);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue