Updated the stacking (Patch contributed by Stephen304)

http://forum.mc-server.org/showthread.php?tid=503&pid=8609#pid8609

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1614 0a769ca7-a7f5-676a-18bf-c427514a06d6
master
madmaxoft@gmail.com 2013-06-20 18:29:34 +00:00
parent 0aba613084
commit c867bdac24
2 changed files with 20 additions and 2 deletions

View File

@ -317,16 +317,17 @@ enum ENUM_ITEM_ID
E_ITEM_BOOK_AND_QUILL = 386, E_ITEM_BOOK_AND_QUILL = 386,
E_ITEM_WRITTEN_BOOK = 387, E_ITEM_WRITTEN_BOOK = 387,
E_ITEM_EMERALD = 388, E_ITEM_EMERALD = 388,
// TODO: missing an item: item frame
E_ITEM_FLOWER_POT = 390, E_ITEM_FLOWER_POT = 390,
E_ITEM_CARROT = 391, E_ITEM_CARROT = 391,
E_ITEM_POTATO = 392, E_ITEM_POTATO = 392,
E_ITEM_BAKED_POTATO = 393, E_ITEM_BAKED_POTATO = 393,
E_ITEM_POISONOUS_POTATO = 394, E_ITEM_POISONOUS_POTATO = 394,
// TODO: missing an item // TODO: missing an item: empty map
E_ITEM_GOLDEN_CARROT = 396, E_ITEM_GOLDEN_CARROT = 396,
E_ITEM_HEAD = 397, E_ITEM_HEAD = 397,
E_ITEM_CARROT_ON_STICK = 398, E_ITEM_CARROT_ON_STICK = 398,
// TODO: missing an item // TODO: missing an item: nether star
E_ITEM_PUMPKIN_PIE = 400, E_ITEM_PUMPKIN_PIE = 400,
E_ITEM_FIREWORK_ROCKET = 401, E_ITEM_FIREWORK_ROCKET = 401,
E_ITEM_FIREWORK_STAR = 402, E_ITEM_FIREWORK_STAR = 402,
@ -336,6 +337,7 @@ enum ENUM_ITEM_ID
E_ITEM_NETHER_QUARTZ = 406, E_ITEM_NETHER_QUARTZ = 406,
E_ITEM_MINECART_WITH_TNT = 407, E_ITEM_MINECART_WITH_TNT = 407,
E_ITEM_MINECART_WITH_HOPPER = 408, E_ITEM_MINECART_WITH_HOPPER = 408,
// TODO: Add horse armour/horse paraphernalia
// Keep these two as the last values of the consecutive list, without a number - they will get their correct number assigned automagically by C++ // Keep these two as the last values of the consecutive list, without a number - they will get their correct number assigned automagically by C++
// IsValidItem() depends on this! // IsValidItem() depends on this!

View File

@ -272,6 +272,7 @@ char cItemHandler::GetMaxStackSize(void)
switch (m_ItemType) //sorted by id switch (m_ItemType) //sorted by id
{ {
case E_ITEM_ARROW: return 64; case E_ITEM_ARROW: return 64;
case E_ITEM_BAKED_POTATO: return 64;
case E_ITEM_BLAZE_POWDER: return 64; case E_ITEM_BLAZE_POWDER: return 64;
case E_ITEM_BLAZE_ROD: return 64; case E_ITEM_BLAZE_ROD: return 64;
case E_ITEM_BONE: return 64; case E_ITEM_BONE: return 64;
@ -281,10 +282,13 @@ char cItemHandler::GetMaxStackSize(void)
case E_ITEM_BREAD: return 64; case E_ITEM_BREAD: return 64;
case E_ITEM_BREWING_STAND: return 64; case E_ITEM_BREWING_STAND: return 64;
case E_ITEM_BUCKET: return 1; // TODO: change this to 16 when turning compatibility to 1.3 case E_ITEM_BUCKET: return 1; // TODO: change this to 16 when turning compatibility to 1.3
case E_ITEM_CARROT: return 64;
case E_ITEM_CAULDRON: return 64;
case E_ITEM_CLAY: return 64; case E_ITEM_CLAY: return 64;
case E_ITEM_CLAY_BRICK: return 64; case E_ITEM_CLAY_BRICK: return 64;
case E_ITEM_CLOCK: return 64; case E_ITEM_CLOCK: return 64;
case E_ITEM_COAL: return 64; case E_ITEM_COAL: return 64;
case E_ITEM_COMPARATOR: return 64;
case E_ITEM_COMPASS: return 64; case E_ITEM_COMPASS: return 64;
case E_ITEM_COOKED_CHICKEN: return 64; case E_ITEM_COOKED_CHICKEN: return 64;
case E_ITEM_COOKED_FISH: return 64; case E_ITEM_COOKED_FISH: return 64;
@ -299,22 +303,33 @@ char cItemHandler::GetMaxStackSize(void)
case E_ITEM_FEATHER: return 64; case E_ITEM_FEATHER: return 64;
case E_ITEM_FERMENTED_SPIDER_EYE: return 64; case E_ITEM_FERMENTED_SPIDER_EYE: return 64;
case E_ITEM_FIRE_CHARGE: return 64; case E_ITEM_FIRE_CHARGE: return 64;
case E_ITEM_FIREWORK_ROCKET: return 64;
case E_ITEM_FIREWORK_STAR: return 64;
case E_ITEM_FLINT: return 64; case E_ITEM_FLINT: return 64;
case E_ITEM_FLOWER_POT: return 64;
case E_ITEM_GHAST_TEAR: return 64; case E_ITEM_GHAST_TEAR: return 64;
case E_ITEM_GLASS_BOTTLE: return 64; case E_ITEM_GLASS_BOTTLE: return 64;
case E_ITEM_GLISTERING_MELON: return 64; case E_ITEM_GLISTERING_MELON: return 64;
case E_ITEM_GLOWSTONE_DUST: return 64; case E_ITEM_GLOWSTONE_DUST: return 64;
case E_ITEM_GOLD: return 64; case E_ITEM_GOLD: return 64;
case E_ITEM_GOLDEN_APPLE: return 64; case E_ITEM_GOLDEN_APPLE: return 64;
case E_ITEM_GOLDEN_CARROT: return 64;
case E_ITEM_GOLD_NUGGET: return 64; case E_ITEM_GOLD_NUGGET: return 64;
case E_ITEM_GUNPOWDER: return 64; case E_ITEM_GUNPOWDER: return 64;
case E_ITEM_HEAD: return 64;
case E_ITEM_IRON: return 64; case E_ITEM_IRON: return 64;
case E_ITEM_LEATHER: return 64; case E_ITEM_LEATHER: return 64;
case E_ITEM_MAGMA_CREAM: return 64; case E_ITEM_MAGMA_CREAM: return 64;
case E_ITEM_MAP: return 64;
case E_ITEM_MELON_SEEDS: return 64; case E_ITEM_MELON_SEEDS: return 64;
case E_ITEM_MELON_SLICE: return 64; case E_ITEM_MELON_SLICE: return 64;
case E_ITEM_NETHER_BRICK: return 64;
case E_ITEM_NETHER_WART: return 64;
case E_ITEM_PAINTINGS: return 64; case E_ITEM_PAINTINGS: return 64;
case E_ITEM_PAPER: return 64; case E_ITEM_PAPER: return 64;
case E_ITEM_POISONOUS_POTATO: return 64;
case E_ITEM_POTATO: return 64;
case E_ITEM_PUMPKIN_PIE: return 64;
case E_ITEM_PUMPKIN_SEEDS: return 64; case E_ITEM_PUMPKIN_SEEDS: return 64;
case E_ITEM_RAW_BEEF: return 64; case E_ITEM_RAW_BEEF: return 64;
case E_ITEM_RAW_CHICKEN: return 64; case E_ITEM_RAW_CHICKEN: return 64;
@ -328,6 +343,7 @@ char cItemHandler::GetMaxStackSize(void)
case E_ITEM_SIGN: return 16; case E_ITEM_SIGN: return 16;
case E_ITEM_SLIMEBALL: return 64; case E_ITEM_SLIMEBALL: return 64;
case E_ITEM_SNOWBALL: return 16; case E_ITEM_SNOWBALL: return 16;
case E_ITEM_SPAWN_EGG: return 64;
case E_ITEM_SPIDER_EYE: return 64; case E_ITEM_SPIDER_EYE: return 64;
case E_ITEM_STEAK: return 64; case E_ITEM_STEAK: return 64;
case E_ITEM_STICK: return 64; case E_ITEM_STICK: return 64;