mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Fixed some items not keeping meta when constructed, close #968
This commit is contained in:
parent
1f4e6535bb
commit
8a3b31077e
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class Apple extends Food{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::APPLE, 0, $count, "Apple");
|
||||
parent::__construct(self::APPLE, $meta, $count, "Apple");
|
||||
}
|
||||
|
||||
public function getFoodRestore() : int{
|
||||
|
@ -28,7 +28,7 @@ use pocketmine\block\Block;
|
||||
class Bed extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::BED_BLOCK);
|
||||
parent::__construct(self::BED, 0, $count, "Bed");
|
||||
parent::__construct(self::BED, $meta, $count, "Bed");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
|
@ -28,6 +28,6 @@ use pocketmine\block\Block;
|
||||
class BeetrootSeeds extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::BEETROOT_BLOCK);
|
||||
parent::__construct(self::BEETROOT_SEEDS, 0, $count, "Beetroot Seeds");
|
||||
parent::__construct(self::BEETROOT_SEEDS, $meta, $count, "Beetroot Seeds");
|
||||
}
|
||||
}
|
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class BeetrootSoup extends Food{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::BEETROOT_SOUP, 0, $count, "Beetroot Soup");
|
||||
parent::__construct(self::BEETROOT_SOUP, $meta, $count, "Beetroot Soup");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
|
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class Bowl extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::BOWL, 0, $count, "Bowl");
|
||||
parent::__construct(self::BOWL, $meta, $count, "Bowl");
|
||||
}
|
||||
|
||||
}
|
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class Brick extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::BRICK, 0, $count, "Brick");
|
||||
parent::__construct(self::BRICK, $meta, $count, "Brick");
|
||||
}
|
||||
|
||||
}
|
@ -28,7 +28,7 @@ use pocketmine\block\Block;
|
||||
class Cake extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::CAKE_BLOCK);
|
||||
parent::__construct(self::CAKE, 0, $count, "Cake");
|
||||
parent::__construct(self::CAKE, $meta, $count, "Cake");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
|
@ -28,7 +28,7 @@ use pocketmine\block\Block;
|
||||
class Carrot extends Food{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::CARROT_BLOCK);
|
||||
parent::__construct(self::CARROT, 0, $count, "Carrot");
|
||||
parent::__construct(self::CARROT, $meta, $count, "Carrot");
|
||||
}
|
||||
|
||||
public function getFoodRestore() : int{
|
||||
|
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class Diamond extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::DIAMOND, 0, $count, "Diamond");
|
||||
parent::__construct(self::DIAMOND, $meta, $count, "Diamond");
|
||||
}
|
||||
|
||||
}
|
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class Feather extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::FEATHER, 0, $count, "Feather");
|
||||
parent::__construct(self::FEATHER, $meta, $count, "Feather");
|
||||
}
|
||||
|
||||
}
|
@ -25,6 +25,6 @@ namespace pocketmine\item;
|
||||
|
||||
class FishingRod extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::FISHING_ROD, 0, $count, "Fishing Rod");
|
||||
parent::__construct(self::FISHING_ROD, $meta, $count, "Fishing Rod");
|
||||
}
|
||||
}
|
@ -28,6 +28,6 @@ use pocketmine\block\Block;
|
||||
class FlowerPot extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::FLOWER_POT_BLOCK);
|
||||
parent::__construct(self::FLOWER_POT, 0, $count, "Flower Pot");
|
||||
parent::__construct(self::FLOWER_POT, $meta, $count, "Flower Pot");
|
||||
}
|
||||
}
|
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class GoldIngot extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::GOLD_INGOT, 0, $count, "Gold Ingot");
|
||||
parent::__construct(self::GOLD_INGOT, $meta, $count, "Gold Ingot");
|
||||
}
|
||||
|
||||
}
|
@ -28,7 +28,7 @@ use pocketmine\block\Block;
|
||||
class IronDoor extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::IRON_DOOR_BLOCK);
|
||||
parent::__construct(self::IRON_DOOR, 0, $count, "Iron Door");
|
||||
parent::__construct(self::IRON_DOOR, $meta, $count, "Iron Door");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
|
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class IronIngot extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::IRON_INGOT, 0, $count, "Iron Ingot");
|
||||
parent::__construct(self::IRON_INGOT, $meta, $count, "Iron Ingot");
|
||||
}
|
||||
|
||||
}
|
@ -28,6 +28,6 @@ use pocketmine\block\Block;
|
||||
class ItemFrame extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Block::ITEM_FRAME_BLOCK);
|
||||
parent::__construct(self::ITEM_FRAME, 0, $count, "Item Frame");
|
||||
parent::__construct(self::ITEM_FRAME, $meta, $count, "Item Frame");
|
||||
}
|
||||
}
|
@ -28,6 +28,6 @@ use pocketmine\block\Block;
|
||||
class MelonSeeds extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::MELON_STEM);
|
||||
parent::__construct(self::MELON_SEEDS, 0, $count, "Melon Seeds");
|
||||
parent::__construct(self::MELON_SEEDS, $meta, $count, "Melon Seeds");
|
||||
}
|
||||
}
|
@ -25,7 +25,7 @@ namespace pocketmine\item;
|
||||
|
||||
class MushroomStew extends Food{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::MUSHROOM_STEW, 0, $count, "Mushroom Stew");
|
||||
parent::__construct(self::MUSHROOM_STEW, $meta, $count, "Mushroom Stew");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
|
@ -25,7 +25,7 @@ namespace pocketmine\item;
|
||||
|
||||
class NetherQuartz extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::NETHER_QUARTZ, 0, $count, "Nether Quartz");
|
||||
parent::__construct(self::NETHER_QUARTZ, $meta, $count, "Nether Quartz");
|
||||
}
|
||||
|
||||
}
|
@ -29,7 +29,7 @@ use pocketmine\Player;
|
||||
|
||||
class Painting extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::PAINTING, 0, $count, "Painting");
|
||||
parent::__construct(self::PAINTING, $meta, $count, "Painting");
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
@ -28,7 +28,7 @@ use pocketmine\block\Block;
|
||||
class Potato extends Food{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::POTATO_BLOCK);
|
||||
parent::__construct(self::POTATO, 0, $count, "Potato");
|
||||
parent::__construct(self::POTATO, $meta, $count, "Potato");
|
||||
}
|
||||
|
||||
public function getFoodRestore() : int{
|
||||
|
@ -28,6 +28,6 @@ use pocketmine\block\Block;
|
||||
class PumpkinSeeds extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::PUMPKIN_STEM);
|
||||
parent::__construct(self::PUMPKIN_SEEDS, 0, $count, "Pumpkin Seeds");
|
||||
parent::__construct(self::PUMPKIN_SEEDS, $meta, $count, "Pumpkin Seeds");
|
||||
}
|
||||
}
|
@ -28,7 +28,7 @@ use pocketmine\block\Block;
|
||||
class Sign extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::SIGN_POST);
|
||||
parent::__construct(self::SIGN, 0, $count, "Sign");
|
||||
parent::__construct(self::SIGN, $meta, $count, "Sign");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
|
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class Snowball extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::SNOWBALL, 0, $count, "Snowball");
|
||||
parent::__construct(self::SNOWBALL, $meta, $count, "Snowball");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
|
@ -26,7 +26,7 @@ namespace pocketmine\item;
|
||||
|
||||
class Stick extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::STICK, 0, $count, "Stick");
|
||||
parent::__construct(self::STICK, $meta, $count, "Stick");
|
||||
}
|
||||
|
||||
}
|
@ -28,6 +28,6 @@ use pocketmine\block\Block;
|
||||
class Sugarcane extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::SUGARCANE_BLOCK);
|
||||
parent::__construct(self::SUGARCANE, 0, $count, "Sugar Cane");
|
||||
parent::__construct(self::SUGARCANE, $meta, $count, "Sugar Cane");
|
||||
}
|
||||
}
|
@ -28,6 +28,6 @@ use pocketmine\block\Block;
|
||||
class WheatSeeds extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::WHEAT_BLOCK);
|
||||
parent::__construct(self::WHEAT_SEEDS, 0, $count, "Wheat Seeds");
|
||||
parent::__construct(self::WHEAT_SEEDS, $meta, $count, "Wheat Seeds");
|
||||
}
|
||||
}
|
@ -28,7 +28,7 @@ use pocketmine\block\Block;
|
||||
class WoodenDoor extends Item{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
$this->block = Block::get(Item::WOODEN_DOOR_BLOCK);
|
||||
parent::__construct(self::WOODEN_DOOR, 0, $count, "Wooden Door");
|
||||
parent::__construct(self::WOODEN_DOOR, $meta, $count, "Wooden Door");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user