ModelMenuHelper

public final class ModelMenuHelper

Shared constants and utility methods used by the admin content menu, admin model list menu, and craftable items menu.

Properties

Link copied to clipboard
public final static int BACK_SLOT
Slot index for the "Back" navigation button (in the nav row).
Link copied to clipboard
public final static Array<int> CONTENT_SLOTS
Inventory slots used for content items (rows 1-5, all 9 columns).
Link copied to clipboard
public final static int ITEMS_PER_PAGE
Number of items displayed per page.
Link copied to clipboard
public final static int NEXT_SLOT
Slot index for the "Next Page" navigation button.
Link copied to clipboard
public final static int PREV_SLOT
Slot index for the "Previous Page" navigation button.

Functions

Link copied to clipboard
public static ItemStack buildArrowRightItem()
Builds a right-pointing arrow skull item (for recipe display, etc.).
Link copied to clipboard
public static ItemStack buildBackItem()
Builds the "Back" button skull item.
Link copied to clipboard
public static ItemStack buildCustomItemDisplayItem(String itemId)
Builds a display item for a custom scriptable item in the admin menu.
Link copied to clipboard
public static ItemStack buildModelItem(FileModelConverter converter, boolean adminMode)
Builds a display ItemStack representing a model in the menu.
Link copied to clipboard
public static ItemStack buildNextPageItem()
Builds a "Next Page" navigation skull item.
Link copied to clipboard
public static ItemStack buildPackItem(FMMPackage pack)
Builds a display ItemStack representing a content pack in the menu.
Link copied to clipboard
public static ItemStack buildPrevPageItem()
Builds a "Previous Page" navigation skull item.
Link copied to clipboard
public static void closeMenus(Map<Inventory, ? extends Object> openMenus)
Link copied to clipboard
public static List<String> getItemsForPack(FMMPackage pack)
Returns all custom item IDs whose source file belongs to the given content pack, sorted alphabetically.
Link copied to clipboard
public static String getMenuModelId(FileModelConverter converter)
Link copied to clipboard
public static List<FileModelConverter> getModelsForPack(FMMPackage pack)
Returns all loaded FileModelConverters whose source file belongs to the given content pack, sorted alphabetically by model ID.
Link copied to clipboard
public static List<String> getScriptsForModel(FileModelConverter converter)
Reads the prepared sibling .yml settings for a model and returns the list of attached script filenames, or an empty list if none.
Link copied to clipboard
public static void initialize()
Pre-generates the MHF skull items.
Link copied to clipboard
public static boolean isMenuModel(FileModelConverter converter)
Link copied to clipboard
public static void openMenu<T>(Player player, Inventory inventory, T menu, Map<Inventory, T> openMenus)
Link copied to clipboard
public static void shutdown()