-
Notifications
You must be signed in to change notification settings - Fork 18
/
ISimpleCauldronRecipe.java
63 lines (54 loc) · 1.71 KB
/
ISimpleCauldronRecipe.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package knightminer.inspirations.library.recipe.cauldron;
import java.util.List;
import knightminer.inspirations.library.InspirationsRegistry;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemStack;
/**
* This is any cauldron recipe using items and fluids simple enough to be displayed in JEI
*/
public interface ISimpleCauldronRecipe extends ICauldronRecipe {
/**
* Gets the inputs of the recipe for display in JEI
* @return Recipe inputs
*/
List<ItemStack> getInput();
/**
* Gets the result of this recipe for display in JEI
* @return Recipe result
*/
default ItemStack getResult() {
return ItemStack.EMPTY;
}
/**
* Gets whether this recipe requires the cauldron to be above fire
* @return True if the recipe requires fire
*/
default boolean isBoiling() {
return false;
}
/**
* Gets the input state of this recipe for display in JEI. In order for it to be used, it must be either a Fluid, EnumDyeColor, or PotionType
* @return Input state as a Fluid, EnumDyeColor, or PotionType
*/
default Object getInputState() {
return Fluids.WATER;
}
/**
* Gets the result state of this recipe for display in JEI. In order for it to be used, it must be either a Fluid, EnumDyeColor, or PotionType
* @return Result state as a Fluid, EnumDyeColor, or PotionType
*/
default Object getState() {
return getInputState();
}
/**
* Gets the display starting level for display in JEI. The result level will be determined using {@link #getLevel(int)}
* @return
*/
default int getInputLevel() {
return InspirationsRegistry.getCauldronMax();
}
@Override
default ItemStack getResult(ItemStack stack, boolean boiling, int level, CauldronState state) {
return getResult().copy();
}
}