Updated class constants

This commit is contained in:
Shoghi Cervantes 2014-03-06 19:31:41 +01:00
parent 80356d8794
commit 56d3b89f57
82 changed files with 327 additions and 325 deletions

View File

@ -37,196 +37,196 @@ class BlockAPI{
private $randomUpdates = array();
public static $creative = array(
//Building
[Item\Item::STONE, 0],
[Item\Item::COBBLESTONE, 0],
[Item\Item::STONE_BRICKS, 0],
[Item\Item::STONE_BRICKS, 1],
[Item\Item::STONE_BRICKS, 2],
[Item\Item::MOSS_STONE, 0],
[Item\Item::WOODEN_PLANKS, 0],
[Item\Item::WOODEN_PLANKS, 1],
[Item\Item::WOODEN_PLANKS, 2],
[Item\Item::WOODEN_PLANKS, 3],
[Item\Item::BRICKS, 0],
[ItemItem::STONE, 0],
[ItemItem::COBBLESTONE, 0],
[ItemItem::STONE_BRICKS, 0],
[ItemItem::STONE_BRICKS, 1],
[ItemItem::STONE_BRICKS, 2],
[ItemItem::MOSS_STONE, 0],
[ItemItem::WOODEN_PLANKS, 0],
[ItemItem::WOODEN_PLANKS, 1],
[ItemItem::WOODEN_PLANKS, 2],
[ItemItem::WOODEN_PLANKS, 3],
[ItemItem::BRICKS, 0],
[Item\Item::DIRT, 0],
[Item\Item::GRASS, 0],
[Item\Item::CLAY_BLOCK, 0],
[Item\Item::SANDSTONE, 0],
[Item\Item::SANDSTONE, 1],
[Item\Item::SANDSTONE, 2],
[Item\Item::SAND, 0],
[Item\Item::GRAVEL, 0],
[Item\Item::TRUNK, 0],
[Item\Item::TRUNK, 1],
[Item\Item::TRUNK, 2],
[Item\Item::TRUNK, 3],
[Item\Item::NETHER_BRICKS, 0],
[Item\Item::NETHERRACK, 0],
[Item\Item::BEDROCK, 0],
[Item\Item::COBBLESTONE_STAIRS, 0],
[Item\Item::OAK_WOODEN_STAIRS, 0],
[Item\Item::SPRUCE_WOODEN_STAIRS, 0],
[Item\Item::BIRCH_WOODEN_STAIRS, 0],
[Item\Item::JUNGLE_WOODEN_STAIRS, 0],
[Item\Item::BRICK_STAIRS, 0],
[Item\Item::SANDSTONE_STAIRS, 0],
[Item\Item::STONE_BRICK_STAIRS, 0],
[Item\Item::NETHER_BRICKS_STAIRS, 0],
[Item\Item::QUARTZ_STAIRS, 0],
[Item\Item::SLAB, 0],
[Item\Item::SLAB, 1],
[Item\Item::WOODEN_SLAB, 0],
[Item\Item::WOODEN_SLAB, 1],
[Item\Item::WOODEN_SLAB, 2],
[Item\Item::WOODEN_SLAB, 3],
[Item\Item::SLAB, 3],
[Item\Item::SLAB, 4],
[Item\Item::SLAB, 5],
[Item\Item::SLAB, 6],
[Item\Item::QUARTZ_BLOCK, 0],
[Item\Item::QUARTZ_BLOCK, 1],
[Item\Item::QUARTZ_BLOCK, 2],
[Item\Item::COAL_ORE, 0],
[Item\Item::IRON_ORE, 0],
[Item\Item::GOLD_ORE, 0],
[Item\Item::DIAMOND_ORE, 0],
[Item\Item::LAPIS_ORE, 0],
[Item\Item::REDSTONE_ORE, 0],
[Item\Item::OBSIDIAN, 0],
[Item\Item::ICE, 0],
[Item\Item::SNOW_BLOCK, 0],
[ItemItem::DIRT, 0],
[ItemItem::GRASS, 0],
[ItemItem::CLAY_BLOCK, 0],
[ItemItem::SANDSTONE, 0],
[ItemItem::SANDSTONE, 1],
[ItemItem::SANDSTONE, 2],
[ItemItem::SAND, 0],
[ItemItem::GRAVEL, 0],
[ItemItem::TRUNK, 0],
[ItemItem::TRUNK, 1],
[ItemItem::TRUNK, 2],
[ItemItem::TRUNK, 3],
[ItemItem::NETHER_BRICKS, 0],
[ItemItem::NETHERRACK, 0],
[ItemItem::BEDROCK, 0],
[ItemItem::COBBLESTONE_STAIRS, 0],
[ItemItem::OAK_WOODEN_STAIRS, 0],
[ItemItem::SPRUCE_WOODEN_STAIRS, 0],
[ItemItem::BIRCH_WOODEN_STAIRS, 0],
[ItemItem::JUNGLE_WOODEN_STAIRS, 0],
[ItemItem::BRICK_STAIRS, 0],
[ItemItem::SANDSTONE_STAIRS, 0],
[ItemItem::STONE_BRICK_STAIRS, 0],
[ItemItem::NETHER_BRICKS_STAIRS, 0],
[ItemItem::QUARTZ_STAIRS, 0],
[ItemItem::SLAB, 0],
[ItemItem::SLAB, 1],
[ItemItem::WOODEN_SLAB, 0],
[ItemItem::WOODEN_SLAB, 1],
[ItemItem::WOODEN_SLAB, 2],
[ItemItem::WOODEN_SLAB, 3],
[ItemItem::SLAB, 3],
[ItemItem::SLAB, 4],
[ItemItem::SLAB, 5],
[ItemItem::SLAB, 6],
[ItemItem::QUARTZ_BLOCK, 0],
[ItemItem::QUARTZ_BLOCK, 1],
[ItemItem::QUARTZ_BLOCK, 2],
[ItemItem::COAL_ORE, 0],
[ItemItem::IRON_ORE, 0],
[ItemItem::GOLD_ORE, 0],
[ItemItem::DIAMOND_ORE, 0],
[ItemItem::LAPIS_ORE, 0],
[ItemItem::REDSTONE_ORE, 0],
[ItemItem::OBSIDIAN, 0],
[ItemItem::ICE, 0],
[ItemItem::SNOW_BLOCK, 0],
//Decoration
[Item\Item::COBBLESTONE_WALL, 0],
[Item\Item::COBBLESTONE_WALL, 1],
[Item\Item::GOLD_BLOCK, 0],
[Item\Item::IRON_BLOCK, 0],
[Item\Item::DIAMOND_BLOCK, 0],
[Item\Item::LAPIS_BLOCK, 0],
[Item\Item::COAL_BLOCK, 0],
[Item\Item::SNOW_LAYER, 0],
[Item\Item::GLASS, 0],
[Item\Item::GLOWSTONE_BLOCK, 0],
[Item\Item::NETHER_REACTOR, 0],
[Item\Item::WOOL, 0],
[Item\Item::WOOL, 7],
[Item\Item::WOOL, 6],
[Item\Item::WOOL, 5],
[Item\Item::WOOL, 4],
[Item\Item::WOOL, 3],
[Item\Item::WOOL, 2],
[Item\Item::WOOL, 1],
[Item\Item::WOOL, 15],
[Item\Item::WOOL, 14],
[Item\Item::WOOL, 13],
[Item\Item::WOOL, 12],
[Item\Item::WOOL, 11],
[Item\Item::WOOL, 10],
[Item\Item::WOOL, 9],
[Item\Item::WOOL, 8],
[Item\Item::LADDER, 0],
[Item\Item::SPONGE, 0],
[Item\Item::GLASS_PANE, 0],
[Item\Item::WOODEN_DOOR, 0],
[Item\Item::TRAPDOOR, 0],
[Item\Item::FENCE, 0],
[Item\Item::FENCE_GATE, 0],
[Item\Item::IRON_BARS, 0],
[Item\Item::BED, 0],
[Item\Item::BOOKSHELF, 0],
[Item\Item::PAINTING, 0],
[Item\Item::WORKBENCH, 0],
[Item\Item::STONECUTTER, 0],
[Item\Item::CHEST, 0],
[Item\Item::FURNACE, 0],
[Item\Item::DANDELION, 0],
[Item\Item::CYAN_FLOWER, 0],
[Item\Item::BROWN_MUSHROOM, 0],
[Item\Item::RED_MUSHROOM, 0],
[Item\Item::CACTUS, 0],
[Item\Item::MELON_BLOCK, 0],
[Item\Item::PUMPKIN, 0],
[Item\Item::LIT_PUMPKIN, 0],
[Item\Item::COBWEB, 0],
[Item\Item::HAY_BALE, 0],
[Item\Item::TALL_GRASS, 1],
[Item\Item::TALL_GRASS, 2],
[Item\Item::DEAD_BUSH, 0],
[Item\Item::SAPLING, 0],
[Item\Item::SAPLING, 1],
[Item\Item::SAPLING, 2],
[Item\Item::SAPLING, 3],
[Item\Item::LEAVES, 0],
[Item\Item::LEAVES, 1],
[Item\Item::LEAVES, 2],
[Item\Item::LEAVES, 3],
[Item\Item::CAKE, 0],
[Item\Item::SIGN, 0],
[Item\Item::CARPET, 0],
[Item\Item::CARPET, 7],
[Item\Item::CARPET, 6],
[Item\Item::CARPET, 5],
[Item\Item::CARPET, 4],
[Item\Item::CARPET, 3],
[Item\Item::CARPET, 2],
[Item\Item::CARPET, 1],
[Item\Item::CARPET, 15],
[Item\Item::CARPET, 14],
[Item\Item::CARPET, 13],
[Item\Item::CARPET, 12],
[Item\Item::CARPET, 11],
[Item\Item::CARPET, 10],
[Item\Item::CARPET, 9],
[Item\Item::CARPET, 8],
[ItemItem::COBBLESTONE_WALL, 0],
[ItemItem::COBBLESTONE_WALL, 1],
[ItemItem::GOLD_BLOCK, 0],
[ItemItem::IRON_BLOCK, 0],
[ItemItem::DIAMOND_BLOCK, 0],
[ItemItem::LAPIS_BLOCK, 0],
[ItemItem::COAL_BLOCK, 0],
[ItemItem::SNOW_LAYER, 0],
[ItemItem::GLASS, 0],
[ItemItem::GLOWSTONE_BLOCK, 0],
[ItemItem::NETHER_REACTOR, 0],
[ItemItem::WOOL, 0],
[ItemItem::WOOL, 7],
[ItemItem::WOOL, 6],
[ItemItem::WOOL, 5],
[ItemItem::WOOL, 4],
[ItemItem::WOOL, 3],
[ItemItem::WOOL, 2],
[ItemItem::WOOL, 1],
[ItemItem::WOOL, 15],
[ItemItem::WOOL, 14],
[ItemItem::WOOL, 13],
[ItemItem::WOOL, 12],
[ItemItem::WOOL, 11],
[ItemItem::WOOL, 10],
[ItemItem::WOOL, 9],
[ItemItem::WOOL, 8],
[ItemItem::LADDER, 0],
[ItemItem::SPONGE, 0],
[ItemItem::GLASS_PANE, 0],
[ItemItem::WOODEN_DOOR, 0],
[ItemItem::TRAPDOOR, 0],
[ItemItem::FENCE, 0],
[ItemItem::FENCE_GATE, 0],
[ItemItem::IRON_BARS, 0],
[ItemItem::BED, 0],
[ItemItem::BOOKSHELF, 0],
[ItemItem::PAINTING, 0],
[ItemItem::WORKBENCH, 0],
[ItemItem::STONECUTTER, 0],
[ItemItem::CHEST, 0],
[ItemItem::FURNACE, 0],
[ItemItem::DANDELION, 0],
[ItemItem::CYAN_FLOWER, 0],
[ItemItem::BROWN_MUSHROOM, 0],
[ItemItem::RED_MUSHROOM, 0],
[ItemItem::CACTUS, 0],
[ItemItem::MELON_BLOCK, 0],
[ItemItem::PUMPKIN, 0],
[ItemItem::LIT_PUMPKIN, 0],
[ItemItem::COBWEB, 0],
[ItemItem::HAY_BALE, 0],
[ItemItem::TALL_GRASS, 1],
[ItemItem::TALL_GRASS, 2],
[ItemItem::DEAD_BUSH, 0],
[ItemItem::SAPLING, 0],
[ItemItem::SAPLING, 1],
[ItemItem::SAPLING, 2],
[ItemItem::SAPLING, 3],
[ItemItem::LEAVES, 0],
[ItemItem::LEAVES, 1],
[ItemItem::LEAVES, 2],
[ItemItem::LEAVES, 3],
[ItemItem::CAKE, 0],
[ItemItem::SIGN, 0],
[ItemItem::CARPET, 0],
[ItemItem::CARPET, 7],
[ItemItem::CARPET, 6],
[ItemItem::CARPET, 5],
[ItemItem::CARPET, 4],
[ItemItem::CARPET, 3],
[ItemItem::CARPET, 2],
[ItemItem::CARPET, 1],
[ItemItem::CARPET, 15],
[ItemItem::CARPET, 14],
[ItemItem::CARPET, 13],
[ItemItem::CARPET, 12],
[ItemItem::CARPET, 11],
[ItemItem::CARPET, 10],
[ItemItem::CARPET, 9],
[ItemItem::CARPET, 8],
//Tools
//array(RAILS, 0),
//array(POWERED_RAILS, 0),
[Item\Item::TORCH, 0],
[Item\Item::BUCKET, 0],
[Item\Item::BUCKET, 8],
[Item\Item::BUCKET, 10],
[Item\Item::TNT, 0],
[Item\Item::IRON_HOE, 0],
[Item\Item::IRON_SWORD, 0],
[Item\Item::BOW, 0],
[Item\Item::SHEARS, 0],
[Item\Item::FLINT_AND_STEEL, 0],
[Item\Item::CLOCK, 0],
[Item\Item::COMPASS, 0],
[Item\Item::MINECART, 0],
[ItemItem::TORCH, 0],
[ItemItem::BUCKET, 0],
[ItemItem::BUCKET, 8],
[ItemItem::BUCKET, 10],
[ItemItem::TNT, 0],
[ItemItem::IRON_HOE, 0],
[ItemItem::IRON_SWORD, 0],
[ItemItem::BOW, 0],
[ItemItem::SHEARS, 0],
[ItemItem::FLINT_AND_STEEL, 0],
[ItemItem::CLOCK, 0],
[ItemItem::COMPASS, 0],
[ItemItem::MINECART, 0],
array(SPAWN_EGG, MOB_CHICKEN),
array(SPAWN_EGG, MOB_COW),
array(SPAWN_EGG, MOB_PIG),
array(SPAWN_EGG, MOB_SHEEP),
//Seeds
[Item\Item::SUGARCANE, 0],
[Item\Item::WHEAT, 0],
[Item\Item::SEEDS, 0],
[Item\Item::MELON_SEEDS, 0],
[Item\Item::PUMPKIN_SEEDS, 0],
[Item\Item::CARROT, 0],
[Item\Item::POTATO, 0],
[Item\Item::BEETROOT_SEEDS, 0],
[Item\Item::EGG, 0],
[Item\Item::DYE, 0],
[Item\Item::DYE, 7],
[Item\Item::DYE, 6],
[Item\Item::DYE, 5],
[Item\Item::DYE, 4],
[Item\Item::DYE, 3],
[Item\Item::DYE, 2],
[Item\Item::DYE, 1],
[Item\Item::DYE, 15],
[Item\Item::DYE, 14],
[Item\Item::DYE, 13],
[Item\Item::DYE, 12],
[Item\Item::DYE, 11],
[Item\Item::DYE, 10],
[Item\Item::DYE, 9],
[Item\Item::DYE, 8],
[ItemItem::SUGARCANE, 0],
[ItemItem::WHEAT, 0],
[ItemItem::SEEDS, 0],
[ItemItem::MELON_SEEDS, 0],
[ItemItem::PUMPKIN_SEEDS, 0],
[ItemItem::CARROT, 0],
[ItemItem::POTATO, 0],
[ItemItem::BEETROOT_SEEDS, 0],
[ItemItem::EGG, 0],
[ItemItem::DYE, 0],
[ItemItem::DYE, 7],
[ItemItem::DYE, 6],
[ItemItem::DYE, 5],
[ItemItem::DYE, 4],
[ItemItem::DYE, 3],
[ItemItem::DYE, 2],
[ItemItem::DYE, 1],
[ItemItem::DYE, 15],
[ItemItem::DYE, 14],
[ItemItem::DYE, 13],
[ItemItem::DYE, 12],
[ItemItem::DYE, 11],
[ItemItem::DYE, 10],
[ItemItem::DYE, 9],
[ItemItem::DYE, 8],
);

View File

@ -1855,25 +1855,25 @@ class Player extends RealHuman{
switch($packet->event){
case 9: //Eating
$items = array(
Item\Item::APPLE => 4,
Item\Item::MUSHROOM_STEW => 10,
Item\Item::BEETROOT_SOUP => 10,
Item\Item::BREAD => 5,
Item\Item::RAW_PORKCHOP => 3,
Item\Item::COOKED_PORKCHOP => 8,
Item\Item::RAW_BEEF => 3,
Item\Item::STEAK => 8,
Item\Item::COOKED_CHICKEN => 6,
Item\Item::RAW_CHICKEN => 2,
Item\Item::MELON_SLICE => 2,
Item\Item::GOLDEN_APPLE => 10,
Item\Item::PUMPKIN_PIE => 8,
Item\Item::CARROT => 4,
Item\Item::POTATO => 1,
Item\Item::BAKED_POTATO => 6,
//Item\Item::COOKIE => 2,
//Item\Item::COOKED_FISH => 5,
//Item\Item::RAW_FISH => 2,
ItemItem::APPLE => 4,
ItemItem::MUSHROOM_STEW => 10,
ItemItem::BEETROOT_SOUP => 10,
ItemItem::BREAD => 5,
ItemItem::RAW_PORKCHOP => 3,
ItemItem::COOKED_PORKCHOP => 8,
ItemItem::RAW_BEEF => 3,
ItemItem::STEAK => 8,
ItemItem::COOKED_CHICKEN => 6,
ItemItem::RAW_CHICKEN => 2,
ItemItem::MELON_SLICE => 2,
ItemItem::GOLDEN_APPLE => 10,
ItemItem::PUMPKIN_PIE => 8,
ItemItem::CARROT => 4,
ItemItem::POTATO => 1,
ItemItem::BAKED_POTATO => 6,
//ItemItem::COOKIE => 2,
//ItemItem::COOKED_FISH => 5,
//ItemItem::RAW_FISH => 2,
);
$slot = $this->getSlot($this->slot);
if($this->entity->getHealth() < 20 and isset($items[$slot->getID()])){
@ -1888,7 +1888,7 @@ class Player extends RealHuman{
if($slot->getCount() <= 0){
$this->setSlot($this->slot, Item::get(AIR, 0, 0));
}
if($slot->getID() === Item\Item::MUSHROOM_STEW or $slot->getID() === Item\Item::BEETROOT_SOUP){
if($slot->getID() === ItemItem::MUSHROOM_STEW or $slot->getID() === ItemItem::BEETROOT_SOUP){
$this->addItem(Item::get(BOWL, 0, 1));
}
}

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\Network\Protocol\ChatPacket as ChatPacket;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Bed extends Transparent{
public function __construct($type = 0){

View File

@ -43,7 +43,7 @@ class Beetroot extends Flowable{
}
public function onActivate(Item $item, Player $player){
if($item->getID() === Item\Item::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
if($item->getID() === ItemItem::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
$this->meta = 0x07;
$this->level->setBlock($this, $this, true, false, true);
if(($player->gamemode & 0x01) === 0){
@ -84,10 +84,10 @@ class Beetroot extends Flowable{
public function getDrops(Item $item, Player $player){
$drops = array();
if($this->meta >= 0x07){
$drops[] = array(Item\Item::BEETROOT, 0, 1);
$drops[] = array(Item\Item::BEETROOT_SEEDS, 0, mt_rand(0, 3));
$drops[] = array(ItemItem::BEETROOT, 0, 1);
$drops[] = array(ItemItem::BEETROOT_SEEDS, 0, mt_rand(0, 3));
} else{
$drops[] = array(Item\Item::BEETROOT_SEEDS, 0, 1);
$drops[] = array(ItemItem::BEETROOT_SEEDS, 0, 1);
}
return $drops;

View File

@ -21,7 +21,6 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\NBT\Tag\Compound as Compound;
use PocketMine\NBT\Tag\Enum as Enum;
@ -29,6 +28,7 @@ use PocketMine\NBT\Tag\Int as Int;
use PocketMine\NBT\Tag\String as String;
use PocketMine\Tile\Furnace as Furnace;
use PocketMine\Tile\Tile as Tile;
use PocketMine;
class BurningFurnace extends Solid{
public function __construct($meta = 0){

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Cactus extends Transparent{
public function __construct($meta = 0){

View File

@ -43,7 +43,7 @@ class Carrot extends Flowable{
}
public function onActivate(Item $item, Player $player){
if($item->getID() === Item\Item::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
if($item->getID() === ItemItem::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
$this->meta = 0x07;
$this->level->setBlock($this, $this, true, false, true);
if(($player->gamemode & 0x01) === 0){

View File

@ -21,7 +21,6 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\NBT\Tag\Compound as Compound;
use PocketMine\NBT\Tag\Enum as Enum;
@ -29,6 +28,7 @@ use PocketMine\NBT\Tag\Int as Int;
use PocketMine\NBT\Tag\String as String;
use PocketMine\Tile\Chest as TileChest;
use PocketMine\Tile\Tile as Tile;
use PocketMine;
class Chest extends Transparent{
public function __construct($meta = 0){

View File

@ -32,7 +32,7 @@ class Clay extends Solid{
public function getDrops(Item $item, Player $player){
return array(
array(Item\Item::CLAY, 0, 4),
array(ItemItem::CLAY, 0, 4),
);
}
}

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\Network\Protocol\LevelEventPacket as LevelEventPacket;
use PocketMine\Player as Player;
use PocketMine;
abstract class Door extends Transparent{

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Fallable extends Solid{

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Generic extends Block{

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\Level\Position as Position;
use PocketMine\Utils\Utils as Utils;
use PocketMine;
class GlowingRedstoneOre extends Solid{
public function __construct(){
@ -62,7 +62,7 @@ class GlowingRedstoneOre extends Solid{
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 4){
return array(
array(Item\Item::REDSTONE_DUST, 0, mt_rand(4, 5)),
array(ItemItem::REDSTONE_DUST, 0, mt_rand(4, 5)),
);
} else{
return array();

View File

@ -32,7 +32,7 @@ class Glowstone extends Transparent{
public function getDrops(Item $item, Player $player){
return array(
array(Item\Item::GLOWSTONE_DUST, 0, mt_rand(2, 4)),
array(ItemItem::GLOWSTONE_DUST, 0, mt_rand(2, 4)),
);
}
}

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\Level\Generator\Object\TallGrass as TallGrass;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Grass extends Solid{
public function __construct(){
@ -40,7 +40,7 @@ class Grass extends Solid{
}
public function onActivate(Item $item, Player $player){
if($item->getID() === Item\Item::DYE and $item->getMetadata() === 0x0F){
if($item->getID() === ItemItem::DYE and $item->getMetadata() === 0x0F){
if(($player->gamemode & 0x01) === 0){
$item->count--;
}

View File

@ -33,7 +33,7 @@ class Gravel extends Fallable{
public function getDrops(Item $item, Player $player){
if(mt_rand(1, 10) === 1){
return array(
array(Item\Item::FLINT, 0, 1),
array(ItemItem::FLINT, 0, 1),
);
}

View File

@ -54,7 +54,7 @@ class IronDoor extends Door{
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
return array(
array(Item\Item::IRON_DOOR, 0, 1),
array(ItemItem::IRON_DOOR, 0, 1),
);
} else{
return array();

View File

@ -49,7 +49,7 @@ class LapisOre extends Solid{
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 3){
return array(
array(Item\Item::DYE, 4, mt_rand(4, 8)),
array(ItemItem::DYE, 4, mt_rand(4, 8)),
);
} else{
return array();

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\Level\Position as Position;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Lava extends Liquid{
public function __construct($meta = 0){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Leaves extends Transparent{
const OAK = 0;
@ -151,7 +151,7 @@ class Leaves extends Transparent{
$drops[] = array(LEAVES, $this->meta & 0x03, 1);
} else{
if(mt_rand(1, 20) === 1){ //Saplings
$drops[] = array(Item\Item::SAPLING, $this->meta & 0x03, 1);
$drops[] = array(ItemItem::SAPLING, $this->meta & 0x03, 1);
}
if(($this->meta & 0x03) === self::OAK and mt_rand(1, 200) === 1){ //Apples
$drops[] = array(APPLE, 0, 1);

View File

@ -32,7 +32,7 @@ class Melon extends Transparent{
public function getDrops(Item $item, Player $player){
return array(
array(Item\Item::MELON_SLICE, 0, mt_rand(3, 7)),
array(ItemItem::MELON_SLICE, 0, mt_rand(3, 7)),
);
}
}

View File

@ -80,7 +80,7 @@ class MelonStem extends Flowable{
}
public function onActivate(Item $item, Player $player){
if($item->getID() === Item\Item::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
if($item->getID() === ItemItem::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
$this->meta = 0x07;
$this->level->setBlock($this, $this, true, false, true);
if(($player->gamemode & 0x01) === 0){
@ -95,7 +95,7 @@ class MelonStem extends Flowable{
public function getDrops(Item $item, Player $player){
return array(
array(Item\Item::MELON_SEEDS, 0, mt_rand(0, 2)),
array(ItemItem::MELON_SEEDS, 0, mt_rand(0, 2)),
);
}
}

View File

@ -43,7 +43,7 @@ class Potato extends Flowable{
}
public function onActivate(Item $item, Player $player){
if($item->getID() === Item\Item::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
if($item->getID() === ItemItem::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
$this->meta = 0x07;
$this->level->setBlock($this, $this, true, false, true);
if(($player->gamemode & 0x01) === 0){

View File

@ -80,7 +80,7 @@ class PumpkinStem extends Flowable{
}
public function onActivate(Item $item, Player $player){
if($item->getID() === Item\Item::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
if($item->getID() === ItemItem::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
$this->meta = 0x07;
$this->level->setBlock($this, $this, true, false, true);
if(($player->gamemode & 0x01) === 0){
@ -95,7 +95,7 @@ class PumpkinStem extends Flowable{
public function getDrops(Item $item, Player $player){
return array(
array(Item\Item::PUMPKIN_SEEDS, 0, mt_rand(0, 2)),
array(ItemItem::PUMPKIN_SEEDS, 0, mt_rand(0, 2)),
);
}
}

View File

@ -21,10 +21,10 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\Level\Generator\Object\Tree as Tree;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Sapling extends Flowable{
const OAK = 0;
@ -58,7 +58,7 @@ class Sapling extends Flowable{
}
public function onActivate(Item $item, Player $player){
if($item->getID() === Item\Item::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
if($item->getID() === ItemItem::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
Tree::growTree($this->level, $this, new Random(), $this->meta & 0x03);
if(($player->gamemode & 0x01) === 0){
$item->count--;

View File

@ -78,7 +78,7 @@ class SignPost extends Transparent{
public function getDrops(Item $item, Player $player){
return array(
array(Item\Item::SIGN, 0, 1),
array(ItemItem::SIGN, 0, 1),
);
}
}

View File

@ -59,7 +59,7 @@ class SnowLayer extends Flowable{
public function getDrops(Item $item, Player $player){
if($item->isShovel() !== false){
return array(
array(Item\Item::SNOWBALL, 0, 1),
array(ItemItem::SNOWBALL, 0, 1),
);
}

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine;
class Sugarcane extends Flowable{
public function __construct($meta = 0){

View File

@ -32,7 +32,7 @@ class TNT extends Solid{
}
public function onActivate(Item $item, Player $player){
if($item->getID() === Item\Item::FLINT_STEEL){
if($item->getID() === ItemItem::FLINT_STEEL){
if(($player->gamemode & 0x01) === 0){
$item->useOn($this);
}

View File

@ -21,9 +21,9 @@
namespace PocketMine\Block;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Water extends Liquid{
public function __construct($meta = 0){

View File

@ -43,7 +43,7 @@ class Wheat extends Flowable{
}
public function onActivate(Item $item, Player $player){
if($item->getID() === Item\Item::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
if($item->getID() === ItemItem::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
$this->meta = 0x07;
$this->level->setBlock($this, $this, true, false, true);
if(($player->gamemode & 0x01) === 0){
@ -80,10 +80,10 @@ class Wheat extends Flowable{
public function getDrops(Item $item, Player $player){
$drops = array();
if($this->meta >= 0x07){
$drops[] = array(Item\Item::WHEAT, 0, 1);
$drops[] = array(Item\Item::WHEAT_SEEDS, 0, mt_rand(0, 3));
$drops[] = array(ItemItem::WHEAT, 0, 1);
$drops[] = array(ItemItem::WHEAT_SEEDS, 0, mt_rand(0, 3));
} else{
$drops[] = array(Item\Item::WHEAT_SEEDS, 0, 1);
$drops[] = array(ItemItem::WHEAT_SEEDS, 0, 1);
}
return $drops;

View File

@ -33,7 +33,7 @@ class WoodDoor extends Door{
public function getDrops(Item $item, Player $player){
return array(
array(Item\Item::WOODEN_DOOR, 0, 1),
array(ItemItem::WOODEN_DOOR, 0, 1),
);
}
}

View File

@ -24,7 +24,6 @@
*/
namespace PocketMine\Entity;
use PocketMine;
use PocketMine\Event\Entity\EntityLevelChangeEvent as EntityLevelChangeEvent;
use PocketMine\Event\Entity\EntityMotionEvent as EntityMotionEvent;
use PocketMine\Event\Entity\EntityMoveEvent as EntityMoveEvent;
@ -41,6 +40,7 @@ use PocketMine\Network\Protocol\RemoveEntityPacket as RemoveEntityPacket;
use PocketMine\Network\Protocol\SetEntityMotionPacket as SetEntityMotionPacket;
use PocketMine\Player as Player;
use PocketMine\PMF\LevelFormat as LevelFormat;
use PocketMine;
abstract class Entity extends Position{
public static $entityCount = 1;

View File

@ -21,7 +21,6 @@
namespace PocketMine\Entity;
use PocketMine;
use PocketMine\Event\Entity\EntityArmorChangeEvent as EntityArmorChangeEvent;
use PocketMine\Event\Entity\EntityInventoryChangeEvent as EntityInventoryChangeEvent;
use PocketMine\Event\Event as Event;
@ -35,6 +34,7 @@ use PocketMine\Network\Protocol\ContainerSetContentPacket as ContainerSetContent
use PocketMine\Network\Protocol\PlayerEquipmentPacket as PlayerEquipmentPacket;
use PocketMine\Network\Protocol\RemovePlayerPacket as RemovePlayerPacket;
use PocketMine\Network\Protocol\SetEntityMotionPacket as SetEntityMotionPacket;
use PocketMine;
class Human extends Creature implements ProjectileSource, InventorySource{

View File

@ -22,8 +22,8 @@
namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity as Entity;
use PocketMine;
use PocketMine\Event;
use PocketMine;
use PocketMine\Item\Item as Item;
class EntityArmorChangeEvent extends EntityEvent implements CancellableEvent{

View File

@ -22,8 +22,8 @@
namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity as Entity;
use PocketMine;
use PocketMine\Event;
use PocketMine;
use PocketMine\Item\Item as Item;
class EntityInventoryChangeEvent extends EntityEvent implements CancellableEvent{

View File

@ -22,8 +22,8 @@
namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity as Entity;
use PocketMine;
use PocketMine\Event;
use PocketMine;
use PocketMine\Level\Level as Level;
class EntityLevelChangeEvent extends EntityEvent implements CancellableEvent{

View File

@ -22,8 +22,8 @@
namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity as Entity;
use PocketMine;
use PocketMine\Event;
use PocketMine;
use PocketMine\Math\Vector3 as Vector3;
class EntityMotionEvent extends EntityEvent implements CancellableEvent{

View File

@ -22,8 +22,8 @@
namespace PocketMine\Event\Entity;
use PocketMine\Entity\Entity as Entity;
use PocketMine;
use PocketMine\Event;
use PocketMine;
use PocketMine\Math\Vector3 as Vector3;
class EntityMoveEvent extends EntityEvent implements CancellableEvent{

View File

@ -22,8 +22,8 @@
namespace PocketMine\Event\Tile;
use PocketMine\Event;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine;
use PocketMine\Tile\Tile as Tile;
class TileInventoryChangeEvent extends TileEvent implements CancellableEvent{

View File

@ -21,13 +21,13 @@
namespace PocketMine\Item;
use PocketMine;
use PocketMine\Block\Air as Air;
use PocketMine\Block\Block as Block;
use PocketMine\Block\Lava as Lava;
use PocketMine\Block\Liquid as Liquid;
use PocketMine\Block\Water as Water;
use PocketMine\Level\Level as Level;
use PocketMine;
class Bucket extends Item{
public function __construct($meta = 0, $count = 1){

View File

@ -21,11 +21,11 @@
namespace PocketMine\Item;
use PocketMine;
use PocketMine\Block\Block as Block;
use PocketMine\Block\Fire as Fire;
use PocketMine\Block\Solid as Solid;
use PocketMine\Level\Level as Level;
use PocketMine;
class FlintSteel extends Item{
public function __construct($meta = 0, $count = 1){

View File

@ -23,13 +23,13 @@
* All the Item classes
*/
namespace PocketMine\Item;
use PocketMine;
use PocketMine\Block\Block as Block;
use PocketMine\Entity\Entity as Entity;
use PocketMine\Item\Block as ItemBlock;
use PocketMine\Level\Level as Level;
use PocketMine\Recipes\Fuel as Fuel;
use PocketMine\Recipes\Smelt as Smelt;
use PocketMine;
class Item{
//All Block IDs are here too

View File

@ -21,10 +21,10 @@
namespace PocketMine\Item;
use PocketMine;
use PocketMine\Block\Block as Block;
use PocketMine\Level\Level as Level;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Painting extends Item{
public function __construct($meta = 0, $count = 1){

View File

@ -21,9 +21,9 @@
namespace PocketMine\Item;
use PocketMine;
use PocketMine\Block\Block as Block;
use PocketMine\Level\Level as Level;
use PocketMine;
class SpawnEgg extends Item{
public function __construct($meta = 0, $count = 1){

View File

@ -21,13 +21,13 @@
namespace PocketMine\Level;
use PocketMine;
use PocketMine\Block\Block as Block;
use PocketMine\Block\TNT as TNT;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Network\Protocol\ExplodePacket as ExplodePacket;
use PocketMine\Player as Player;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Explosion{
public static $specialDrops = array(

View File

@ -24,7 +24,6 @@
*/
namespace PocketMine\Level;
use PocketMine;
use PocketMine\Block\Air as Air;
use PocketMine\Block\Block as Block;
use PocketMine\Level\Generator\Generator as Generator;
@ -42,6 +41,7 @@ use PocketMine\Tile\Sign as Sign;
use PocketMine\Tile\Tile as Tile;
use PocketMine\Utils\Cache as Cache;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Level{
public $players = array();

View File

@ -21,9 +21,9 @@
namespace PocketMine\Level;
use PocketMine;
use PocketMine\PMF\LevelFormat as LevelFormat;
use PocketMine\Utils\Config as Config;
use PocketMine;
class LevelImport{
private $path;

View File

@ -21,12 +21,12 @@
namespace PocketMine\Level;
use PocketMine;
use PocketMine\Level\Generator\Generator as Generator;
use PocketMine\PMF\LevelFormat as LevelFormat;
use PocketMine\Utils\Config as Config;
use PocketMine\Utils\Random as Random;
use PocketMine\Utils\Utils as Utils;
use PocketMine;
class WorldGenerator{
private $seed, $level, $path, $random, $generator, $height;

View File

@ -21,7 +21,6 @@
namespace PocketMine\Level\Generator;
use PocketMine;
use PocketMine\Block\CoalOre as CoalOre;
use PocketMine\Block\DiamondOre as DiamondOre;
use PocketMine\Block\Dirt as Dirt;
@ -35,6 +34,7 @@ use PocketMine\Level\Generator\Populator\Ore as Ore;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Flat extends Generator{
private $level, $random, $structure, $chunks, $options, $floorLevel, $preset, $populators = array();

View File

@ -24,9 +24,9 @@
*/
namespace PocketMine\Level\Generator;
use PocketMine;
use PocketMine\Level\Level as Level;
use PocketMine\Utils\Random as Random;
use PocketMine;
abstract class Generator{
private static $list = array();

View File

@ -21,7 +21,6 @@
namespace PocketMine\Level\Generator;
use PocketMine;
use PocketMine\Block\CoalOre as CoalOre;
use PocketMine\Block\DiamondOre as DiamondOre;
use PocketMine\Block\Dirt as Dirt;
@ -38,6 +37,7 @@ use PocketMine\Level\Generator\Populator\Tree as Tree;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Normal extends Generator{

View File

@ -21,9 +21,9 @@
namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine;
class BigTree extends Tree{
private $trunkHeightMultiplier = 0.618;

View File

@ -21,11 +21,11 @@
namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Math\VectorMath as VectorMath;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Ore{
private $random;

View File

@ -21,13 +21,13 @@
namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Dirt as Dirt;
use PocketMine\Block\Leaves as Leaves;
use PocketMine\Block\Wood as Wood;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random as Random;
use PocketMine;
class PineTree extends Tree{
var $type = 1;

View File

@ -21,11 +21,11 @@
namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Block as Block;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Pond{
private $random;

View File

@ -21,13 +21,13 @@
namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Dirt as Dirt;
use PocketMine\Block\Leaves as Leaves;
use PocketMine\Block\Wood as Wood;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random as Random;
use PocketMine;
class SmallTree extends Tree{
public $type = 0;

View File

@ -21,13 +21,13 @@
namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Dirt as Dirt;
use PocketMine\Block\Leaves as Leaves;
use PocketMine\Block\Wood as Wood;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random as Random;
use PocketMine;
class SpruceTree extends Tree{
var $type = 1;

View File

@ -22,8 +22,8 @@
namespace PocketMine\Level\Generator\Object;
use PocketMine\Block\Block as Block;
use PocketMine;
use PocketMine\Level;
use PocketMine;
use PocketMine\Math\Vector3 as Vector3;
class TallGrass{

View File

@ -21,10 +21,10 @@
namespace PocketMine\Level\Generator\Object;
use PocketMine;
use PocketMine\Block\Sapling as Sapling;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine;
class Tree{
public $overridable = array(

View File

@ -21,9 +21,9 @@
namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Level\Level as Level;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Mineshaft extends Populator{
private static $DISTANCE = 256;

View File

@ -21,11 +21,11 @@
namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Level\Generator\Object\Ore as ObjectOre;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Ore extends Populator{
private $oreTypes = array();

View File

@ -21,11 +21,11 @@
namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Block\Water as Water;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Pond extends Populator{
private $waterOdd = 4;

View File

@ -24,9 +24,9 @@
*/
namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Level\Level as Level;
use PocketMine\Utils\Random as Random;
use PocketMine;
abstract class Populator{
public abstract function populate(Level $level, $chunkX, $chunkZ, Random $random);

View File

@ -21,9 +21,9 @@
namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Block\TallGrass as BlockTallGrass;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine;
class TallGrass extends Populator{
private $level;

View File

@ -21,10 +21,10 @@
namespace PocketMine\Level\Generator\Populator;
use PocketMine;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\Utils\Random as Random;
use PocketMine;
class Tree extends Populator{
private $level;

View File

@ -37,7 +37,6 @@ const TAG_String = 8;
const TAG_Enum = 9;
const TAG_Compound = 10;
const TAG_Int_Array = 11;
use PocketMine;
use PocketMine\NBT\Tag\Byte as Byte;
use PocketMine\NBT\Tag\Byte_Array as Byte_Array;
use PocketMine\NBT\Tag\Compound as Compound;
@ -53,6 +52,7 @@ use PocketMine\NBT\Tag\Short as Short;
use PocketMine\NBT\Tag\String as String;
use PocketMine\NBT\Tag\Tag as Tag;
use PocketMine\Utils\Utils as Utils;
use PocketMine;
class NBT implements \ArrayAccess{
private $buffer;

View File

@ -21,9 +21,9 @@
namespace PocketMine\NBT\Tag;
use PocketMine\NBT;
use PocketMine;
use PocketMine\NBT\Tag\Enum as TagEnum;
use PocketMine;
use PocketMine\NBT;
class Enum extends NamedTag implements \ArrayAccess, \Iterator{

View File

@ -24,7 +24,6 @@
*/
namespace PocketMine\Network;
use PocketMine;
use PocketMine\Event\Event as Event;
use PocketMine\Event\EventHandler as EventHandler;
use PocketMine\Event\Server\PacketReceiveEvent as PacketReceiveEvent;
@ -34,6 +33,7 @@ use PocketMine\Network\Query\QueryPacket as QueryPacket;
use PocketMine\Network\RakNet\Info as Info;
use PocketMine\Network\RakNet\Packet as Packet;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
class Handler{
public $bandwidth;

View File

@ -21,9 +21,9 @@
namespace PocketMine\Network\Protocol;
use PocketMine;
use PocketMine\Item\Item as Item;
use PocketMine\Utils\Utils as Utils;
use PocketMine;
abstract class DataPacket{
private $offset = 0;

View File

@ -25,10 +25,10 @@
*/
namespace PocketMine\Network\Query;
use PocketMine;
use PocketMine\Player as Player;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine\Utils\Utils as Utils;
use PocketMine;
class QueryHandler{
private $socket, $server, $lastToken, $token, $longData, $timeout;

View File

@ -21,9 +21,9 @@
namespace PocketMine\Network\Query;
use PocketMine;
use PocketMine\Network\Packet as Packet;
use PocketMine\Utils\Utils as Utils;
use PocketMine;
class QueryPacket extends Packet{
const HANDSHAKE = 9;

View File

@ -21,10 +21,10 @@
namespace PocketMine\Network\RakNet;
use PocketMine;
use PocketMine\Network\Packet as NetworkPacket;
use PocketMine\Network\Protocol\Info as ProtocolInfo;
use PocketMine\Utils\Utils as Utils;
use PocketMine;
class Packet extends NetworkPacket{
private $packetID;

View File

@ -21,11 +21,11 @@
namespace PocketMine\PMF;
use PocketMine;
use PocketMine\Level\Level as Level;
use PocketMine\NBT\Tag\Compound as Compound;
use PocketMine\NBT\Tag\Enum as Enum;
use PocketMine\Utils\Utils as Utils;
use PocketMine;
class LevelFormat extends PMF{
const VERSION = 2;

View File

@ -24,9 +24,9 @@
*/
namespace PocketMine\Recipes;
use PocketMine;
use PocketMine\BlockAPI as BlockAPI;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
abstract class Crafting{
private static $small = array( //Probably means craftable on crafting bench and in inventory. Name it better!

View File

@ -22,31 +22,32 @@
namespace PocketMine\Recipes;
use PocketMine;
use PocketMine\Item\Item as Item;
abstract class Fuel{
public static $duration = array(
Item\Item::COAL => 80,
Item\Item::COAL_BLOCK => 800,
Item\Item::TRUNK => 15,
Item\Item::WOODEN_PLANKS => 15,
Item\Item::SAPLING => 5,
Item\Item::WOODEN_AXE => 10,
Item\Item::WOODEN_PICKAXE => 10,
Item\Item::WOODEN_SWORD => 10,
Item\Item::WOODEN_SHOVEL => 10,
Item\Item::WOODEN_HOE => 10,
Item\Item::STICK => 5,
Item\Item::FENCE => 15,
Item\Item::FENCE_GATE => 15,
Item\Item::WOODEN_STAIRS => 15,
Item\Item::SPRUCE_WOOD_STAIRS => 15,
Item\Item::BIRCH_WOOD_STAIRS => 15,
Item\Item::JUNGLE_WOOD_STAIRS => 15,
Item\Item::TRAPDOOR => 15,
Item\Item::WORKBENCH => 15,
Item\Item::BOOKSHELF => 15,
Item\Item::CHEST => 15,
Item\Item::BUCKET => 1000,
Item::COAL => 80,
Item::COAL_BLOCK => 800,
Item::TRUNK => 15,
Item::WOODEN_PLANKS => 15,
Item::SAPLING => 5,
Item::WOODEN_AXE => 10,
Item::WOODEN_PICKAXE => 10,
Item::WOODEN_SWORD => 10,
Item::WOODEN_SHOVEL => 10,
Item::WOODEN_HOE => 10,
Item::STICK => 5,
Item::FENCE => 15,
Item::FENCE_GATE => 15,
Item::WOODEN_STAIRS => 15,
Item::SPRUCE_WOOD_STAIRS => 15,
Item::BIRCH_WOOD_STAIRS => 15,
Item::JUNGLE_WOOD_STAIRS => 15,
Item::TRAPDOOR => 15,
Item::WORKBENCH => 15,
Item::BOOKSHELF => 15,
Item::CHEST => 15,
Item::BUCKET => 1000,
);

View File

@ -21,23 +21,24 @@
namespace PocketMine\Recipes;
use PocketMine;
use PocketMine\Item\Item as Item;
class Smelt{
public static $product = array(
Item\Item::COBBLESTONE => array(Item\Item::STONE, 0),
Item\Item::SAND => array(Item\Item::GLASS, 0),
Item\Item::TRUNK => array(Item\Item::COAL, 1), //Charcoal
Item\Item::GOLD_ORE => array(Item\Item::GOLD_INGOT, 0),
Item\Item::IRON_ORE => array(Item\Item::IRON_INGOT, 0),
Item\Item::NETHERRACK => array(Item\Item::NETHER_BRICK, 0),
Item\Item::RAW_PORKCHOP => array(Item\Item::COOKED_PORKCHOP, 0),
Item\Item::CLAY => array(Item\Item::BRICK, 0),
//Item\Item::RAW_FISH => array(Item\Item::COOKED_FISH, 0),
Item\Item::CACTUS => array(Item\Item::DYE, 2),
Item\Item::RED_MUSHROOM => array(Item\Item::DYE, 1),
Item\Item::RAW_BEEF => array(Item\Item::STEAK, 0),
Item\Item::RAW_CHICKEN => array(Item\Item::COOKED_CHICKEN, 0),
Item\Item::RED_MUSHROOM => array(Item\Item::DYE, 1),
Item\Item::POTATO => array(Item\Item::BAKED_POTATO, 0),
Item::COBBLESTONE => array(Item::STONE, 0),
Item::SAND => array(Item::GLASS, 0),
Item::TRUNK => array(Item::COAL, 1), //Charcoal
Item::GOLD_ORE => array(Item::GOLD_INGOT, 0),
Item::IRON_ORE => array(Item::IRON_INGOT, 0),
Item::NETHERRACK => array(Item::NETHER_BRICK, 0),
Item::RAW_PORKCHOP => array(Item::COOKED_PORKCHOP, 0),
Item::CLAY => array(Item::BRICK, 0),
//Item::RAW_FISH => array(Item::COOKED_FISH, 0),
Item::CACTUS => array(Item::DYE, 2),
Item::RED_MUSHROOM => array(Item::DYE, 1),
Item::RAW_BEEF => array(Item::STEAK, 0),
Item::RAW_CHICKEN => array(Item::COOKED_CHICKEN, 0),
Item::RED_MUSHROOM => array(Item::DYE, 1),
Item::POTATO => array(Item::BAKED_POTATO, 0),
);
}

View File

@ -21,13 +21,13 @@
namespace PocketMine\Tile;
use PocketMine;
use PocketMine\Level\Level as Level;
use PocketMine\Math\Vector3 as Vector3;
use PocketMine\NBT\Tag\Compound as Compound;
use PocketMine\NBT\Tag\Int as Int;
use PocketMine\NBT\Tag\String as String;
use PocketMine\Network\Protocol\EntityDataPacket as EntityDataPacket;
use PocketMine;
class Chest extends Spawnable{
use Container;

View File

@ -21,7 +21,6 @@
namespace PocketMine\Tile;
use PocketMine;
use PocketMine\Event\Event as Event;
use PocketMine\Event\EventHandler as EventHandler;
use PocketMine\Event\Tile\TileInventoryChangeEvent as TileInventoryChangeEvent;
@ -30,6 +29,7 @@ use PocketMine\NBT\Tag\Byte as Byte;
use PocketMine\NBT\Tag\Compound as Compound;
use PocketMine\NBT\Tag\Short as Short;
use PocketMine\Player as Player;
use PocketMine;
trait Container{
public function openInventory(Player $player){

View File

@ -21,11 +21,11 @@
namespace PocketMine\Tile;
use PocketMine;
use PocketMine\Block\Block as Block;
use PocketMine\Item\Item as Item;
use PocketMine\Level\Level as Level;
use PocketMine\NBT\Tag\Compound as Compound;
use PocketMine;
class Furnace extends Tile{
use Container;

View File

@ -21,12 +21,12 @@
namespace PocketMine\Tile;
use PocketMine;
use PocketMine\NBT\NBT as NBT;
use PocketMine\NBT\Tag\Compound as Compound;
use PocketMine\NBT\Tag\Int as Int;
use PocketMine\NBT\Tag\String as String;
use PocketMine\Network\Protocol\EntityDataPacket as EntityDataPacket;
use PocketMine;
class Sign extends Spawnable{

View File

@ -25,11 +25,11 @@
*/
namespace PocketMine\Tile;
use PocketMine;
use PocketMine\Level\Level as Level;
use PocketMine\NBT\Tag\Compound as Compound;
use PocketMine\PMF\LevelFormat as LevelFormat;
use PocketMine\ServerAPI as ServerAPI;
use PocketMine;
abstract class Tile extends Position{
const SIGN = "Sign";