Modifier and Type | Method and Description |
---|---|
default @Nullable ItemStack |
getFirstItem()
Gets the item in the left input slot.
|
int |
getMaximumRepairCost()
Get the maximum experience cost (in levels) to be allowed by the current
repair.
|
@Nullable String |
getRenameText()
Get the name to be applied to the repaired item.
|
int |
getRepairCost()
Get the experience cost (in levels) to complete the current repair.
|
default @Nullable ItemStack |
getResult()
Gets the item in the result slot.
|
default @Nullable ItemStack |
getSecondItem()
Gets the item in the right input slot.
|
default void |
setFirstItem(@Nullable ItemStack firstItem)
Sets the item in the left input slot.
|
void |
setMaximumRepairCost(int levels)
Set the maximum experience cost (in levels) to be allowed by the current
repair.
|
void |
setRepairCost(int levels)
Set the experience cost (in levels) to complete the current repair.
|
default void |
setResult(@Nullable ItemStack result)
Sets the item in the result slot.
|
default void |
setSecondItem(@Nullable ItemStack secondItem)
Sets the item in the right input slot.
|
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 String getRenameText()
int getRepairCost()
void setRepairCost(int levels)
levels
- the experience costint getMaximumRepairCost()
getRepairCost()
exceeds the returned
value, the repair result will be air to due being "too expensive".
By default, this level is set to 40. Players in creative mode ignore the maximum repair cost.
void setMaximumRepairCost(int levels)
levels
- the maximum experience cost@Nullable default @Nullable ItemStack getFirstItem()
default void setFirstItem(@Nullable @Nullable ItemStack firstItem)
firstItem
- item to set@Nullable default @Nullable ItemStack getSecondItem()
default void setSecondItem(@Nullable @Nullable ItemStack secondItem)
secondItem
- item to set@Nullable default @Nullable ItemStack getResult()
Copyright © 2021. All rights reserved.