Regenerated block/item id lists and refactored some names for consistency with MCPE

This commit is contained in:
Dylan K. Taylor 2017-08-04 12:16:44 +01:00
parent 3048a3b39b
commit 561d8e7a39
39 changed files with 301 additions and 282 deletions

View File

@ -2234,25 +2234,25 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$item = $this->inventory->getItemInHand();
$damageTable = [
Item::WOODEN_SWORD => 4,
Item::GOLD_SWORD => 4,
Item::GOLDEN_SWORD => 4,
Item::STONE_SWORD => 5,
Item::IRON_SWORD => 6,
Item::DIAMOND_SWORD => 7,
Item::WOODEN_AXE => 3,
Item::GOLD_AXE => 3,
Item::GOLDEN_AXE => 3,
Item::STONE_AXE => 3,
Item::IRON_AXE => 5,
Item::DIAMOND_AXE => 6,
Item::WOODEN_PICKAXE => 2,
Item::GOLD_PICKAXE => 2,
Item::GOLDEN_PICKAXE => 2,
Item::STONE_PICKAXE => 3,
Item::IRON_PICKAXE => 4,
Item::DIAMOND_PICKAXE => 5,
Item::WOODEN_SHOVEL => 1,
Item::GOLD_SHOVEL => 1,
Item::GOLDEN_SHOVEL => 1,
Item::STONE_SHOVEL => 2,
Item::IRON_SHOVEL => 3,
Item::DIAMOND_SHOVEL => 4,
@ -2276,14 +2276,14 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
Item::LEATHER_TUNIC => 3,
Item::LEATHER_PANTS => 2,
Item::LEATHER_BOOTS => 1,
Item::CHAIN_HELMET => 1,
Item::CHAIN_CHESTPLATE => 5,
Item::CHAIN_LEGGINGS => 4,
Item::CHAIN_BOOTS => 1,
Item::GOLD_HELMET => 1,
Item::GOLD_CHESTPLATE => 5,
Item::GOLD_LEGGINGS => 3,
Item::GOLD_BOOTS => 1,
Item::CHAINMAIL_HELMET => 1,
Item::CHAINMAIL_CHESTPLATE => 5,
Item::CHAINMAIL_LEGGINGS => 4,
Item::CHAINMAIL_BOOTS => 1,
Item::GOLDEN_HELMET => 1,
Item::GOLDEN_CHESTPLATE => 5,
Item::GOLDEN_LEGGINGS => 3,
Item::GOLDEN_BOOTS => 1,
Item::IRON_HELMET => 2,
Item::IRON_CHESTPLATE => 6,
Item::IRON_LEGGINGS => 5,
@ -2994,7 +2994,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
}
switch($recipe->getResult()->getId()){
case Item::WORKBENCH:
case Item::CRAFTING_TABLE:
$this->awardAchievement("buildWorkBench");
break;
case Item::WOODEN_PICKAXE:
@ -3015,7 +3015,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$this->inventory->addItem(Item::get(Item::BUCKET, 0, 3));
break;
case Item::STONE_PICKAXE:
case Item::GOLD_PICKAXE:
case Item::GOLDEN_PICKAXE:
case Item::IRON_PICKAXE:
case Item::DIAMOND_PICKAXE:
$this->awardAchievement("buildBetterPickaxe");

View File

@ -25,7 +25,7 @@ namespace pocketmine\block;
class AcaciaWoodStairs extends WoodStairs{
protected $id = self::ACACIA_WOOD_STAIRS;
protected $id = self::ACACIA_STAIRS;
public function getName(){
return "Acacia Wood Stairs";

View File

@ -25,7 +25,7 @@ namespace pocketmine\block;
class BirchWoodStairs extends WoodStairs{
protected $id = self::BIRCH_WOOD_STAIRS;
protected $id = self::BIRCH_STAIRS;
public function getName(){
return "Birch Wood Stairs";

View File

@ -124,12 +124,12 @@ class Block extends Position implements BlockIds, Metadatable{
self::registerBlock(new RedMushroom());
self::registerBlock(new Gold());
self::registerBlock(new Iron());
self::registerBlock(new DoubleSlab());
self::registerBlock(new DoubleStoneSlab());
self::registerBlock(new Slab());
self::registerBlock(new Bricks());
self::registerBlock(new TNT());
self::registerBlock(new Bookshelf());
self::registerBlock(new MossStone());
self::registerBlock(new MossyCobblestone());
self::registerBlock(new Obsidian());
self::registerBlock(new Torch());
self::registerBlock(new Fire());
@ -139,13 +139,13 @@ class Block extends Position implements BlockIds, Metadatable{
self::registerBlock(new DiamondOre());
self::registerBlock(new Diamond());
self::registerBlock(new Workbench());
self::registerBlock(new CraftingTable());
self::registerBlock(new Wheat());
self::registerBlock(new Farmland());
self::registerBlock(new Furnace());
self::registerBlock(new BurningFurnace());
self::registerBlock(new SignPost());
self::registerBlock(new WoodDoor());
self::registerBlock(new WoodenDoor());
self::registerBlock(new Ladder());
self::registerBlock(new Rail());
self::registerBlock(new CobblestoneStairs());
@ -215,12 +215,12 @@ class Block extends Position implements BlockIds, Metadatable{
self::registerBlock(new BirchWoodStairs());
self::registerBlock(new JungleWoodStairs());
self::registerBlock(new StoneWall());
self::registerBlock(new CobblestoneWall());
self::registerBlock(new FlowerPot());
self::registerBlock(new Carrot());
self::registerBlock(new Potato());
self::registerBlock(new WoodenButton());
self::registerBlock(new MobHead());
self::registerBlock(new Skull());
self::registerBlock(new Anvil());
self::registerBlock(new TrappedChest());
self::registerBlock(new WeightedPressurePlateLight());
@ -232,7 +232,7 @@ class Block extends Position implements BlockIds, Metadatable{
self::registerBlock(new Quartz());
self::registerBlock(new QuartzStairs());
self::registerBlock(new DoubleWoodSlab());
self::registerBlock(new WoodSlab());
self::registerBlock(new WoodenSlab());
self::registerBlock(new StainedClay());
self::registerBlock(new Leaves2());

View File

@ -29,20 +29,20 @@ interface BlockIds{
const STONE = 1;
const GRASS = 2;
const DIRT = 3;
const COBBLESTONE = 4, COBBLE = 4;
const PLANK = 5, PLANKS = 5, WOODEN_PLANK = 5, WOODEN_PLANKS = 5;
const SAPLING = 6, SAPLINGS = 6;
const COBBLESTONE = 4;
const PLANKS = 5, WOODEN_PLANKS = 5;
const SAPLING = 6;
const BEDROCK = 7;
const WATER = 8;
const STILL_WATER = 9;
const LAVA = 10;
const STILL_LAVA = 11;
const FLOWING_WATER = 8;
const STILL_WATER = 9, WATER = 9;
const FLOWING_LAVA = 10;
const LAVA = 11, STILL_LAVA = 11;
const SAND = 12;
const GRAVEL = 13;
const GOLD_ORE = 14;
const IRON_ORE = 15;
const COAL_ORE = 16;
const LOG = 17, WOOD = 17, TRUNK = 17;
const LOG = 17, WOOD = 17;
const LEAVES = 18;
const SPONGE = 19;
const GLASS = 20;
@ -50,35 +50,35 @@ interface BlockIds{
const LAPIS_BLOCK = 22;
const DISPENSER = 23;
const SANDSTONE = 24;
const NOTE_BLOCK = 25, NOTEBLOCK = 25;
const NOTEBLOCK = 25, NOTE_BLOCK = 25;
const BED_BLOCK = 26;
const POWERED_RAIL = 27;
const GOLDEN_RAIL = 27, POWERED_RAIL = 27;
const DETECTOR_RAIL = 28;
const STICKY_PISTON = 29;
const COBWEB = 30;
const TALL_GRASS = 31;
const BUSH = 32, DEAD_BUSH = 32;
const COBWEB = 30, WEB = 30;
const TALLGRASS = 31, TALL_GRASS = 31;
const DEADBUSH = 32, DEAD_BUSH = 32;
const PISTON = 33;
const PISTON_HEAD = 34;
const PISTONARMCOLLISION = 34, PISTON_ARM_COLLISION = 34;
const WOOL = 35;
const DANDELION = 37;
const POPPY = 38, ROSE = 38, RED_FLOWER = 38;
const DANDELION = 37, YELLOW_FLOWER = 37;
const POPPY = 38, RED_FLOWER = 38;
const BROWN_MUSHROOM = 39;
const RED_MUSHROOM = 40;
const GOLD_BLOCK = 41;
const IRON_BLOCK = 42;
const DOUBLE_SLAB = 43, DOUBLE_SLABS = 43;
const SLAB = 44, SLABS = 44, STONE_SLAB = 44;
const BRICKS = 45, BRICKS_BLOCK = 45;
const DOUBLE_STONE_SLAB = 43;
const STONE_SLAB = 44;
const BRICK_BLOCK = 45;
const TNT = 46;
const BOOKSHELF = 47;
const MOSS_STONE = 48, MOSSY_STONE = 48;
const MOSSY_COBBLESTONE = 48, MOSS_STONE = 48;
const OBSIDIAN = 49;
const TORCH = 50;
const FIRE = 51;
const MONSTER_SPAWNER = 52;
const WOOD_STAIRS = 53, WOODEN_STAIRS = 53, OAK_WOOD_STAIRS = 53, OAK_WOODEN_STAIRS = 53;
const MOB_SPAWNER = 52, MONSTER_SPAWNER = 52;
const OAK_STAIRS = 53, WOODEN_STAIRS = 53;
const CHEST = 54;
const REDSTONE_WIRE = 55;
const DIAMOND_ORE = 56;
@ -88,11 +88,11 @@ interface BlockIds{
const FARMLAND = 60;
const FURNACE = 61;
const BURNING_FURNACE = 62, LIT_FURNACE = 62;
const SIGN_POST = 63;
const DOOR_BLOCK = 64, WOODEN_DOOR_BLOCK = 64, WOOD_DOOR_BLOCK = 64;
const SIGN_POST = 63, STANDING_SIGN = 63;
const WOODEN_DOOR_BLOCK = 64;
const LADDER = 65;
const RAIL = 66;
const COBBLESTONE_STAIRS = 67, COBBLE_STAIRS = 67;
const COBBLESTONE_STAIRS = 67, STONE_STAIRS = 67;
const WALL_SIGN = 68;
const LEVER = 69;
const STONE_PRESSURE_PLATE = 70;
@ -101,117 +101,119 @@ interface BlockIds{
const REDSTONE_ORE = 73;
const GLOWING_REDSTONE_ORE = 74, LIT_REDSTONE_ORE = 74;
const UNLIT_REDSTONE_TORCH = 75;
const REDSTONE_TORCH = 76, LIT_REDSTONE_TORCH = 76;
const LIT_REDSTONE_TORCH = 76, REDSTONE_TORCH = 76;
const STONE_BUTTON = 77;
const SNOW = 78, SNOW_LAYER = 78;
const SNOW_LAYER = 78;
const ICE = 79;
const SNOW_BLOCK = 80;
const SNOW = 80, SNOW_BLOCK = 80;
const CACTUS = 81;
const CLAY_BLOCK = 82;
const REEDS = 83, SUGARCANE_BLOCK = 83;
const REEDS_BLOCK = 83, SUGARCANE_BLOCK = 83;
const FENCE = 85;
const PUMPKIN = 86;
const NETHERRACK = 87;
const SOUL_SAND = 88;
const GLOWSTONE = 89, GLOWSTONE_BLOCK = 89;
const PORTAL_BLOCK = 90, PORTAL = 90;
const GLOWSTONE = 89;
const PORTAL = 90;
const JACK_O_LANTERN = 91, LIT_PUMPKIN = 91;
const CAKE_BLOCK = 92;
const REPEATER_BLOCK = 93, UNPOWERED_REPEATER_BLOCK = 93;
const POWERED_REPEATER_BLOCK = 94;
const INVISIBLE_BEDROCK = 95;
const REPEATER_BLOCK = 93, UNPOWERED_REPEATER = 93;
const POWERED_REPEATER = 94;
const INVISIBLEBEDROCK = 95, INVISIBLE_BEDROCK = 95;
const TRAPDOOR = 96, WOODEN_TRAPDOOR = 96;
const MONSTER_EGG_BLOCK = 97;
const STONE_BRICKS = 98, STONE_BRICK = 98;
const MONSTER_EGG = 97;
const STONEBRICK = 98, STONE_BRICK = 98, STONE_BRICKS = 98;
const BROWN_MUSHROOM_BLOCK = 99;
const RED_MUSHROOM_BLOCK = 100;
const IRON_BARS = 101, IRON_BAR = 101;
const GLASS_PANE = 102, GLASS_PANEL = 102;
const IRON_BARS = 101;
const GLASS_PANE = 102;
const MELON_BLOCK = 103;
const PUMPKIN_STEM = 104;
const MELON_STEM = 105;
const VINES = 106, VINE = 106;
const VINE = 106, VINES = 106;
const FENCE_GATE = 107, OAK_FENCE_GATE = 107;
const BRICK_STAIRS = 108;
const STONE_BRICK_STAIRS = 109;
const MYCELIUM = 110;
const LILY_PAD = 111, WATER_LILY = 111;
const NETHER_BRICKS = 112, NETHER_BRICK_BLOCK = 112;
const LILY_PAD = 111, WATERLILY = 111, WATER_LILY = 111;
const NETHER_BRICK = 112, NETHER_BRICK_BLOCK = 112;
const NETHER_BRICK_FENCE = 113;
const NETHER_BRICK_STAIRS = 114, NETHER_BRICKS_STAIRS = 114;
const NETHER_WART_BLOCK = 115;
const ENCHANTING_TABLE = 116, ENCHANT_TABLE = 116, ENCHANTMENT_TABLE = 116;
const NETHER_BRICK_STAIRS = 114;
const NETHER_WART_PLANT = 115;
const ENCHANTING_TABLE = 116, ENCHANTMENT_TABLE = 116;
const BREWING_STAND_BLOCK = 117;
const CAULDRON_BLOCK = 118;
const END_PORTAL_FRAME = 120, END_PORTAL = 120;
const END_PORTAL = 119;
const END_PORTAL_FRAME = 120;
const END_STONE = 121;
const REDSTONE_LAMP = 123, INACTIVE_REDSTONE_LAMP = 123;
const LIT_REDSTONE_LAMP = 124, ACTIVE_REDSTONE_LAMP = 124;
const DRAGON_EGG = 122;
const REDSTONE_LAMP = 123;
const LIT_REDSTONE_LAMP = 124;
const DROPPER = 125;
const ACTIVATOR_RAIL = 126;
const COCOA_BLOCK = 127, COCOA_PODS = 127;
const COCOA = 127, COCOA_BLOCK = 127;
const SANDSTONE_STAIRS = 128;
const EMERALD_ORE = 129;
const ENDER_CHEST = 130;
const TRIPWIRE_HOOK = 131;
const TRIPWIRE = 132;
const TRIPWIRE = 132, TRIP_WIRE = 132;
const EMERALD_BLOCK = 133;
const SPRUCE_WOOD_STAIRS = 134, SPRUCE_WOODEN_STAIRS = 134;
const BIRCH_WOOD_STAIRS = 135, BIRCH_WOODEN_STAIRS = 135;
const JUNGLE_WOOD_STAIRS = 136, JUNGLE_WOODEN_STAIRS = 136;
const SPRUCE_STAIRS = 134;
const BIRCH_STAIRS = 135;
const JUNGLE_STAIRS = 136;
const COMMAND_BLOCK = 137;
const BEACON = 138;
const COBBLESTONE_WALL = 139, COBBLE_WALL = 139, STONE_WALL = 139;
const COBBLESTONE_WALL = 139, STONE_WALL = 139;
const FLOWER_POT_BLOCK = 140;
const CARROT_BLOCK = 141;
const POTATO_BLOCK = 142;
const CARROTS = 141, CARROT_BLOCK = 141;
const POTATOES = 142, POTATO_BLOCK = 142;
const WOODEN_BUTTON = 143;
const MOB_HEAD_BLOCK = 144, SKULL_BLOCK = 144;
const ANVIL = 145;
const TRAPPED_CHEST = 146;
const WEIGHTED_PRESSURE_PLATE_LIGHT = 147, LIGHT_WEIGHTED_PRESSURE_PLATE = 147, GOLD_PRESSURE_PLATE = 147;
const WEIGHTED_PRESSURE_PLATE_HEAVY = 148, HEAVY_WEIGHTED_PRESSURE_PLATE = 148, IRON_PRESSURE_PLATE = 148;
const COMPARATOR_BLOCK = 149, UNPOWERED_COMPARATOR_BLOCK = 149;
const POWERED_COMPARATOR_BLOCK = 150;
const DAYLIGHT_SENSOR = 151;
const LIGHT_WEIGHTED_PRESSURE_PLATE = 147;
const HEAVY_WEIGHTED_PRESSURE_PLATE = 148;
const COMPATATOR_BLOCK = 149, UNPOWERED_COMPARATOR = 149;
const POWERED_COMPARATOR = 150;
const DAYLIGHT_DETECTOR = 151, DAYLIGHT_SENSOR = 151;
const REDSTONE_BLOCK = 152;
const NETHER_QUARTZ_ORE = 153;
const NETHER_QUARTZ_ORE = 153, QUARTZ_ORE = 153;
const HOPPER_BLOCK = 154;
const QUARTZ_BLOCK = 155;
const QUARTZ_STAIRS = 156;
const DOUBLE_WOOD_SLAB = 157, DOUBLE_WOODEN_SLAB = 157, DOUBLE_WOOD_SLABS = 157, DOUBLE_WOODEN_SLABS = 157;
const WOOD_SLAB = 158, WOODEN_SLAB = 158, WOOD_SLABS = 158, WOODEN_SLABS = 158;
const STAINED_CLAY = 159, STAINED_HARDENED_CLAY = 159;
const DOUBLE_WOODEN_SLAB = 157;
const WOODEN_SLAB = 158;
const STAINED_CLAY = 159, STAINED_HARDENED_CLAY = 159, TERRACOTTA = 159;
const STAINED_GLASS_PANE = 160;
const LEAVES2 = 161;
const WOOD2 = 162, TRUNK2 = 162, LOG2 = 162;
const ACACIA_WOOD_STAIRS = 163, ACACIA_WOODEN_STAIRS = 163;
const DARK_OAK_WOOD_STAIRS = 164, DARK_OAK_WOODEN_STAIRS = 164;
const SLIME_BLOCK = 165;
const LOG2 = 162, WOOD2 = 162;
const ACACIA_STAIRS = 163;
const DARK_OAK_STAIRS = 164;
const SLIME = 165, SLIME_BLOCK = 165;
const IRON_TRAPDOOR = 167;
const PRISMARINE = 168;
const SEA_LANTERN = 169;
const HAY_BALE = 170;
const SEALANTERN = 169, SEA_LANTERN = 169;
const HAY_BALE = 170, HAY_BLOCK = 170;
const CARPET = 171;
const HARDENED_CLAY = 172;
const COAL_BLOCK = 173;
const PACKED_ICE = 174;
const DOUBLE_PLANT = 175;
const INVERTED_DAYLIGHT_SENSOR = 178, DAYLIGHT_SENSOR_INVERTED = 178;
const DAYLIGHT_DETECTOR_INVERTED = 178, DAYLIGHT_SENSOR_INVERTED = 178;
const RED_SANDSTONE = 179;
const RED_SANDSTONE_STAIRS = 180;
const DOUBLE_RED_SANDSTONE_SLAB = 181;
const RED_SANDSTONE_SLAB = 182;
const SPRUCE_FENCE_GATE = 183, FENCE_GATE_SPRUCE = 183;
const BIRCH_FENCE_GATE = 184, FENCE_GATE_BIRCH = 184;
const JUNGLE_FENCE_GATE = 185, FENCE_GATE_JUNGLE = 185;
const DARK_OAK_FENCE_GATE = 186, FENCE_GATE_DARK_OAK = 186;
const ACACIA_FENCE_GATE = 187, FENCE_GATE_ACACIA = 187;
const DOUBLE_STONE_SLAB2 = 181;
const STONE_SLAB2 = 182;
const SPRUCE_FENCE_GATE = 183;
const BIRCH_FENCE_GATE = 184;
const JUNGLE_FENCE_GATE = 185;
const DARK_OAK_FENCE_GATE = 186;
const ACACIA_FENCE_GATE = 187;
const REPEATING_COMMAND_BLOCK = 188;
const CHAIN_COMMAND_BLOCK = 189;
const SPRUCE_DOOR_BLOCK = 193;
const BIRCH_DOOR_BLOCK = 194;
@ -219,16 +221,56 @@ interface BlockIds{
const ACACIA_DOOR_BLOCK = 196;
const DARK_OAK_DOOR_BLOCK = 197;
const GRASS_PATH = 198;
const ITEM_FRAME_BLOCK = 199;
const FRAME_BLOCK = 199, ITEM_FRAME_BLOCK = 199;
const CHORUS_FLOWER = 200;
const PURPUR_BLOCK = 201;
const PURPUR_STAIRS = 203;
const END_BRICKS = 206;
const FROSTED_ICE = 207;
const END_ROD = 208;
const END_GATEWAY = 209;
const MAGMA = 213;
const NETHER_WART_BLOCK = 214;
const RED_NETHER_BRICK = 215;
const BONE_BLOCK = 216;
const SHULKER_BOX = 218;
const PURPLE_GLAZED_TERRACOTTA = 219;
const WHITE_GLAZED_TERRACOTTA = 220;
const ORANGE_GLAZED_TERRACOTTA = 221;
const MAGENTA_GLAZED_TERRACOTTA = 222;
const LIGHT_BLUE_GLAZED_TERRACOTTA = 223;
const YELLOW_GLAZED_TERRACOTTA = 224;
const LIME_GLAZED_TERRACOTTA = 225;
const PINK_GLAZED_TERRACOTTA = 226;
const GRAY_GLAZED_TERRACOTTA = 227;
const SILVER_GLAZED_TERRACOTTA = 228;
const CYAN_GLAZED_TERRACOTTA = 229;
const BLUE_GLAZED_TERRACOTTA = 231;
const BROWN_GLAZED_TERRACOTTA = 232;
const GREEN_GLAZED_TERRACOTTA = 233;
const RED_GLAZED_TERRACOTTA = 234;
const BLACK_GLAZED_TERRACOTTA = 235;
const CONCRETE = 236;
const CONCRETEPOWDER = 237, CONCRETE_POWDER = 237;
const CHORUS_PLANT = 240;
const STAINED_GLASS = 241;
const PODZOL = 243;
const BEETROOT_BLOCK = 244;
const STONECUTTER = 245;
const GLOWING_OBSIDIAN = 246;
const NETHER_REACTOR = 247;
const UPDATE_BLOCK = 248;
const ATEUPD_BLOCK = 249;
const BLOCK_MOVED_BY_PISTON = 250;
const GLOWINGOBSIDIAN = 246, GLOWING_OBSIDIAN = 246;
const NETHERREACTOR = 247, NETHER_REACTOR = 247;
const INFO_UPDATE = 248;
const INFO_UPDATE2 = 249;
const MOVINGBLOCK = 250, MOVING_BLOCK = 250;
const OBSERVER = 251;
const INFO_RESERVED6 = 255;
const RESERVED6 = 255;
}

View File

@ -28,7 +28,7 @@ use pocketmine\item\Tool;
class Bricks extends Solid{
protected $id = self::BRICKS_BLOCK;
protected $id = self::BRICK_BLOCK;
public function __construct($meta = 0){
$this->meta = $meta;
@ -53,7 +53,7 @@ class Bricks extends Solid{
public function getDrops(Item $item){
if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [
[Item::BRICKS_BLOCK, 0, 1],
[Item::BRICK_BLOCK, 0, 1],
];
}else{
return [];

View File

@ -27,11 +27,11 @@ use pocketmine\item\Tool;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Vector3;
class StoneWall extends Transparent{
class CobblestoneWall extends Transparent{
const NONE_MOSSY_WALL = 0;
const MOSSY_WALL = 1;
protected $id = self::STONE_WALL;
protected $id = self::COBBLESTONE_WALL;
public function __construct($meta = 0){
$this->meta = $meta;
@ -88,7 +88,7 @@ class StoneWall extends Transparent{
}
public function canConnect(Block $block){
return ($block->getId() !== self::COBBLE_WALL and $block->getId() !== self::FENCE_GATE) ? $block->isSolid() and !$block->isTransparent() : true;
return ($block->getId() !== self::COBBLESTONE_WALL and $block->getId() !== self::FENCE_GATE) ? $block->isSolid() and !$block->isTransparent() : true;
}
}

View File

@ -27,9 +27,9 @@ use pocketmine\item\Item;
use pocketmine\item\Tool;
use pocketmine\Player;
class Workbench extends Solid{
class CraftingTable extends Solid{
protected $id = self::WORKBENCH;
protected $id = self::CRAFTING_TABLE;
public function __construct($meta = 0){
$this->meta = $meta;

View File

@ -25,7 +25,7 @@ namespace pocketmine\block;
class DarkOakWoodStairs extends WoodStairs{
protected $id = self::DARK_OAK_WOOD_STAIRS;
protected $id = self::DARK_OAK_STAIRS;
public function getName(){
return "Dark Oak Wood Stairs";

View File

@ -26,9 +26,9 @@ namespace pocketmine\block;
use pocketmine\item\Item;
use pocketmine\item\Tool;
class DoubleSlab extends Solid{
class DoubleStoneSlab extends Solid{
protected $id = self::DOUBLE_SLAB;
protected $id = self::DOUBLE_STONE_SLAB;
public function __construct($meta = 0){
$this->meta = $meta;
@ -59,7 +59,7 @@ class DoubleSlab extends Solid{
public function getDrops(Item $item){
if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [
[Item::SLAB, $this->meta & 0x07, 2],
[Item::STONE_SLAB, $this->meta & 0x07, 2],
];
}else{
return [];

View File

@ -28,7 +28,7 @@ use pocketmine\item\Tool;
class DoubleWoodSlab extends Solid{
protected $id = self::DOUBLE_WOOD_SLAB;
protected $id = self::DOUBLE_WOODEN_SLAB;
public function __construct($meta = 0){
$this->meta = $meta;
@ -58,7 +58,7 @@ class DoubleWoodSlab extends Solid{
public function getDrops(Item $item){
return [
[Item::WOOD_SLAB, $this->meta & 0x07, 2],
[Item::WOODEN_SLAB, $this->meta & 0x07, 2],
];
}

View File

@ -26,7 +26,7 @@ namespace pocketmine\block;
class FenceGateAcacia extends FenceGate{
protected $id = self::FENCE_GATE_ACACIA;
protected $id = self::ACACIA_FENCE_GATE;
public function getName(){
return "Acacia Fence Gate";

View File

@ -26,7 +26,7 @@ namespace pocketmine\block;
class FenceGateBirch extends FenceGate{
protected $id = self::FENCE_GATE_BIRCH;
protected $id = self::BIRCH_FENCE_GATE;
public function getName(){
return "Birch Fence Gate";

View File

@ -26,7 +26,7 @@ namespace pocketmine\block;
class FenceGateDarkOak extends FenceGate{
protected $id = self::FENCE_GATE_DARK_OAK;
protected $id = self::DARK_OAK_FENCE_GATE;
public function getName(){
return "Dark Oak Fence Gate";

View File

@ -26,7 +26,7 @@ namespace pocketmine\block;
class FenceGateJungle extends FenceGate{
protected $id = self::FENCE_GATE_JUNGLE;
protected $id = self::JUNGLE_FENCE_GATE;
public function getName(){
return "Jungle Fence Gate";

View File

@ -26,7 +26,7 @@ namespace pocketmine\block;
class FenceGateSpruce extends FenceGate{
protected $id = self::FENCE_GATE_SPRUCE;
protected $id = self::SPRUCE_FENCE_GATE;
public function getName(){
return "Spruce Fence Gate";

View File

@ -28,7 +28,7 @@ use pocketmine\item\Tool;
class Glowstone extends Transparent{
protected $id = self::GLOWSTONE_BLOCK;
protected $id = self::GLOWSTONE;
public function __construct($meta = 0){
$this->meta = $meta;

View File

@ -25,7 +25,7 @@ namespace pocketmine\block;
class JungleWoodStairs extends WoodStairs{
protected $id = self::JUNGLE_WOOD_STAIRS;
protected $id = self::JUNGLE_STAIRS;
public function getName(){
return "Jungle Wood Stairs";

View File

@ -34,7 +34,7 @@ use pocketmine\Server;
class Lava extends Liquid{
protected $id = self::LAVA;
protected $id = self::FLOWING_LAVA;
public function __construct($meta = 0){
$this->meta = $meta;

View File

@ -26,9 +26,9 @@ namespace pocketmine\block;
use pocketmine\item\Item;
use pocketmine\item\Tool;
class MossStone extends Solid{
class MossyCobblestone extends Solid{
protected $id = self::MOSS_STONE;
protected $id = self::MOSSY_COBBLESTONE;
public function __construct($meta = 0){
$this->meta = $meta;
@ -49,7 +49,7 @@ class MossStone extends Solid{
public function getDrops(Item $item){
if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [
[Item::MOSS_STONE, $this->meta, 1],
[Item::MOSSY_COBBLESTONE, $this->meta, 1],
];
}else{
return [];

View File

@ -28,7 +28,7 @@ use pocketmine\item\Tool;
class NetherBrick extends Solid{
protected $id = self::NETHER_BRICKS;
protected $id = self::NETHER_BRICK;
public function __construct($meta = 0){
$this->meta = $meta;
@ -49,7 +49,7 @@ class NetherBrick extends Solid{
public function getDrops(Item $item){
if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [
[Item::NETHER_BRICKS, 0, 1],
[Item::NETHER_BRICK, 0, 1],
];
}else{
return [];

View File

@ -27,10 +27,10 @@ use pocketmine\item\Tool;
class NetherBrickStairs extends Stair{
protected $id = self::NETHER_BRICKS_STAIRS;
protected $id = self::NETHER_BRICK_STAIRS;
public function getName(){
return "Nether Bricks Stairs";
return "Nether Brick Stairs";
}
public function getHardness(){

View File

@ -35,9 +35,9 @@ use pocketmine\tile\Skull as SkullTile;
use pocketmine\tile\Spawnable;
use pocketmine\tile\Tile;
class MobHead extends Flowable{
class Skull extends Flowable{
protected $id = self::MOB_HEAD_BLOCK;
protected $id = self::SKULL_BLOCK;
public function __construct($meta = 0){
$this->meta = $meta;
@ -48,7 +48,7 @@ class MobHead extends Flowable{
}
public function getName(){
return "Mob Head";
return "Mob Head Block";
}
protected function recalculateBoundingBox(){
@ -94,7 +94,7 @@ class MobHead extends Flowable{
$tile = $this->level->getTile($this);
if($tile instanceof SkullTile){
return [
[Item::MOB_HEAD, $tile->getType(), 1]
[Item::SKULL, $tile->getType(), 1]
];
}

View File

@ -28,7 +28,7 @@ use pocketmine\item\Tool;
use pocketmine\math\AxisAlignedBB;
use pocketmine\Player;
class Slab extends WoodSlab{
class Slab extends WoodenSlab{
const STONE = 0;
const SANDSTONE = 1;
const WOODEN = 2;
@ -38,9 +38,9 @@ class Slab extends WoodSlab{
const QUARTZ = 6;
const NETHER_BRICK = 7;
protected $id = self::SLAB;
protected $id = self::STONE_SLAB;
protected $doubleId = self::DOUBLE_SLAB;
protected $doubleId = self::DOUBLE_STONE_SLAB;
public function __construct($meta = 0){
$this->meta = $meta;

View File

@ -25,7 +25,7 @@ namespace pocketmine\block;
class SpruceWoodStairs extends WoodStairs{
protected $id = self::SPRUCE_WOOD_STAIRS;
protected $id = self::SPRUCE_STAIRS;
public function getName(){
return "Spruce Wood Stairs";

View File

@ -57,7 +57,7 @@ class Torch extends Flowable{
5 => 0
];
if($this->getSide($faces[$side])->isTransparent() === true and !($side === 0 and ($below->getId() === self::FENCE or $below->getId() === self::COBBLE_WALL))){
if($this->getSide($faces[$side])->isTransparent() === true and !($side === 0 and ($below->getId() === self::FENCE or $below->getId() === self::COBBLESTONE_WALL))){
$this->getLevel()->useBreakOn($this);
return Level::BLOCK_UPDATE_NORMAL;
@ -82,7 +82,7 @@ class Torch extends Flowable{
$this->getLevel()->setBlock($block, $this, true, true);
return true;
}elseif($below->isTransparent() === false or $below->getId() === self::FENCE or $below->getId() === self::COBBLE_WALL){
}elseif($below->isTransparent() === false or $below->getId() === self::FENCE or $below->getId() === self::COBBLESTONE_WALL){
$this->meta = 0;
$this->getLevel()->setBlock($block, $this, true, true);

View File

@ -29,7 +29,7 @@ use pocketmine\Player;
class Water extends Liquid{
protected $id = self::WATER;
protected $id = self::FLOWING_WATER;
public function __construct($meta = 0){
$this->meta = $meta;

View File

@ -25,7 +25,7 @@ namespace pocketmine\block;
class WeightedPressurePlateHeavy extends WeightedPressurePlateLight{
protected $id = self::WEIGHTED_PRESSURE_PLATE_HEAVY;
protected $id = self::HEAVY_WEIGHTED_PRESSURE_PLATE;
public function __construct($meta = 0){
$this->meta = $meta;

View File

@ -25,7 +25,7 @@ namespace pocketmine\block;
class WeightedPressurePlateLight extends Transparent{
protected $id = self::WEIGHTED_PRESSURE_PLATE_LIGHT;
protected $id = self::LIGHT_WEIGHTED_PRESSURE_PLATE;
public function __construct($meta = 0){
$this->meta = $meta;

View File

@ -32,8 +32,6 @@ class Wood extends Solid{
const SPRUCE = 1;
const BIRCH = 2;
const JUNGLE = 3;
//const ACACIA = 4;
//const DARK_OAK = 5;
protected $id = self::WOOD;

View File

@ -28,14 +28,14 @@ use pocketmine\item\Tool;
class WoodStairs extends Stair{
protected $id = self::WOOD_STAIRS;
protected $id = self::OAK_STAIRS;
public function __construct($meta = 0){
$this->meta = $meta;
}
public function getName(){
return "Wood Stairs";
return "Oak Wood Stairs";
}
public function getHardness(){

View File

@ -26,16 +26,16 @@ namespace pocketmine\block;
use pocketmine\item\Item;
use pocketmine\item\Tool;
class WoodDoor extends Door{
class WoodenDoor extends Door{
protected $id = self::WOOD_DOOR_BLOCK;
protected $id = self::WOODEN_DOOR_BLOCK;
public function __construct($meta = 0){
$this->meta = $meta;
}
public function getName(){
return "Wood Door Block";
return "Wooden Door Block";
}
public function getHardness(){

View File

@ -28,9 +28,9 @@ use pocketmine\item\Tool;
use pocketmine\math\AxisAlignedBB;
use pocketmine\Player;
class WoodSlab extends Transparent{
class WoodenSlab extends Transparent{
protected $id = self::WOOD_SLAB;
protected $id = self::WOODEN_SLAB;
protected $doubleId = self::DOUBLE_WOODEN_SLAB;

View File

@ -30,7 +30,7 @@ abstract class Fuel{
public static $duration = [
Item::COAL => 1600,
Item::COAL_BLOCK => 16000,
Item::TRUNK => 300,
Item::WOOD => 300,
Item::WOODEN_PLANKS => 300,
Item::SAPLING => 100,
Item::WOODEN_AXE => 200,
@ -41,15 +41,15 @@ abstract class Fuel{
Item::STICK => 100,
Item::FENCE => 300,
Item::FENCE_GATE => 300,
Item::FENCE_GATE_SPRUCE => 300,
Item::FENCE_GATE_BIRCH => 300,
Item::FENCE_GATE_JUNGLE => 300,
Item::FENCE_GATE_ACACIA => 300,
Item::FENCE_GATE_DARK_OAK => 300,
Item::SPRUCE_FENCE_GATE => 300,
Item::BIRCH_FENCE_GATE => 300,
Item::JUNGLE_FENCE_GATE => 300,
Item::ACACIA_FENCE_GATE => 300,
Item::DARK_OAK_FENCE_GATE => 300,
Item::WOODEN_STAIRS => 300,
Item::SPRUCE_WOOD_STAIRS => 300,
Item::BIRCH_WOOD_STAIRS => 300,
Item::JUNGLE_WOOD_STAIRS => 300,
Item::SPRUCE_STAIRS => 300,
Item::BIRCH_STAIRS => 300,
Item::JUNGLE_STAIRS => 300,
Item::TRAPDOOR => 300,
Item::WORKBENCH => 300,
Item::BOOKSHELF => 300,

View File

@ -1,32 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\item;
class Camera extends Item{
public function __construct($meta = 0, $count = 1){
parent::__construct(self::CAMERA, $meta, $count, "Camera");
}
}

View File

@ -123,10 +123,10 @@ class Item implements ItemIds, \JsonSerializable{
self::$list[self::STICK] = Stick::class;
self::$list[self::BOWL] = Bowl::class;
self::$list[self::MUSHROOM_STEW] = MushroomStew::class;
self::$list[self::GOLD_SWORD] = GoldSword::class;
self::$list[self::GOLD_SHOVEL] = GoldShovel::class;
self::$list[self::GOLD_PICKAXE] = GoldPickaxe::class;
self::$list[self::GOLD_AXE] = GoldAxe::class;
self::$list[self::GOLDEN_SWORD] = GoldSword::class;
self::$list[self::GOLDEN_SHOVEL] = GoldShovel::class;
self::$list[self::GOLDEN_PICKAXE] = GoldPickaxe::class;
self::$list[self::GOLDEN_AXE] = GoldAxe::class;
self::$list[self::STRING] = StringItem::class;
self::$list[self::FEATHER] = Feather::class;
self::$list[self::GUNPOWDER] = Gunpowder::class;
@ -134,7 +134,7 @@ class Item implements ItemIds, \JsonSerializable{
self::$list[self::STONE_HOE] = StoneHoe::class;
self::$list[self::IRON_HOE] = IronHoe::class;
self::$list[self::DIAMOND_HOE] = DiamondHoe::class;
self::$list[self::GOLD_HOE] = GoldHoe::class;
self::$list[self::GOLDEN_HOE] = GoldHoe::class;
self::$list[self::WHEAT_SEEDS] = WheatSeeds::class;
self::$list[self::WHEAT] = Wheat::class;
self::$list[self::BREAD] = Bread::class;
@ -142,10 +142,10 @@ class Item implements ItemIds, \JsonSerializable{
self::$list[self::LEATHER_TUNIC] = LeatherTunic::class;
self::$list[self::LEATHER_PANTS] = LeatherPants::class;
self::$list[self::LEATHER_BOOTS] = LeatherBoots::class;
self::$list[self::CHAIN_HELMET] = ChainHelmet::class;
self::$list[self::CHAIN_CHESTPLATE] = ChainChestplate::class;
self::$list[self::CHAIN_LEGGINGS] = ChainLeggings::class;
self::$list[self::CHAIN_BOOTS] = ChainBoots::class;
self::$list[self::CHAINMAIL_HELMET] = ChainHelmet::class;
self::$list[self::CHAINMAIL_CHESTPLATE] = ChainChestplate::class;
self::$list[self::CHAINMAIL_LEGGINGS] = ChainLeggings::class;
self::$list[self::CHAINMAIL_BOOTS] = ChainBoots::class;
self::$list[self::IRON_HELMET] = IronHelmet::class;
self::$list[self::IRON_CHESTPLATE] = IronChestplate::class;
self::$list[self::IRON_LEGGINGS] = IronLeggings::class;
@ -154,10 +154,10 @@ class Item implements ItemIds, \JsonSerializable{
self::$list[self::DIAMOND_CHESTPLATE] = DiamondChestplate::class;
self::$list[self::DIAMOND_LEGGINGS] = DiamondLeggings::class;
self::$list[self::DIAMOND_BOOTS] = DiamondBoots::class;
self::$list[self::GOLD_HELMET] = GoldHelmet::class;
self::$list[self::GOLD_CHESTPLATE] = GoldChestplate::class;
self::$list[self::GOLD_LEGGINGS] = GoldLeggings::class;
self::$list[self::GOLD_BOOTS] = GoldBoots::class;
self::$list[self::GOLDEN_HELMET] = GoldHelmet::class;
self::$list[self::GOLDEN_CHESTPLATE] = GoldChestplate::class;
self::$list[self::GOLDEN_LEGGINGS] = GoldLeggings::class;
self::$list[self::GOLDEN_BOOTS] = GoldBoots::class;
self::$list[self::FLINT] = Flint::class;
self::$list[self::RAW_PORKCHOP] = RawPorkchop::class;
self::$list[self::COOKED_PORKCHOP] = CookedPorkchop::class;
@ -227,7 +227,7 @@ class Item implements ItemIds, \JsonSerializable{
self::$list[self::BAKED_POTATO] = BakedPotato::class;
self::$list[self::GOLDEN_CARROT] = GoldenCarrot::class;
self::$list[self::MOB_HEAD] = MobHead::class;
self::$list[self::SKULL] = Skull::class;
self::$list[self::NETHER_STAR] = NetherStar::class;
self::$list[self::PUMPKIN_PIE] = PumpkinPie::class;

View File

@ -27,7 +27,6 @@ use pocketmine\block\BlockIds;
interface ItemIds extends BlockIds{
//All BlockIds are also accessible through this interface.
const IRON_SHOVEL = 256;
const IRON_PICKAXE = 257;
const IRON_AXE = 258;
@ -52,13 +51,13 @@ interface ItemIds extends BlockIds{
const DIAMOND_SHOVEL = 277;
const DIAMOND_PICKAXE = 278;
const DIAMOND_AXE = 279;
const STICK = 280, STICKS = 280;
const STICK = 280;
const BOWL = 281;
const MUSHROOM_STEW = 282;
const GOLD_SWORD = 283, GOLDEN_SWORD = 283;
const GOLD_SHOVEL = 284, GOLDEN_SHOVEL = 284;
const GOLD_PICKAXE = 285, GOLDEN_PICKAXE = 285;
const GOLD_AXE = 286, GOLDEN_AXE = 286;
const GOLDEN_SWORD = 283, GOLD_SWORD = 283;
const GOLDEN_SHOVEL = 284, GOLD_SHOVEL = 284;
const GOLDEN_PICKAXE = 285, GOLD_PICKAXE = 285;
const GOLDEN_AXE = 286, GOLD_AXE = 286;
const STRING = 287;
const FEATHER = 288;
const GUNPOWDER = 289;
@ -66,18 +65,18 @@ interface ItemIds extends BlockIds{
const STONE_HOE = 291;
const IRON_HOE = 292;
const DIAMOND_HOE = 293;
const GOLD_HOE = 294, GOLDEN_HOE = 294;
const GOLDEN_HOE = 294, GOLD_HOE = 294;
const SEEDS = 295, WHEAT_SEEDS = 295;
const WHEAT = 296;
const BREAD = 297;
const LEATHER_CAP = 298;
const LEATHER_TUNIC = 299;
const LEATHER_PANTS = 300;
const LEATHER_CAP = 298, LEATHER_HELMET = 298;
const LEATHER_CHESTPLATE = 299, LEATHER_TUNIC = 299;
const LEATHER_LEGGINGS = 300, LEATHER_PANTS = 300;
const LEATHER_BOOTS = 301;
const CHAIN_HELMET = 302;
const CHAIN_CHESTPLATE = 303;
const CHAIN_LEGGINGS = 304;
const CHAIN_BOOTS = 305;
const CHAINMAIL_HELMET = 302, CHAIN_HELMET = 302;
const CHAINMAIL_CHESTPLATE = 303, CHAIN_CHESTPLATE = 303;
const CHAINMAIL_LEGGINGS = 304, CHAIN_LEGGINGS = 304;
const CHAINMAIL_BOOTS = 305, CHAIN_BOOTS = 305;
const IRON_HELMET = 306;
const IRON_CHESTPLATE = 307;
const IRON_LEGGINGS = 308;
@ -86,17 +85,17 @@ interface ItemIds extends BlockIds{
const DIAMOND_CHESTPLATE = 311;
const DIAMOND_LEGGINGS = 312;
const DIAMOND_BOOTS = 313;
const GOLD_HELMET = 314;
const GOLD_CHESTPLATE = 315;
const GOLD_LEGGINGS = 316;
const GOLD_BOOTS = 317;
const GOLDEN_HELMET = 314, GOLD_HELMET = 314;
const GOLDEN_CHESTPLATE = 315, GOLD_CHESTPLATE = 315;
const GOLDEN_LEGGINGS = 316, GOLD_LEGGINGS = 316;
const GOLDEN_BOOTS = 317, GOLD_BOOTS = 317;
const FLINT = 318;
const RAW_PORKCHOP = 319;
const PORKCHOP = 319, RAW_PORKCHOP = 319;
const COOKED_PORKCHOP = 320;
const PAINTING = 321;
const GOLDEN_APPLE = 322;
const SIGN = 323;
const WOODEN_DOOR = 324, OAK_DOOR = 324;
const OAK_DOOR = 324, WOODEN_DOOR = 324;
const BUCKET = 325;
const MINECART = 328;
@ -108,19 +107,19 @@ interface ItemIds extends BlockIds{
const LEATHER = 334;
const BRICK = 336;
const CLAY = 337;
const SUGARCANE = 338, SUGAR_CANE = 338, SUGAR_CANES = 338;
const CLAY = 337, CLAY_BALL = 337;
const REEDS = 338, SUGARCANE = 338;
const PAPER = 339;
const BOOK = 340;
const SLIMEBALL = 341;
const MINECART_WITH_CHEST = 342;
const SLIMEBALL = 341, SLIME_BALL = 341;
const CHEST_MINECART = 342, MINECART_WITH_CHEST = 342;
const EGG = 344;
const COMPASS = 345;
const FISHING_ROD = 346;
const CLOCK = 347;
const GLOWSTONE_DUST = 348;
const RAW_FISH = 349;
const FISH = 349, RAW_FISH = 349;
const COOKED_FISH = 350;
const DYE = 351;
const BONE = 352;
@ -134,15 +133,15 @@ interface ItemIds extends BlockIds{
const MELON = 360, MELON_SLICE = 360;
const PUMPKIN_SEEDS = 361;
const MELON_SEEDS = 362;
const RAW_BEEF = 363;
const STEAK = 364, COOKED_BEEF = 364;
const RAW_CHICKEN = 365;
const BEEF = 363, RAW_BEEF = 363;
const COOKED_BEEF = 364, STEAK = 364;
const CHICKEN = 365, RAW_CHICKEN = 365;
const COOKED_CHICKEN = 366;
const ROTTEN_FLESH = 367;
const ENDER_PEARL = 368;
const BLAZE_ROD = 369;
const GHAST_TEAR = 370;
const GOLD_NUGGET = 371, GOLDEN_NUGGET = 371;
const GOLDEN_NUGGET = 371, GOLD_NUGGET = 371;
const NETHER_WART = 372;
const POTION = 373;
const GLASS_BOTTLE = 374;
@ -152,67 +151,79 @@ interface ItemIds extends BlockIds{
const MAGMA_CREAM = 378;
const BREWING_STAND = 379;
const CAULDRON = 380;
const GLISTERING_MELON = 382;
const ENDER_EYE = 381;
const GLISTERING_MELON = 382, SPECKLED_MELON = 382;
const SPAWN_EGG = 383;
const BOTTLE_O_ENCHANTING = 384, ENCHANTING_BOTTLE = 384;
const FIRE_CHARGE = 385;
const BOTTLE_O_ENCHANTING = 384, EXPERIENCE_BOTTLE = 384;
const FIREBALL = 385, FIRE_CHARGE = 385;
const EMERALD = 388;
const ITEM_FRAME = 389;
const FRAME = 389, ITEM_FRAME = 389;
const FLOWER_POT = 390;
const CARROT = 391, CARROTS = 391;
const POTATO = 392, POTATOES = 392;
const BAKED_POTATO = 393, BAKED_POTATOES = 393;
const CARROT = 391;
const POTATO = 392;
const BAKED_POTATO = 393;
const POISONOUS_POTATO = 394;
const MAP = 395, EMPTY_MAP = 395;
const EMPTYMAP = 395, EMPTY_MAP = 395, MAP = 395;
const GOLDEN_CARROT = 396;
const MOB_HEAD = 397, SKULL = 397;
const CARROT_ON_A_STICK = 398;
const NETHER_STAR = 399;
const CARROTONASTICK = 398, CARROT_ON_A_STICK = 398;
const NETHERSTAR = 399, NETHER_STAR = 399;
const PUMPKIN_PIE = 400;
const ENCHANTED_BOOK = 403;
const COMPARATOR = 404;
const NETHER_BRICK = 405;
const QUARTZ = 406;
const NETHER_QUARTZ = 406;
const MINECART_WITH_TNT = 407;
const MINECART_WITH_HOPPER = 408;
const NETHERBRICK = 405;
const NETHER_QUARTZ = 406, QUARTZ = 406;
const MINECART_WITH_TNT = 407, TNT_MINECART = 407;
const HOPPER_MINECART = 408, MINECART_WITH_HOPPER = 408;
const PRISMARINE_SHARD = 409;
const HOPPER = 410;
const RAW_RABBIT = 411;
const RABBIT = 411, RAW_RABBIT = 411;
const COOKED_RABBIT = 412;
const RABBIT_STEW = 413;
const RABBIT_FOOT = 414;
const RABBIT_HIDE = 415;
const LEATHER_HORSE_ARMOR = 416; //I hate being forced to spell this wrong
const IRON_HORSE_ARMOR = 417;
const GOLD_HORSE_ARMOR = 418;
const DIAMOND_HORSE_ARMOR = 419;
const LEAD = 420, LEASH = 420;
const NAMETAG = 421;
const HORSEARMORLEATHER = 416, HORSE_ARMOR_LEATHER = 416, LEATHER_HORSE_ARMOR = 416;
const HORSEARMORIRON = 417, HORSE_ARMOR_IRON = 417, IRON_HORSE_ARMOR = 417;
const GOLD_HORSE_ARMOR = 418, HORSEARMORGOLD = 418, HORSE_ARMOR_GOLD = 418;
const DIAMOND_HORSE_ARMOR = 419, HORSEARMORDIAMOND = 419, HORSE_ARMOR_DIAMOND = 419;
const LEAD = 420;
const NAMETAG = 421, NAME_TAG = 421;
const PRISMARINE_CRYSTALS = 422;
const RAW_MUTTON = 423;
const COOKED_MUTTON = 424;
const MUTTONRAW = 423, MUTTON_RAW = 423, RAW_MUTTON = 423;
const COOKED_MUTTON = 424, MUTTONCOOKED = 424, MUTTON_COOKED = 424;
const END_CRYSTAL = 426;
const SPRUCE_DOOR = 427;
const BIRCH_DOOR = 428;
const JUNGLE_DOOR = 429;
const ACACIA_DOOR = 430;
const DARK_OAK_DOOR = 431;
const CHORUS_FRUIT = 432;
const CHORUS_FRUIT_POPPED = 433;
const DRAGON_BREATH = 437;
const SPLASH_POTION = 438;
const LINGERING_POTION = 441;
const COMMAND_BLOCK_MINECART = 443, MINECART_WITH_COMMAND_BLOCK = 443;
const ELYTRA = 444;
const SHULKER_SHELL = 445;
const TOTEM = 450;
const IRON_NUGGET = 452;
const BEETROOT = 457;
const BEETROOT_SEEDS = 458, BEETROOT_SEED = 458;
const BEETROOT_SEEDS = 458;
const BEETROOT_SOUP = 459;
const RAW_SALMON = 460;
const CLOWN_FISH = 461;
const PUFFER_FISH = 462;
const RAW_SALMON = 460, SALMON = 460;
const CLOWNFISH = 461;
const PUFFERFISH = 462;
const COOKED_SALMON = 463;
const ENCHANTED_GOLDEN_APPLE = 466;
const APPLEENCHANTED = 466, APPLE_ENCHANTED = 466, ENCHANTED_GOLDEN_APPLE = 466;
const CAMERA = 498; #blamemojang
}

View File

@ -25,9 +25,9 @@ namespace pocketmine\item;
use pocketmine\block\Block;
class MobHead extends Item{
class Skull extends Item{
public function __construct($meta = 0, $count = 1){
$this->block = Block::get(Item::SKULL_BLOCK);
parent::__construct(self::MOB_HEAD, $meta, $count, "Mob Head");
parent::__construct(self::SKULL, $meta, $count, "Mob Head");
}
}

View File

@ -1782,7 +1782,7 @@ class Level implements ChunkManager, Metadatable{
return false;
}
if(!($block->canBeReplaced() === true or ($hand->getId() === Item::WOOD_SLAB and $block->getId() === Item::WOOD_SLAB) or ($hand->getId() === Item::SLAB and $block->getId() === Item::SLAB))){
if(!($block->canBeReplaced() === true or ($hand->getId() === Item::WOODEN_SLAB and $block->getId() === Item::WOODEN_SLAB) or ($hand->getId() === Item::STONE_SLAB and $block->getId() === Item::STONE_SLAB))){
return false;
}