mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
durability is hopefully fixed
This commit is contained in:
parent
629a044053
commit
0c13e4ce1d
6 changed files with 93 additions and 13 deletions
|
|
@ -247,20 +247,17 @@ class Item{
|
|||
BOW => 385 //x3
|
||||
];
|
||||
|
||||
if(($type = $this->getPickaxeLevel()) === false){
|
||||
if(($type = $this->isAxe()) === false){
|
||||
if(($type = $this->isSword()) === false){
|
||||
if(($type = $this->isShovel()) === false){
|
||||
if(($type = $this->isHoe()) === false){
|
||||
$type = $this->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(($type = $this->getLevel()) === false){
|
||||
$type = $this->id;
|
||||
}
|
||||
return $levels[$type];
|
||||
}
|
||||
|
||||
|
||||
public function getLevel(){
|
||||
return false;
|
||||
}
|
||||
|
||||
//TODO remove?
|
||||
public function getPickaxeLevel(){ //Returns false or level of the pickaxe
|
||||
switch($this->id){
|
||||
case WOODEN_PICKAXE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue