Finished Adding Item IDs

This commit is contained in:
Shoghi Cervantes Pueyo 2013-02-04 16:13:11 +01:00
parent f1c593d809
commit d5aa898ffe
6 changed files with 132 additions and 19 deletions

View File

@ -79,7 +79,7 @@ abstract class Block{
DIAMOND_ORE => "DiamondOreBlock", DIAMOND_ORE => "DiamondOreBlock",
DIAMOND_BLOCK => "DiamondBlock", DIAMOND_BLOCK => "DiamondBlock",
WORKBENCH => "WorkbenchBlock", WORKBENCH => "WorkbenchBlock",
WHEAT => "WheatBlock", WHEAT_BLOCK => "WheatBlock",
FARMLAND => "FarmlandBlock", FARMLAND => "FarmlandBlock",
FURNACE => "FurnaceBlock", FURNACE => "FurnaceBlock",
BURNING_FURNACE => "BurningFurnaceBlock", BURNING_FURNACE => "BurningFurnaceBlock",
@ -120,9 +120,9 @@ abstract class Block{
BRICK_STAIRS => "BrickStairsBlock", BRICK_STAIRS => "BrickStairsBlock",
STONE_BRICK_STAIRS => "StoneBrickStairsBlock", STONE_BRICK_STAIRS => "StoneBrickStairsBlock",
NETHER_BRICK => "NetherBrickBlock", NETHER_BRICKS => "NetherBricksBlock",
NETHER_BRICK_STAIRS => "NetherBrickStairsBlock", NETHER_BRICKS_STAIRS => "NetherBricksStairsBlock",
SANDSTONE_STAIRS => "SandstoneStairsBlock", SANDSTONE_STAIRS => "SandstoneStairsBlock",
@ -179,11 +179,12 @@ abstract class Block{
public function getDrops(Item $item, Player $player){ public function getDrops(Item $item, Player $player){
if(!isset(Block::$class[$this->id])){ //Unknown blocks if(!isset(Block::$class[$this->id])){ //Unknown blocks
return array(); return array();
} }else{
return array( return array(
array($this->id, $this->meta, 1), array($this->id, $this->meta, 1),
); );
} }
}
abstract function onBreak(BlockAPI $level, Item $item, Player $player); abstract function onBreak(BlockAPI $level, Item $item, Player $player);

View File

@ -94,12 +94,11 @@ define("DIAMOND_ORE", 56);
define("DIAMOND_BLOCK", 57); define("DIAMOND_BLOCK", 57);
define("CRAFTING_TABLE", 58); define("CRAFTING_TABLE", 58);
define("WORKBENCH", 58); define("WORKBENCH", 58);
define("WHEAT", 59); define("WHEAT_BLOCK", 59);
define("FARMLAND", 60); define("FARMLAND", 60);
define("FURNACE", 61); define("FURNACE", 61);
define("BURNING_FURNACE", 62); define("BURNING_FURNACE", 62);
define("LIT_FURNACE", 62); define("LIT_FURNACE", 62);
define("SIGN", 63);
define("SIGN_POST", 63); define("SIGN_POST", 63);
define("DOOR_BLOCK", 64); define("DOOR_BLOCK", 64);
define("WOODEN_DOOR_BLOCK", 64); define("WOODEN_DOOR_BLOCK", 64);
@ -110,7 +109,6 @@ define("COBBLE_STAIRS", 67);
define("COBBLESTONE_STAIRS", 67); define("COBBLESTONE_STAIRS", 67);
define("WALL_SIGN", 68); define("WALL_SIGN", 68);
define("IRON_DOOR", 71);
define("IRON_DOOR_BLOCK", 71); define("IRON_DOOR_BLOCK", 71);
define("REDSTONE_ORE", 73); define("REDSTONE_ORE", 73);
@ -138,7 +136,6 @@ define("STONE_BRICK", 98);
define("GLASS_PANE", 102); define("GLASS_PANE", 102);
define("GLASS_PANEL", 102); define("GLASS_PANEL", 102);
define("MELON", 103);
define("MELON_BLOCK", 103); define("MELON_BLOCK", 103);
define("MELON_STEM", 105); define("MELON_STEM", 105);
@ -147,9 +144,9 @@ define("FENCE_GATE", 107);
define("BRICK_STAIRS", 108); define("BRICK_STAIRS", 108);
define("STONE_BRICK_STAIRS", 109); define("STONE_BRICK_STAIRS", 109);
define("NETHER_BRICK", 112); define("NETHER_BRICKS", 112);
define("NETHER_BRICK_STAIRS", 114); define("NETHER_BRICKS_STAIRS", 114);
define("SANDSTONE_STAIRS", 128); define("SANDSTONE_STAIRS", 128);
@ -168,3 +165,118 @@ define("FLINT_STEEL", 259);
define("APPLE", 260); define("APPLE", 260);
define("BOW", 261); define("BOW", 261);
define("ARROW", 262); define("ARROW", 262);
define("COAL", 263);
define("DIAMOND", 264);
define("IRON_INGOT", 265);
define("GOLD_INGOT", 266);
define("IRON_SWORD", 267);
define("WOODEN_SWORD", 268);
define("WOODEN_SHOVEL", 269);
define("WOODEN_PICKAXE", 270);
define("WOODEN_AXE", 271);
define("STONE_SWORD", 272);
define("STONE_SHOVEL", 273);
define("STONE_PICKAXE", 274);
define("STONE_AXE", 275);
define("DIAMOND_SWORD", 276);
define("DIAMOND_SHOVEL", 277);
define("DIAMOND_PICKAXE", 278);
define("DIAMOND_AXE", 279);
define("STICK", 280);
define("BOWL", 281);
define("MUSHROOM_STEW", 282);
define("GOLD_SWORD", 283);
define("GOLD_SHOVEL", 284);
define("GOLD_PICKAXE", 285);
define("GOLD_AXE", 286);
define("STRING", 287);
define("FEATHER", 288);
define("GUNPOWDER", 289);
define("WOODEN_HOE", 290);
define("STONE_HOE", 291);
define("IRON_HOE", 292);
define("DIAMOND_HOE", 293);
define("GOLD_HOE", 294);
define("SEEDS", 295);
define("WHEAT_SEEDS", 295);
define("WHEAT", 296);
define("BREAD", 297);
define("LEATHER_CAP", 298);
define("LEATHER_TUNIC", 299);
define("LEATHER_PANTS", 300);
define("LEATHER_BOOTS", 301);
define("CHAIN_HELMET", 302);
define("CHAIN_CHESTPLATE", 303);
define("CHAIN_LEGGINS", 304);
define("CHAIN_BOOTS", 305);
define("IRON_HELMET", 306);
define("IRON_CHESTPLATE", 307);
define("IRON_LEGGINS", 308);
define("IRON_BOOTS", 309);
define("DIAMOND_HELMET", 310);
define("DIAMOND_CHESTPLATE", 311);
define("DIAMOND_LEGGINS", 312);
define("DIAMOND_BOOTS", 313);
define("GOLD_HELMET", 314);
define("GOLD_CHESTPLATE", 315);
define("GOLD_LEGGINS", 316);
define("GOLD_BOOTS", 317);
define("FLINT", 318);
define("RAW_PORKCHOP", 319);
define("COOKED_PORKCHOP", 320);
define("PAINTING", 321);
define("GOLDEN_APPLE", 322);
define("SIGN", 323);
define("WOODEN_DOOR", 324);
define("IRON_DOOR", 330);
define("SNOWBALL", 332);
define("LEATHER", 334);
define("BRICK", 336);
define("CLAY", 337);
define("SUGAR_CANE", 338);
define("SUGAR_CANES", 338);
define("PAPER", 339);
define("SLIMEBALL", 341);
define("EGG", 344);
define("COMPASS", 345);
define("GLOWSTONE_DUST", 348);
define("RAW_FISH", 349);
define("COOKED_FISH", 350);
define("DYE", 351);
define("BONE", 352);
define("SUGAR", 353);
define("BED", 355);
define("COOKIE", 357);
define("SHEARS", 359);
define("MELON", 360);
define("MELON_SLICE", 360);
define("MELON_SEEDS", 362);
define("RAW_BEEF", 363);
define("STEAK", 364);
define("COOKED_BEEF", 364);
define("RAW_CHICKEN", 365);
define("COOKED_CHICKEN", 366);
define("NETHER_BRICK", 405);
define("QUARTZ", 406);
define("NETHER_QUARTZ", 406);
define("CAMERA", 456);
/*
define("", );
*/

View File

@ -27,7 +27,7 @@ the Free Software Foundation, either version 3 of the License, or
class WheatBlock extends FlowableBlock{ class WheatBlock extends FlowableBlock{
public function __construct($meta = 0){ public function __construct($meta = 0){
parent::__construct(WHEAT, $meta, "Wheat"); parent::__construct(WHEAT_BLOCK, $meta, "Wheat");
} }
public function getDrops(Item $item, Player $player){ public function getDrops(Item $item, Player $player){

View File

@ -27,7 +27,7 @@ the Free Software Foundation, either version 3 of the License, or
class MelonBlock extends TransparentBlock{ class MelonBlock extends TransparentBlock{
public function __construct(){ public function __construct(){
parent::__construct(MELON_BLOCK, 0, "Melon"); parent::__construct(MELON_BLOCK, 0, "Melon Block");
} }
} }

View File

@ -25,9 +25,9 @@ the Free Software Foundation, either version 3 of the License, or
*/ */
class NetherBrickBlock extends SolidBlock{ class NetherBricksBlock extends SolidBlock{
public function __construct(){ public function __construct(){
parent::__construct(NETHER_BRICK, 0, "Nether Brick"); parent::__construct(NETHER_BRICKS, 0, "Nether Bricks");
} }
} }

View File

@ -25,9 +25,9 @@ the Free Software Foundation, either version 3 of the License, or
*/ */
class NetherBrickStairsBlock extends StairBlock{ class NetherBricksStairsBlock extends StairBlock{
public function __construct($meta = 0){ public function __construct($meta = 0){
parent::__construct(NETHER_BRICK_STAIRS, $meta, "Nether Brick Stairs"); parent::__construct(NETHER_BRICKS_STAIRS, $meta, "Nether Bricks Stairs");
} }
} }