public class API
extends java.lang.Object
| Constructor and Description |
|---|
API() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addFastTransferExemptSlot(java.lang.Class<? extends Slot> slotClass)
Tells NEI not to perform any Fast Transfer operations on slots of a particular class
|
static void |
addInfiniteItemHandler(IInfiniteItemHandler handler)
Registers a new Infinite Item Handler.
|
static void |
addItemFilter(ItemFilter.ItemFilterProvider filterProvider)
Register a filter provider for the item panel.
|
static void |
addItemListEntry(ItemStack item)
Adds an item to the item panel.
|
static void |
addItemVariant(Item item,
ItemStack variant)
Adds an additional item list entry for an item, sorted after the rest of the items are found through the normal process
|
static void |
addKeyBind(java.lang.String ident,
int defaultKey)
Add a custom KeyBinding to be configured in the Controls menu.
|
static void |
addLayoutStyle(int styleID,
LayoutStyle style)
Add a new Layout Style for the NEI interface
|
static void |
addOption(Option option) |
static void |
addSearchProvider(SearchField.ISearchProvider provider)
Adds a new search provider to the search field
|
static void |
addSortOption(java.lang.String name,
java.util.Comparator<ItemStack> comparator)
Adds a new sorting option to the item panel sort menu
|
static void |
addSubset(java.lang.String name,
ItemFilter filter)
Adds a new tag to the item subset dropdown.
|
static void |
addSubset(java.lang.String name,
java.lang.Iterable<ItemStack> items)
Adds a new tag to the item subset dropdown.
|
static void |
addSubset(SubsetWidget.SubsetTag tag)
Adds a new tag to the item subset dropdown.
|
static void |
hideItem(ItemStack item)
Hide an item from the item panel
Damage values of OreDictionary.WILDCARD_VALUE and ItemStackMap.WILDCARD_TAG tags function as wildcards for their respective variables
|
static void |
registerGuiOverlay(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
java.lang.String ident)
Add a gui to the default overlay renderer with the default position
|
static void |
registerGuiOverlay(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
java.lang.String ident,
int x,
int y)
Add a gui to the default overlay renderer with an offset
|
static void |
registerGuiOverlay(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
java.lang.String ident,
IStackPositioner positioner)
Add a gui to the default overlay renderer
|
static void |
registerGuiOverlayHandler(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
IOverlayHandler handler,
java.lang.String ident) |
static void |
registerHighlightHandler(IHighlightHandler handler,
ItemInfo.Layout... layout)
Register a new text handler for the block highlight tooltip with a layout specification (HEADER, BODY or FOOTER).
|
static void |
registerHighlightIdentifier(Block block,
IHighlightHandler handler)
Registers a new Infinite Item Handler.
|
static void |
registerModeHandler(INEIModeHandler handler)
Register a mode handler for overriding NEI recipe/utility/cheat mode settings.
|
static void |
registerNEIGuiHandler(INEIGuiHandler handler) |
static void |
registerRecipeHandler(ICraftingHandler handler)
Register a new Crafting Recipe handler;
|
static void |
registerUsageHandler(IUsageHandler handler)
Register a new Usage Recipe handler;
|
static void |
setGuiOffset(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
int x,
int y)
Set the offset to be added to items to translate them into recipe coords on the actual gui, default is 5, 11.
|
static void |
setItemListEntries(Item item,
java.lang.Iterable<ItemStack> items)
Sets the item variants to appear in the item panel, overriding the default search pattern for a given item
|
static void |
setOverrideName(ItemStack item,
java.lang.String name)
Add or replace the name normally shown on the item tooltip
|
public static void registerRecipeHandler(ICraftingHandler handler)
handler - The handler to registerpublic static void registerUsageHandler(IUsageHandler handler)
handler - The handler to registerpublic static void registerGuiOverlay(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
java.lang.String ident)
classz - The class of your guiident - The identification string, currently
{crafting, crafting2x2, smelting, fuel, brewing}public static void registerGuiOverlay(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
java.lang.String ident,
int x,
int y)
classz - The class of your guiident - The identification string, currently
{crafting, crafting2x2, smelting, fuel, brewing}x - x-offsety - y-offsetpublic static void registerGuiOverlay(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
java.lang.String ident,
IStackPositioner positioner)
classz - The class of your guiident - The identification string, currently
{crafting, crafting2x2, smelting, fuel, brewing}positioner - A Stack Repositioner for moving the items to the right placepublic static void registerGuiOverlayHandler(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
IOverlayHandler handler,
java.lang.String ident)
classz - The class of your guihandler - The handler to registerident - The recipe identification stringpublic static void setGuiOffset(java.lang.Class<? extends net.minecraft.client.gui.inventory.GuiContainer> classz,
int x,
int y)
classz - The class of your guix - y - public static void registerNEIGuiHandler(INEIGuiHandler handler)
public static void hideItem(ItemStack item)
public static void setOverrideName(ItemStack item,
java.lang.String name)
public static void addItemListEntry(ItemStack item)
item - an item with datapublic static void setItemListEntries(Item item,
java.lang.Iterable<ItemStack> items)
public static void addKeyBind(java.lang.String ident,
int defaultKey)
ident - An identifier for your key, eg "shoot"defaultKey - The default value, commonly obtained from Keyboardpublic static void addOption(Option option)
public static void addLayoutStyle(int styleID,
LayoutStyle style)
styleID - The Unique ID to be used for storing your style in the config and cycling through avaliable stylesstyle - The style to add.public static void addInfiniteItemHandler(IInfiniteItemHandler handler)
handler - The handler to be registered.public static void registerHighlightIdentifier(Block block,
IHighlightHandler handler)
block - The block to handle, null for all.handler - The handler to be registered.public static void addFastTransferExemptSlot(java.lang.Class<? extends Slot> slotClass)
slotClass - The class of slot to be exemptedpublic static void registerHighlightHandler(IHighlightHandler handler, ItemInfo.Layout... layout)
handler - The handler to be registered.layout - A HUDAugmenterRegistry.Layout entry. HEADER is displayed before BODY which is displayed before FOOTER.public static void registerModeHandler(INEIModeHandler handler)
handler - The handler to be registered.public static void addItemFilter(ItemFilter.ItemFilterProvider filterProvider)
filterProvider - The filter provider to be registered.public static void addSubset(java.lang.String name,
ItemFilter filter)
name - The fully qualified name, Eg Blocks.MobSpawners. NOT case sensitivefilter - A filter for matching items that fit in this subsetpublic static void addSubset(java.lang.String name,
java.lang.Iterable<ItemStack> items)
name - The fully qualified name, Eg Blocks.MobSpawners. NOT case sensitiveitems - An iterable of itemstacks to be added as a subsetpublic static void addSubset(SubsetWidget.SubsetTag tag)
public static void addSearchProvider(SearchField.ISearchProvider provider)
public static void addSortOption(java.lang.String name,
java.util.Comparator<ItemStack> comparator)
name - A unique id for this sort option. Will be used in the config for saving and translated in the options gui. Note that if the translation key name.tip exists, it will be used for a tooltippublic static void addItemVariant(Item item,
ItemStack variant)
item - The item to add the variant forvariant - The stack to appear in the item panel