MCPcopy Index your code
hub / github.com/ForestryMC/ForestryMC / InvTweaksAPI

Interface InvTweaksAPI

src/api/java/invtweaks/api/InvTweaksAPI.java:36–75  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

34 * All of these functions currently have no effect if called on a dedicated server.
35 */
36@SuppressWarnings("unused")
37public interface InvTweaksAPI {
38 /**
39 * Add a listener for ItemTree load events
40 */
41 void addOnLoadListener(IItemTreeListener listener);
42
43 /**
44 * Remove a listener for ItemTree load events
45 *
46 * @return true if the listener was previously added
47 */
48 boolean removeOnLoadListener(IItemTreeListener listener);
49
50 /**
51 * Toggle sorting shortcut state.
52 */
53 void setSortKeyEnabled(boolean enabled);
54
55 /**
56 * Toggle sorting shortcut supression.
57 * Unlike setSortKeyEnabled, this flag is automatically cleared when GUIs are closed.
58 */
59 void setTextboxMode(boolean enabled);
60
61 /**
62 * Compare two items using the default (non-rule based) algorithm,
63 * sutable for an implementation of Comparator<ItemStack>.
64 *
65 * @param i
66 * @param j
67 * @return A value with a sign representing the relative order of the item stacks
68 */
69 int compareItems(ItemStack i, ItemStack j);
70
71 /**
72 * Initiate a sort as if the player had clicked on a sorting button or pressed the sort key.
73 */
74 void sort(ContainerSection section, SortingMethod method);
75}

Callers 8

workCycleMethod · 0.80
updateMethod · 0.80
parseRarityMethod · 0.80
parseCooconLootMethod · 0.80
isCraftingEquivalentMethod · 0.80
checkChangedMethod · 0.80
handleBackpackConfigMethod · 0.80
loadConfigMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected