Added generic block relative place/break on Level

This commit is contained in:
Shoghi Cervantes
2014-03-13 23:04:49 +01:00
parent 91c4cbfedb
commit 279472b01a
97 changed files with 903 additions and 762 deletions

View File

@ -30,10 +30,7 @@ class DiamondOre extends Solid{
$this->hardness = 15;
}
public function getBreakTime(Item $item, PocketMine\Player $player){
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
public function getBreakTime(Item $item){
switch($item->isPickaxe()){
case 5:
return 0.6;
@ -44,12 +41,12 @@ class DiamondOre extends Solid{
}
}
public function getDrops(Item $item, PocketMine\Player $player){
public function getDrops(Item $item){
if($item->isPickaxe() >= 4){
return array(
array(Item::DIAMOND, 0, 1),
);
} else{
}else{
return array();
}
}