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

@ -37,10 +37,8 @@ class StoneBricks extends Solid{
$this->hardness = 30;
}
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.4;
@ -57,12 +55,12 @@ class StoneBricks extends Solid{
}
}
public function getDrops(Item $item, PocketMine\Player $player){
public function getDrops(Item $item){
if($item->isPickaxe() >= 1){
return array(
array(Item::STONE_BRICKS, $this->meta & 0x03, 1),
);
} else{
}else{
return array();
}
}