/
IItemBlacklist.java
31 lines (26 loc) · 1.03 KB
/
IItemBlacklist.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
package mezz.jei.api;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
/**
* The Item Blacklist allows mods to hide their items from JEI's item list.
* Get the instance from {@link IJeiHelpers#getItemBlacklist()}.
*/
public interface IItemBlacklist {
/**
* Stop JEI from displaying a specific item in the item list.
* Use {@link OreDictionary#WILDCARD_VALUE} meta for wildcard.
* Items blacklisted with this API can't be seen in the config or in edit mode.
*/
void addItemToBlacklist(@Nonnull ItemStack itemStack);
/**
* Undo blacklisting an item.
* This is for mods that hide items initially and reveal them when certain conditions are met.
* Items blacklisted by the user in the config will remain hidden.
*/
void removeItemFromBlacklist(@Nonnull ItemStack itemStack);
/**
* Returns true if the item is blacklisted and will not be displayed in the item list.
*/
boolean isItemBlacklisted(@Nonnull ItemStack itemStack);
}