Added Cakes

This commit is contained in:
Shoghi Cervantes Pueyo 2013-04-16 20:00:41 +02:00
parent bbbdaa30d1
commit d8bf5ce711
6 changed files with 73 additions and 1 deletions

View File

@ -129,6 +129,8 @@ define("NETHERRACK", 87);
define("SOUL_SAND", 88);
define("GLOWSTONE_BLOCK", 89);
define("CAKE_BLOCK", 92);
define("TRAPDOOR", 96);
define("STONE_BRICKS", 98);

View File

@ -123,7 +123,7 @@ define("COOKED_FISH", 350);
define("DYE", 351);
define("BONE", 352);
define("SUGAR", 353);
define("CAKE", 354);
define("BED", 355);

View File

@ -109,6 +109,8 @@ abstract class Block extends Vector3{
SOUL_SAND => "SoulSandBlock",
GLOWSTONE_BLOCK => "GlowstoneBlock",
CAKE_BLOCK => "CakeBlock",
TRAPDOOR => "TrapdoorBlock",
STONE_BRICKS => "StoneBricksBlock",

View File

@ -36,6 +36,7 @@ class Item{
WATER_BUCKET => "WaterBucketItem",
LAVA_BUCKET => "LavaBucketItem",
IRON_DOOR => "IronDoorItem",
CAKE => "CakeItem",
BED => "BedItem",
PAINTING => "PaintingItem",
COAL => "CoalItem",

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 CakeBlock extends TransparentBlock{
public function __construct(){
parent::__construct(CAKE_BLOCK, 0, "Cake Block");
}
}

View File

@ -0,0 +1,34 @@
<?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 CakeItem extends Item{
public function __construct($meta = 0, $count = 1){
$this->block = BlockAPI::get(CAKE_BLOCK);
$this->maxStackSize = 1;
parent::__construct(CAKE, 0, $count, "Cake");
}
}