mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 15:36:08 +00:00
Implement torchflower, its seeds and its crop
This commit is contained in:
@@ -304,8 +304,9 @@ final class ItemTypeIds{
|
||||
public const GLOW_BERRIES = 20265;
|
||||
public const CHERRY_SIGN = 20266;
|
||||
public const ENCHANTED_BOOK = 20267;
|
||||
public const TORCHFLOWER_SEEDS = 20268;
|
||||
|
||||
public const FIRST_UNUSED_ITEM_ID = 20268;
|
||||
public const FIRST_UNUSED_ITEM_ID = 20269;
|
||||
|
||||
private static int $nextDynamicId = self::FIRST_UNUSED_ITEM_ID;
|
||||
|
||||
|
@@ -1082,6 +1082,7 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("tinted_glass", fn() => Blocks::TINTED_GLASS());
|
||||
$result->registerBlock("tnt", fn() => Blocks::TNT());
|
||||
$result->registerBlock("torch", fn() => Blocks::TORCH());
|
||||
$result->registerBlock("torchflower", fn() => Blocks::TORCHFLOWER());
|
||||
$result->registerBlock("trapdoor", fn() => Blocks::OAK_TRAPDOOR());
|
||||
$result->registerBlock("trapped_chest", fn() => Blocks::TRAPPED_CHEST());
|
||||
$result->registerBlock("trip_wire", fn() => Blocks::TRIPWIRE());
|
||||
@@ -1467,6 +1468,7 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->register("suspicious_stew", fn() => Items::SUSPICIOUS_STEW());
|
||||
$result->register("sweet_berries", fn() => Items::SWEET_BERRIES());
|
||||
$result->register("tonic", fn() => Items::MEDICINE()->setType(MedicineType::TONIC));
|
||||
$result->register("torchflower_seeds", fn() => Items::TORCHFLOWER_SEEDS());
|
||||
$result->register("totem", fn() => Items::TOTEM());
|
||||
$result->register("turtle_helmet", fn() => Items::TURTLE_HELMET());
|
||||
$result->register("turtle_shell_piece", fn() => Items::SCUTE());
|
||||
|
34
src/item/TorchflowerSeeds.php
Normal file
34
src/item/TorchflowerSeeds.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\block\VanillaBlocks;
|
||||
|
||||
final class TorchflowerSeeds extends Item{
|
||||
|
||||
public function getBlock(?int $clickedFace = null) : Block{
|
||||
return VanillaBlocks::TORCHFLOWER_CROP();
|
||||
}
|
||||
}
|
@@ -296,6 +296,7 @@ use function strtolower;
|
||||
* @method static Item SUGAR()
|
||||
* @method static SuspiciousStew SUSPICIOUS_STEW()
|
||||
* @method static SweetBerries SWEET_BERRIES()
|
||||
* @method static TorchflowerSeeds TORCHFLOWER_SEEDS()
|
||||
* @method static Totem TOTEM()
|
||||
* @method static TurtleHelmet TURTLE_HELMET()
|
||||
* @method static SpawnEgg VILLAGER_SPAWN_EGG()
|
||||
@@ -538,6 +539,7 @@ final class VanillaItems{
|
||||
self::register("sugar", new Item(new IID(Ids::SUGAR), "Sugar"));
|
||||
self::register("suspicious_stew", new SuspiciousStew(new IID(Ids::SUSPICIOUS_STEW), "Suspicious Stew"));
|
||||
self::register("sweet_berries", new SweetBerries(new IID(Ids::SWEET_BERRIES), "Sweet Berries"));
|
||||
self::register("torchflower_seeds", new TorchflowerSeeds(new IID(Ids::TORCHFLOWER_SEEDS), "Torchflower Seeds"));
|
||||
self::register("totem", new Totem(new IID(Ids::TOTEM), "Totem of Undying"));
|
||||
self::register("warped_sign", new ItemBlockWallOrFloor(new IID(Ids::WARPED_SIGN), Blocks::WARPED_SIGN(), Blocks::WARPED_WALL_SIGN()));
|
||||
self::register("water_bucket", new LiquidBucket(new IID(Ids::WATER_BUCKET), "Water Bucket", Blocks::WATER()));
|
||||
|
Reference in New Issue
Block a user