/
IRecipeTransferError.java
35 lines (30 loc) · 1.13 KB
/
IRecipeTransferError.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package mezz.jei.api.recipe.transfer;
import mezz.jei.api.gui.IRecipeLayout;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
/**
* A reason that a recipe transfer couldn't happen.
* <p>
* Recipe transfer errors can be created with {@link IRecipeTransferHandlerHelper} or you can implement your own.
* These errors are returned from {@link IRecipeTransferHandler#transferRecipe(Container, IRecipeLayout, EntityPlayer, boolean, boolean)}.
*/
public interface IRecipeTransferError {
enum Type {
/**
* Errors where the Transfer handler is broken or does not work.
* These errors will hide the recipe transfer button, and do not display anything to the user.
*/
INTERNAL,
/**
* Errors that the player can fix. Missing items, inventory full, etc.
* Something informative will be shown to the player.
*/
USER_FACING
}
Type getType();
/**
* Called on {@link Type#USER_FACING} errors.
*/
void showError(Minecraft minecraft, int mouseX, int mouseY, IRecipeLayout recipeLayout, int recipeX, int recipeY);
}