Used namespacer on Blocks and Items

This commit is contained in:
Shoghi Cervantes
2014-03-06 17:16:05 +01:00
parent d490972a42
commit 6a736aa822
86 changed files with 528 additions and 345 deletions

View File

@ -21,6 +21,8 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\ServerAPI as ServerAPI;
class Ladder extends Transparent{
public function __construct($meta = 0){
@ -30,7 +32,7 @@ class Ladder extends Transparent{
$this->hardness = 2;
}
public function place(Item\Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
if($target->isTransparent === false){
$faces = array(
2 => 2,
@ -52,7 +54,7 @@ class Ladder extends Transparent{
public function onUpdate($type){
if($type === BLOCK_UPDATE_NORMAL){
/*if($this->getSide(0)->getID() === AIR){ //Replace with common break method
ServerAPI::request()->api->entity->drop($this, Item\Item::get(LADDER, 0, 1));
ServerAPI::request()->api->entity->drop($this, Item::get(LADDER, 0, 1));
$this->level->setBlock($this, new Air(), true, true, true);
return BLOCK_UPDATE_NORMAL;
}*/
@ -61,7 +63,7 @@ class Ladder extends Transparent{
return false;
}
public function getDrops(Item\Item $item, Player $player){
public function getDrops(Item $item, Player $player){
return array(
array($this->id, 0, 1),
);