Modifier and Type | Method | 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, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getItem, getLocation, getMaxStackSize, getSize, getStorageContents, getType, getViewers, iterator, iterator, remove, remove, removeItem, 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.@Nullable @Nullable Recipe getRecipe()
Copyright © 2020. All rights reserved.