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