Commits
md_5 authored 0c042936d82
120 120 | * Completely replaces the inventory's contents. Removes all existing |
121 121 | * contents and replaces it with the ItemStacks given in the array. |
122 122 | * |
123 123 | * @param items A complete replacement for the contents; the length must |
124 124 | * be less than or equal to {@link #getSize()}. |
125 125 | * @throws IllegalArgumentException If the array has more items than the |
126 126 | * inventory. |
127 127 | */ |
128 128 | public void setContents(ItemStack[] items) throws IllegalArgumentException; |
129 129 | |
130 + | /** |
131 + | * Return the contents from the section of the inventory where items can |
132 + | * reasonably be expected to be stored. In most cases this will represent |
133 + | * the entire inventory, but in some cases it may exclude armor or result |
134 + | * slots. |
135 + | * <br> |
136 + | * It is these contents which will be used for add / contains / remove |
137 + | * methods which look for a specific stack. |
138 + | * |
139 + | * @return inventory storage contents |
140 + | */ |
141 + | public ItemStack[] getStorageContents(); |
142 + | |
143 + | /** |
144 + | * Put the given ItemStacks into the storage slots |
145 + | * |
146 + | * @param items The ItemStacks to use as storage contents |
147 + | * @throws IllegalArgumentException If the array has more items than the |
148 + | * inventory. |
149 + | */ |
150 + | public void setStorageContents(ItemStack[] items) throws IllegalArgumentException; |
151 + | |
130 152 | /** |
131 153 | * Checks if the inventory contains any ItemStacks with the given |
132 154 | * materialId |
133 155 | * |
134 156 | * @param materialId The materialId to check for |
135 157 | * @return true if an ItemStack in this inventory contains the materialId |
136 158 | * @deprecated Magic value |
137 159 | */ |
138 160 | |
139 161 | public boolean contains(int materialId); |