public class RecipeTransferHandlerHelper extends java.lang.Object implements IRecipeTransferHandlerHelper
Constructor and Description |
---|
RecipeTransferHandlerHelper() |
Modifier and Type | Method and Description |
---|---|
IRecipeTransferError |
createInternalError()
Create an error with
IRecipeTransferError.Type.INTERNAL . |
IRecipeTransferError |
createUserErrorForSlots(java.lang.String tooltipMessage,
java.util.Collection<java.lang.Integer> missingItemSlots)
Create an error with type
IRecipeTransferError.Type.USER_FACING that shows a tooltip and highlights missing item slots. |
IRecipeTransferError |
createUserErrorWithTooltip(java.lang.String tooltipMessage)
Create an error with type
IRecipeTransferError.Type.USER_FACING that shows a tooltip. |
public IRecipeTransferError createInternalError()
IRecipeTransferHandlerHelper
IRecipeTransferError.Type.INTERNAL
.
It is recommended that you also log a message to the console.createInternalError
in interface IRecipeTransferHandlerHelper
public IRecipeTransferError createUserErrorWithTooltip(@Nullable java.lang.String tooltipMessage)
IRecipeTransferHandlerHelper
IRecipeTransferError.Type.USER_FACING
that shows a tooltip.createUserErrorWithTooltip
in interface IRecipeTransferHandlerHelper
tooltipMessage
- the message to show on the tooltip for the recipe transfer button.public IRecipeTransferError createUserErrorForSlots(@Nullable java.lang.String tooltipMessage, @Nullable java.util.Collection<java.lang.Integer> missingItemSlots)
IRecipeTransferHandlerHelper
IRecipeTransferError.Type.USER_FACING
that shows a tooltip and highlights missing item slots.createUserErrorForSlots
in interface IRecipeTransferHandlerHelper
tooltipMessage
- the message to show on the tooltip for the recipe transfer button.missingItemSlots
- the slot indexes for items that are missing. Must not be empty.
Slots are indexed according to IGuiIngredientGroup.getGuiIngredients()
.