Get the maximum stacksize for the material hold in this ItemStack. (Returns -1 if it has no idea) @return The maximum you can stack this material to.
()
| 235 | * @return The maximum you can stack this material to. |
| 236 | */ |
| 237 | @Utility |
| 238 | public int getMaxStackSize() { |
| 239 | Material material = getType(); |
| 240 | if (material != null) { |
| 241 | return material.getMaxStackSize(); |
| 242 | } |
| 243 | return -1; |
| 244 | } |
| 245 | |
| 246 | private void createData(final byte data) { |
| 247 | this.data = type.getNewData(data); |
no test coverage detected