/// Returns the max size of a stack with the given
/// type.
Returns the max size of a stack with the given
type.
Returns the max size of a stack with the given type .
pub fn max_size(item: Item) -> u8 {
    match item {
        Item::WoodenSword
        | Item::GoldenSword
        | Item::StoneSword
        | Item::IronSword
        | Item::DiamondSword
        | Item::WoodenAxe
        | Item::GoldenAxe
        | Item::StoneAxe
        | Item::IronAxe
        | Item::DiamondAxe
        | Item::WoodenHoe
        | Item::GoldenHoe
        | Item::StoneHoe
        | Item::IronHoe
        | Item::DiamondHoe
        | Item::WoodenPickaxe
        | Item::GoldenPickaxe
        | Item::StonePickaxe
        | Item::IronPickaxe
        | Item::DiamondPickaxe
        | Item::WoodenShovel
        | Item::GoldenShovel
        | Item::StoneShovel
        | Item::IronShovel
        | Item::DiamondShovel
        | Item::LeatherChestplate
        | Item::GoldenChestplate
        | Item::ChainmailChestplate
        | Item::IronChestplate
        | Item::DiamondChestplate
        | Item::LeatherLeggings
        | Item::GoldenLeggings
        | Item::ChainmailLeggings
        | Item::IronLeggings
        | Item::DiamondLeggings
        | Item::LeatherBoots
        | Item::GoldenBoots
        | Item::ChainmailBoots
        | Item::IronBoots
        | Item::DiamondBoots
        | Item::LeatherHelmet
        | Item::GoldenHelmet
        | Item::ChainmailHelmet
        | Item::IronHelmet
        | Item::DiamondHelmet
        | Item::Bow
        | Item::Book
        | Item::WrittenBook
        | Item::WritableBook
        | Item::FlintAndSteel
        | Item::WhiteBed
        | Item::OrangeBed
        | Item::MagentaBed
        | Item::LightBlueBed
        | Item::YellowBed
        | Item::LimeBed
        | Item::PinkBed
        | Item::GrayBed
        | Item::LightGrayBed
        | Item::CyanBed
        | Item::PurpleBed
        | Item::BlueBed
        | Item::BrownBed
        | Item::GreenBed
        | Item::RedBed
        | Item::BlackBed
        | Item::ShulkerBox
        | Item::TurtleEgg
        | Item::TurtleHelmet
        | Item::FishingRod
        | Item::EnchantedBook
        | Item::Potion
        | Item::LingeringPotion
        | Item::SplashPotion
        | Item::WaterBucket
        | Item::LavaBucket
        | Item::TropicalFishBucket
        | Item::CodBucket
        | Item::MilkBucket
        | Item::PufferfishBucket
        | Item::SalmonBucket
        | Item::CarrotOnAStick
        | Item::Elytra
        | Item::Shield
        | Item::Trident
        | Item::MusicDisc13
        | Item::MusicDiscCat
        | Item::MusicDiscBlocks
        | Item::MusicDiscChirp
        | Item::MusicDiscFar
        | Item::MusicDiscMall
        | Item::MusicDiscMellohi
        | Item::MusicDiscStal
        | Item::MusicDiscStrad
        | Item::MusicDiscWard
        | Item::MusicDisc11
        | Item::MusicDiscWait
        | Item::TotemOfUndying
        | Item::Shears
        | Item::AcaciaBoat
        | Item::DarkOakBoat
        | Item::OakBoat
        | Item::SpruceBoat
        | Item::BirchBoat
        | Item::JungleBoat
        | Item::MushroomStew
        | Item::BeetrootSoup
        | Item::RabbitStew
        | Item::Cake
        | Item::Minecart
        | Item::ChestMinecart
        | Item::CommandBlockMinecart
        | Item::FurnaceMinecart
        | Item::HopperMinecart
        | Item::TntMinecart
        | Item::DiamondHorseArmor
        | Item::GoldenHorseArmor
        | Item::IronHorseArmor => 1,
        Item::EnderPearl
        | Item::Snowball
        | Item::WhiteBanner
        | Item::OrangeBanner
        | Item::MagentaBanner
        | Item::LightBlueBanner
        | Item::YellowBanner
        | Item::LimeBanner
        | Item::PinkBanner
        | Item::GrayBanner
        | Item::LightGrayBanner
        | Item::CyanBanner
        | Item::PurpleBanner
        | Item::BlueBanner
        | Item::BrownBanner
        | Item::GreenBanner
        | Item::RedBanner
        | Item::BlackBanner
        | Item::Sign
        | Item::ArmorStand
        | Item::Egg => 16,
        _ => 64,
        // TODO: are we missing some here?
    }
}
pub fn max_size ( item : Item ) -> u8 { match item { Item :: WoodenSword | Item :: GoldenSword | Item :: StoneSword | Item :: IronSword | Item :: DiamondSword | Item :: WoodenAxe | Item :: GoldenAxe | Item :: StoneAxe | Item :: IronAxe | Item :: DiamondAxe | Item :: WoodenHoe | Item :: GoldenHoe | Item :: StoneHoe | Item :: IronHoe | Item :: DiamondHoe | Item :: WoodenPickaxe | Item :: GoldenPickaxe | Item :: StonePickaxe | Item :: IronPickaxe | Item :: DiamondPickaxe | Item :: WoodenShovel | Item :: GoldenShovel | Item :: StoneShovel | Item :: IronShovel | Item :: DiamondShovel | Item :: LeatherChestplate | Item :: GoldenChestplate | Item :: ChainmailChestplate | Item :: IronChestplate | Item :: DiamondChestplate | Item :: LeatherLeggings | Item :: GoldenLeggings | Item :: ChainmailLeggings | Item :: IronLeggings | Item :: DiamondLeggings | Item :: LeatherBoots | Item :: GoldenBoots | Item :: ChainmailBoots | Item :: IronBoots | Item :: DiamondBoots | Item :: LeatherHelmet | Item :: GoldenHelmet | Item :: ChainmailHelmet | Item :: IronHelmet | Item :: DiamondHelmet | Item :: Bow | Item :: Book | Item :: WrittenBook | Item :: WritableBook | Item :: FlintAndSteel | Item :: WhiteBed | Item :: OrangeBed | Item :: MagentaBed | Item :: LightBlueBed | Item :: YellowBed | Item :: LimeBed | Item :: PinkBed | Item :: GrayBed | Item :: LightGrayBed | Item :: CyanBed | Item :: PurpleBed | Item :: BlueBed | Item :: BrownBed | Item :: GreenBed | Item :: RedBed | Item :: BlackBed | Item :: ShulkerBox | Item :: TurtleEgg | Item :: TurtleHelmet | Item :: FishingRod | Item :: EnchantedBook | Item :: Potion | Item :: LingeringPotion | Item :: SplashPotion | Item :: WaterBucket | Item :: LavaBucket | Item :: TropicalFishBucket | Item :: CodBucket | Item :: MilkBucket | Item :: PufferfishBucket | Item :: SalmonBucket | Item :: CarrotOnAStick | Item :: Elytra | Item :: Shield | Item :: Trident | Item :: MusicDisc13 | Item :: MusicDiscCat | Item :: MusicDiscBlocks | Item :: MusicDiscChirp | Item :: MusicDiscFar | Item :: MusicDiscMall | Item :: MusicDiscMellohi | Item :: MusicDiscStal | Item :: MusicDiscStrad | Item :: MusicDiscWard | Item :: MusicDisc11 | Item :: MusicDiscWait | Item :: TotemOfUndying | Item :: Shears | Item :: AcaciaBoat | Item :: DarkOakBoat | Item :: OakBoat | Item :: SpruceBoat | Item :: BirchBoat | Item :: JungleBoat | Item :: MushroomStew | Item :: BeetrootSoup | Item :: RabbitStew | Item :: Cake | Item :: Minecart | Item :: ChestMinecart | Item :: CommandBlockMinecart | Item :: FurnaceMinecart | Item :: HopperMinecart | Item :: TntMinecart | Item :: DiamondHorseArmor | Item :: GoldenHorseArmor | Item :: IronHorseArmor => 1 , Item :: EnderPearl | Item :: Snowball | Item :: WhiteBanner | Item :: OrangeBanner | Item :: MagentaBanner | Item :: LightBlueBanner | Item :: YellowBanner | Item :: LimeBanner | Item :: PinkBanner | Item :: GrayBanner | Item :: LightGrayBanner | Item :: CyanBanner | Item :: PurpleBanner | Item :: BlueBanner | Item :: BrownBanner | Item :: GreenBanner | Item :: RedBanner | Item :: BlackBanner | Item :: Sign | Item :: ArmorStand | Item :: Egg => 16 , _ => 64 , // TODO: are we missing some here? } }
Returns the max size of a stack with the given
type.
Returns the max size of a stack with the given type .
item
Item