From d8bf5ce7112a80f9711208a13a9375eab214aa4d Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Tue, 16 Apr 2013 20:00:41 +0200 Subject: [PATCH] Added Cakes --- src/constants/BlockIDs.php | 2 ++ src/constants/ItemIDs.php | 2 +- src/material/Block.php | 2 ++ src/material/Item.php | 1 + src/material/block/solid/Cake.php | 33 +++++++++++++++++++++++++++++ src/material/item/generic/Cake.php | 34 ++++++++++++++++++++++++++++++ 6 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 src/material/block/solid/Cake.php create mode 100644 src/material/item/generic/Cake.php diff --git a/src/constants/BlockIDs.php b/src/constants/BlockIDs.php index ca84ea0e..4e080558 100644 --- a/src/constants/BlockIDs.php +++ b/src/constants/BlockIDs.php @@ -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); diff --git a/src/constants/ItemIDs.php b/src/constants/ItemIDs.php index 1d79f627..0ca6b13a 100644 --- a/src/constants/ItemIDs.php +++ b/src/constants/ItemIDs.php @@ -123,7 +123,7 @@ define("COOKED_FISH", 350); define("DYE", 351); define("BONE", 352); define("SUGAR", 353); - +define("CAKE", 354); define("BED", 355); diff --git a/src/material/Block.php b/src/material/Block.php index 66a6f0cd..a50f8a64 100644 --- a/src/material/Block.php +++ b/src/material/Block.php @@ -109,6 +109,8 @@ abstract class Block extends Vector3{ SOUL_SAND => "SoulSandBlock", GLOWSTONE_BLOCK => "GlowstoneBlock", + CAKE_BLOCK => "CakeBlock", + TRAPDOOR => "TrapdoorBlock", STONE_BRICKS => "StoneBricksBlock", diff --git a/src/material/Item.php b/src/material/Item.php index ae035f9a..72ab0b81 100644 --- a/src/material/Item.php +++ b/src/material/Item.php @@ -36,6 +36,7 @@ class Item{ WATER_BUCKET => "WaterBucketItem", LAVA_BUCKET => "LavaBucketItem", IRON_DOOR => "IronDoorItem", + CAKE => "CakeItem", BED => "BedItem", PAINTING => "PaintingItem", COAL => "CoalItem", diff --git a/src/material/block/solid/Cake.php b/src/material/block/solid/Cake.php new file mode 100644 index 00000000..38ced332 --- /dev/null +++ b/src/material/block/solid/Cake.php @@ -0,0 +1,33 @@ +block = BlockAPI::get(CAKE_BLOCK); + $this->maxStackSize = 1; + parent::__construct(CAKE, 0, $count, "Cake"); + } +} \ No newline at end of file