mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-27 21:59:52 +00:00
Added flowers compatible with MCPE 0.11.
Signed-off-by: Michael Yoo <michael@yoo.id.au>
This commit is contained in:
parent
f64caf6c96
commit
388f5c2c91
@ -84,8 +84,7 @@ class Block extends Position implements Metadatable{
|
||||
const DEAD_BUSH = 32;
|
||||
const WOOL = 35;
|
||||
const DANDELION = 37;
|
||||
const ROSE = 38;
|
||||
const POPPY = 38;
|
||||
const RED_FLOWER = 38;
|
||||
const BROWN_MUSHROOM = 39;
|
||||
const RED_MUSHROOM = 40;
|
||||
const GOLD_BLOCK = 41;
|
||||
@ -334,7 +333,7 @@ class Block extends Position implements Metadatable{
|
||||
self::$list[self::DEAD_BUSH] = DeadBush::class;
|
||||
self::$list[self::WOOL] = Wool::class;
|
||||
self::$list[self::DANDELION] = Dandelion::class;
|
||||
self::$list[self::POPPY] = Poppy::class;
|
||||
self::$list[self::RED_FLOWER] = Flower::class;
|
||||
self::$list[self::BROWN_MUSHROOM] = BrownMushroom::class;
|
||||
self::$list[self::RED_MUSHROOM] = RedMushroom::class;
|
||||
self::$list[self::GOLD_BLOCK] = Gold::class;
|
||||
|
@ -25,16 +25,38 @@ use pocketmine\item\Item;
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\Player;
|
||||
|
||||
class Poppy extends Flowable{
|
||||
class Flower extends Flowable{
|
||||
const POPPY = 0;
|
||||
const BLUE_ORCHID = 1;
|
||||
const ALLIUM = 2;
|
||||
const AZURE_BLUET = 3;
|
||||
const RED_TULIP = 4;
|
||||
const ORANGE_TULIP = 5;
|
||||
const WHITE_TULIP = 6;
|
||||
const PINK_TULIP = 7;
|
||||
const OXEYE_DAISY = 8;
|
||||
|
||||
protected $id = self::POPPY;
|
||||
protected $id = self::RED_FLOWER;
|
||||
|
||||
public function __construct($meta = 0){
|
||||
$this->meta = $meta;
|
||||
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
return "Poppy";
|
||||
static $names = [
|
||||
self::POPPY => "Poppy",
|
||||
self::BLUE_ORCHID => "Blue Orchid",
|
||||
self::ALLIUM => "Allium",
|
||||
self::AZURE_BLUET => "Azure Bluet",
|
||||
self::RED_TULIP => "Red Tulip",
|
||||
self::ORANGE_TULIP => "Orange Tulip",
|
||||
self::WHITE_TULIP => "White Tulip",
|
||||
self::PINK_TULIP => "Pink Tulip",
|
||||
self::OXEYE_DAISY => "Oxeye Daisy",
|
||||
9 => "Unknown Flower",
|
||||
];
|
||||
return $names[$this->meta & 0x09];
|
||||
}
|
||||
|
||||
|
@ -78,8 +78,7 @@ class Item{
|
||||
const DEAD_BUSH = 32;
|
||||
const WOOL = 35;
|
||||
const DANDELION = 37;
|
||||
const ROSE = 38;
|
||||
const POPPY = 38;
|
||||
const RED_FLOWER = 38;
|
||||
const BROWN_MUSHROOM = 39;
|
||||
const RED_MUSHROOM = 40;
|
||||
const GOLD_BLOCK = 41;
|
||||
@ -499,7 +498,6 @@ class Item{
|
||||
self::initCreativeItems();
|
||||
}
|
||||
|
||||
|
||||
private static $creative = [];
|
||||
|
||||
private static function initCreativeItems(){
|
||||
@ -645,15 +643,15 @@ class Item{
|
||||
self::addCreativeItem(Item::get(Item::FURNACE, 0));
|
||||
self::addCreativeItem(Item::get(Item::END_PORTAL, 0));
|
||||
self::addCreativeItem(Item::get(Item::DANDELION, 0));
|
||||
self::addCreativeItem(Item::get(Item::POPPY, 0));
|
||||
//TODO: blue orchid
|
||||
//TODO: Allium
|
||||
//TODO: Azure Bluet
|
||||
//TODO: Red Tulip
|
||||
//TODO: Orange Tulip
|
||||
//TODO: White Tulip
|
||||
//TODO: Pink Tulip
|
||||
//TODO: Oxeye Daisy
|
||||
self::addCreativeItem(Item::get(Item::RED_FLOWER, 0));
|
||||
self::addCreativeItem(Item::get(Item::RED_FLOWER, 1));
|
||||
self::addCreativeItem(Item::get(Item::RED_FLOWER, 2));
|
||||
self::addCreativeItem(Item::get(Item::RED_FLOWER, 3));
|
||||
self::addCreativeItem(Item::get(Item::RED_FLOWER, 4));
|
||||
self::addCreativeItem(Item::get(Item::RED_FLOWER, 5));
|
||||
self::addCreativeItem(Item::get(Item::RED_FLOWER, 6));
|
||||
self::addCreativeItem(Item::get(Item::RED_FLOWER, 7));
|
||||
self::addCreativeItem(Item::get(Item::RED_FLOWER, 8));
|
||||
//TODO: Lilac
|
||||
//TODO: Double Tallgrass
|
||||
//TODO: Large Fern
|
||||
|
Loading…
x
Reference in New Issue
Block a user