-
Notifications
You must be signed in to change notification settings - Fork 160
MineTweaker API
Storage Drawers exports several MineTweaker APIs for fine-grained control over ore dictionary and compacting support. Please become familiar with MineTweaker if it is new to you.
By default, Storage Drawers performs ore dictionary unification on compatible items on insertion. There are complicated heuristics in place to automatically block conversions that could be considered exploitative or destructive. It's not perfect though, so you may manually block specific ore dictionary keys from unifying items. This is the purpose of the blacklist.
mods.storagedrawers.OreDictionaryBlacklist.add("oreDictName");
Adds a single ore dictionary key to the blacklist. Blacklisted keys will be ignored when comparing items for equivalence, but items could still be unified if they have other matching keys.
mods.storagedrawers.OreDictionaryBlacklist.addPrefix("prefix");
Adds a pattern to the ore dictionary blacklist. Any ore dictionary key which starts with the prefix string will be considered part of the blacklist.
The heuristics used to prevent exploitative conversions are very strict, and may block conversions that players and authors would consider allowable. The whitelist allows these keys to still be used for conversion. The whitelist takes priority over the blacklist.
mods.storagedrawers.OreDictionaryWhitelist.add("oreDictName");
Adds a single ore dictionary key to the whitelist. Whitelisted keys will always be considered when comparing items for equivalence.
The compacting drawer uses your recipe table and ore dictionary table to automatically compact items that have 2x2 or 3x3 recipes, and can be converted back again in the same amount. Examples are metal blocks/ingots/nuggets, redstone blocks/dust, etc. If the required recipes are absent, new compacting relationships can be manually defined. Storage Drawers internally adds a few manual relationships, such as turnings bricks into brick blocks and back again.
mods.storagedrawers.Compaction.add(<itemUpper>, <itemLower>, conversion);
Adds a new compacting relationship between the upper item (denser, more compacted) and lower item (less compacted). The conversion argument is an integer specifying how many lower items are needed to equal one upper item. Normal values would be 4 or 9, but others can be used. Relationships added here take precedence over anything found in the recipe tables. Adding a new relationship will also replace a previously defined one for the given items, if it exists.
mods.storagedrawers.Compaction.add(<minecraft:clay>, <minecraft:clay_ball>, 4);
Convert between clay and clay blocks.
mods.storagedrawers.Compaction.add(<minecraft:stone>, <minecraft:stonebrick>, 1);
mods.storagedrawers.Compaction.add(<minecraft:stonebrick>, <minecraft:stonebrick:3>, 1);
Convert freely between bricks, stone bricks, and chiseled stone bricks.