Interface to access functions exposed by Inventory Tweaks The main @Mod instance of the mod implements this interface, so a refernce to it can be obtained via @Instance("inventorytweaks") or methods in net.minecraftforge.fml.common.Loader All of these functions currently have no effect if ca
| 35 | * All of these functions currently have no effect if called on a dedicated server. |
| 36 | */ |
| 37 | @SuppressWarnings("unused") |
| 38 | public interface InvTweaksAPI { |
| 39 | /** |
| 40 | * Add a listener for ItemTree load events |
| 41 | */ |
| 42 | void addOnLoadListener(IItemTreeListener listener); |
| 43 | |
| 44 | /** |
| 45 | * Remove a listener for ItemTree load events |
| 46 | * |
| 47 | * @return true if the listener was previously added |
| 48 | */ |
| 49 | boolean removeOnLoadListener(IItemTreeListener listener); |
| 50 | |
| 51 | /** |
| 52 | * Toggle sorting shortcut state. |
| 53 | */ |
| 54 | void setSortKeyEnabled(boolean enabled); |
| 55 | |
| 56 | /** |
| 57 | * Toggle sorting shortcut supression. |
| 58 | * Unlike setSortKeyEnabled, this flag is automatically cleared when GUIs are closed. |
| 59 | */ |
| 60 | void setTextboxMode(boolean enabled); |
| 61 | |
| 62 | /** |
| 63 | * Compare two items using the default (non-rule based) algorithm, |
| 64 | * sutable for an implementation of Comparator<ItemStack>. |
| 65 | * |
| 66 | * @param i |
| 67 | * @param j |
| 68 | * @return A value with a sign representing the relative order of the item stacks |
| 69 | */ |
| 70 | int compareItems(@Nonnull ItemStack i, @Nonnull ItemStack j); |
| 71 | |
| 72 | /** |
| 73 | * Initiate a sort as if the player had clicked on a sorting button or pressed the sort key. |
| 74 | */ |
| 75 | void sort(ContainerSection section, SortingMethod method); |
| 76 | } |
nothing calls this directly
no outgoing calls
no test coverage detected