Clone the itemstack, and allow for passing in a stacksize

This commit is contained in:
Christian 2013-03-23 14:58:25 -04:00
parent db46ea94bc
commit 4550b5795a
2 changed files with 6 additions and 3 deletions

View file

@ -319,7 +319,7 @@ public class GameData {
Block b = findBlock(modId, name);
if (b != null)
{
is = new ItemStack(b, 0, 0);
is = new ItemStack(b, 0, Short.MAX_VALUE);
}
}
return is;

View file

@ -411,10 +411,13 @@ public class GameRegistry
*
* @param modId The modid of the stack owner
* @param name The name of the stack
* @param stackSize The size of the stack returned
* @return The custom itemstack or null if no such itemstack was found
*/
public static ItemStack findItemStack(String modId, String name)
public static ItemStack findItemStack(String modId, String name, int stackSize)
{
return GameData.findItemStack(modId, name);
ItemStack is = GameData.findItemStack(modId, name).func_77946_l();
is.field_77994_a = stackSize;
return is;
}
}