mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Used namespacer on Blocks and Items
This commit is contained in:
@ -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),
|
||||
);
|
||||
|
Reference in New Issue
Block a user