Modifier and Type | Method and Description |
---|---|
@NotNull ItemStack[] |
getMatrix()
Get the contents of the crafting matrix.
|
@Nullable Recipe |
getRecipe()
Get the current recipe formed on the crafting inventory, if any.
|
@Nullable ItemStack |
getResult()
Check what item is in the result slot of this crafting inventory.
|
void |
setMatrix(@NotNull ItemStack[] contents)
Replace the contents of the crafting matrix
|
void |
setResult(@Nullable ItemStack newResult)
Set the item in the result slot of the crafting inventory.
|
addItem, all, all, clear, clear, close, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getHolder, getItem, getLocation, getMaxStackSize, getSize, getStorageContents, getType, getViewers, isEmpty, iterator, iterator, remove, remove, removeItem, removeItemAnySlot, setContents, setItem, setMaxStackSize, setStorageContents
forEach, spliterator
@Nullable @Nullable ItemStack getResult()
@NotNull @NotNull ItemStack[] getMatrix()
void setResult(@Nullable @Nullable ItemStack newResult)
newResult
- The new result item.void setMatrix(@NotNull @NotNull ItemStack[] contents)
contents
- The new contents. Individual entries may be null.IllegalArgumentException
- if the length of contents is greater
than the size of the crafting matrix.Copyright © 2021. All rights reserved.