Working on Item IDs Added COAL APPLE DIAMOND STICK BOWL

This commit is contained in:
Michael Yoo 2013-02-06 19:57:32 +10:30
parent 1c05455514
commit 320dc1af88
7 changed files with 175 additions and 5 deletions

View File

@ -162,11 +162,11 @@ define("IRON_SHOVEL", 256);
define("IRON_PICKAXE", 257);
define("IRON_AXE", 258);
define("FLINT_STEEL", 259);
define("APPLE", 260);
define("APPLE", 260);//Implemented
define("BOW", 261);
define("ARROW", 262);
define("COAL", 263);
define("DIAMOND", 264);
define("COAL", 263);//Implemented
define("DIAMOND", 264);//Implemented
define("IRON_INGOT", 265);
define("GOLD_INGOT", 266);
define("IRON_SWORD", 267);
@ -182,8 +182,8 @@ define("DIAMOND_SWORD", 276);
define("DIAMOND_SHOVEL", 277);
define("DIAMOND_PICKAXE", 278);
define("DIAMOND_AXE", 279);
define("STICK", 280);
define("BOWL", 281);
define("STICK", 280);//Implemented
define("BOWL", 281);//Implemented
define("MUSHROOM_STEW", 282);
define("GOLD_SWORD", 283);
define("GOLD_SHOVEL", 284);

View File

@ -37,6 +37,11 @@ class Item{
IRON_DOOR => "IronDoorItem",
BED => "BedItem",
PAINTING => "PaintingItem",
COAL => "CoalItem",
APPLE => "AppleItem",
DIAMOND => "DiamondItem",
STICK => "StickItem",
BOWL => "BowlItem",
);
protected $block;
protected $id;

View File

@ -0,0 +1,33 @@
<?php
/*
-
/ \
/ \
/ PocketMine \
/ MP \
|\ @shoghicp /|
|. \ / .|
| .. \ / .. |
| .. | .. |
| .. | .. |
\ | /
\ | /
\ | /
\ | /
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.
*/
class AppleItem extends Item{
public function __construct($meta = 0, $count = 1){
parent::__construct(APPLE, 0, $count, "Apple");
}
}

View File

@ -0,0 +1,33 @@
<?php
/*
-
/ \
/ \
/ PocketMine \
/ MP \
|\ @shoghicp /|
|. \ / .|
| .. \ / .. |
| .. | .. |
| .. | .. |
\ | /
\ | /
\ | /
\ | /
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.
*/
class BowlItem extends Item{
public function __construct($meta = 0, $count = 1){
parent::__construct(BOWL, 0, $count, "Bowl");
}
}

View File

@ -0,0 +1,33 @@
<?php
/*
-
/ \
/ \
/ PocketMine \
/ MP \
|\ @shoghicp /|
|. \ / .|
| .. \ / .. |
| .. | .. |
| .. | .. |
\ | /
\ | /
\ | /
\ | /
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.
*/
class CoalItem extends Item{
public function __construct($meta = 0, $count = 1){
parent::__construct(COAL, 0, $count, "Coal");
}
}

View File

@ -0,0 +1,33 @@
<?php
/*
-
/ \
/ \
/ PocketMine \
/ MP \
|\ @shoghicp /|
|. \ / .|
| .. \ / .. |
| .. | .. |
| .. | .. |
\ | /
\ | /
\ | /
\ | /
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.
*/
class DiamondItem extends Item{
public function __construct($meta = 0, $count = 1){
parent::__construct(DIAMOND, 0, $count, "Diamond");
}
}

View File

@ -0,0 +1,33 @@
<?php
/*
-
/ \
/ \
/ PocketMine \
/ MP \
|\ @shoghicp /|
|. \ / .|
| .. \ / .. |
| .. | .. |
| .. | .. |
\ | /
\ | /
\ | /
\ | /
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.
*/
class StickItem extends Item{
public function __construct($meta = 0, $count = 1){
parent::__construct(STICK, 0, $count, "Stick");
}
}