mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Set the correct max stack size for spyglass (#5133)
This commit is contained in:
parent
5536672e4b
commit
a005cd6e33
@ -185,7 +185,6 @@ class ItemFactory{
|
||||
$this->register(new Item(new IID(Ids::RAW_IRON), "Raw Iron"));
|
||||
$this->register(new Item(new IID(Ids::RAW_GOLD), "Raw Gold"));
|
||||
$this->register(new Item(new IID(Ids::PHANTOM_MEMBRANE), "Phantom Membrane"));
|
||||
$this->register(new Item(new IID(Ids::SPYGLASS), "Spyglass"));
|
||||
|
||||
//the meta values for buckets are intentionally hardcoded because block IDs will change in the future
|
||||
$this->register(new LiquidBucket(new IID(Ids::WATER_BUCKET), "Water Bucket", Blocks::WATER()));
|
||||
@ -235,6 +234,7 @@ class ItemFactory{
|
||||
$this->register(new ItemBlockWallOrFloor(new IID(Ids::WARPED_SIGN), Blocks::WARPED_SIGN(), Blocks::WARPED_WALL_SIGN()));
|
||||
$this->register(new Snowball(new IID(Ids::SNOWBALL), "Snowball"));
|
||||
$this->register(new SpiderEye(new IID(Ids::SPIDER_EYE), "Spider Eye"));
|
||||
$this->register(new Spyglass(new IID(Ids::SPYGLASS), "Spyglass"));
|
||||
$this->register(new Steak(new IID(Ids::STEAK), "Steak"));
|
||||
$this->register(new Stick(new IID(Ids::STICK), "Stick"));
|
||||
$this->register(new StringItem(new IID(Ids::STRING), "String"));
|
||||
|
31
src/item/Spyglass.php
Normal file
31
src/item/Spyglass.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?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;
|
||||
|
||||
class Spyglass extends Item{
|
||||
|
||||
public function getMaxStackSize() : int{
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -249,7 +249,7 @@ use pocketmine\utils\CloningRegistryTrait;
|
||||
* @method static SplashPotion SPLASH_POTION()
|
||||
* @method static Boat SPRUCE_BOAT()
|
||||
* @method static ItemBlockWallOrFloor SPRUCE_SIGN()
|
||||
* @method static Item SPYGLASS()
|
||||
* @method static Spyglass SPYGLASS()
|
||||
* @method static SpawnEgg SQUID_SPAWN_EGG()
|
||||
* @method static Steak STEAK()
|
||||
* @method static Stick STICK()
|
||||
|
Loading…
x
Reference in New Issue
Block a user