isAxe() public method

public isAxe ( )
Example #1
0
 public function getBreakTime(Item $item)
 {
     switch ($item->isAxe()) {
         case 5:
             return 0.4;
         case 4:
             return 0.5;
         case 3:
             return 0.75;
         case 2:
             return 0.25;
         case 1:
             return 1.5;
         default:
             return 3;
     }
 }
Example #2
0
 public function getBreakTime(Item $item)
 {
     if ($item->isShears()) {
         return 0.02;
     } elseif ($item->isSword()) {
         return 0.2;
     } elseif ($item->isAxe()) {
         switch ($item->isAxe()) {
             case Tool::TIER_WOODEN:
                 return 0.15;
             case Tool::TIER_STONE:
                 return 0.075;
             case Tool::TIER_IRON:
                 return 0.05;
             case Tool::TIER_DIAMOND:
                 return 0.0375;
             case Tool::TIER_GOLD:
                 return 0.025;
         }
     }
     return 0.3;
 }