Commits
md_5 authored 6751b88aad4
83 83 | */ |
84 84 | |
85 85 | public int getItemTypeId() { |
86 86 | return type; |
87 87 | } |
88 88 | |
89 89 | /** |
90 90 | * Creates a new ItemStack based on this MaterialData |
91 91 | * |
92 92 | * @return New ItemStack containing a copy of this MaterialData |
93 + | * @deprecated this method creates an ItemStack of size 0 which is not |
94 + | * generally useful. Consider {@link #toItemStack(int)}. |
93 95 | */ |
96 + | |
94 97 | public ItemStack toItemStack() { |
95 98 | return new ItemStack(type, 0, data); |
96 99 | } |
97 100 | |
98 101 | /** |
99 102 | * Creates a new ItemStack based on this MaterialData |
100 103 | * |
101 104 | * @param amount The stack size of the new stack |
102 105 | * @return New ItemStack containing a copy of this MaterialData |
103 106 | */ |