
Recipe Book Access is a simple API designed to intuitively add support for external inventory access in any crafting screen. \ It redirects the recipe book functionality to check and fill from a customisable list of inventories, instead of just the player's.
What does this mean?
See for yourself!
\
This is an EXAMPLE of a modded crafting table uses a custom list of inventories via this API, in this specific case it uses all inventories from nearby chests.
This mod alone will not achieve what is shown above - If you are looking for a mod that implements this for the crafting table, you probably want the Nearby Crafting mod.
Quickstart Guide
For a more detailed how-to-use guide, including how to setup this API in your project's environment, please see the readme on Github for this project here.
This API provides a simple interface called RecipeBookInventoryProvider, located in com.jomlom.recipebookaccess.api.
This interface must be implemented to your screen handler class, only one method needs overriding (getInventoriesForAutofill()) for the API's functionality. Two other methods are also available for more control.
You must implement getInventoriesForAutofill() to return a list of containers which you want the recipe book to access and craft from, this won't include the player's inventory by default.
Code Example:
import com.jomlom.recipebookaccess.api.RecipeBookInventoryProvider
public class YourCraftingMenu extends AbstractCraftingMenu implements RecipeBookInventoryProvider {
// your existing code...
@Override
public List<Container> getInventoriesForAutofill() {
return yourContainersList;
}
}
Assumptions made by this API:
- Your screen handler class extends 'AbstractCraftingMenu', or any of its subclasses
- Your corresponding screen extends a recipe book screen, in order to utilize the minecraft recipe book
(I have not tested outside these assumptions)
FAQs
-
Q: I think I found an issue... \ A: Feel free to create an issue on Github or reach out directly by email
contact@jontyali.com. -
Q: Will you release support for x ? \ A: Whenever I have time and feel like it, I make sure this mod comes to support the latest versions, but sometimes I get busy! Again, feel free to reach out with reqeusts to support certain versions or other mods.
-
Q: Does my
getInventoriesForAutofill()implementation need to work from the client? \ A: Nope!getInventoriesForAutofill()is only used from the server side screen handler, and the API will keep the client up to date on the results for you automatically!
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 28d ago | 1 | ||||
| 1mo ago | 1 | ||||
| 1mo ago | 1 | ||||
| 1mo ago | 1 | ||||
| 1mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 2mo ago | 1 | ||||
| 4mo ago | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 |
- Fixed items returning to the wrong place when switching recipes mid-fill
- Fixed items returning to the wrong place when a crafting grid's slot had items from multiple containers
- JEI's transfer button now actually works
- Fixed items returning to the wrong place when switching recipes mid-fill
- Fixed items returning to the wrong place when a crafting grid's slot had items from multiple containers
- JEI's transfer button now actually works
- Fixed items returning to the wrong place when switching recipes mid-fill
- Fixed items returning to the wrong place when a crafting grid's slot had items from multiple containers
- Fixed items returning to the wrong place when switching recipes mid-fill
- Fixed items returning to the wrong place when a crafting grid's slot had items from multiple containers
- JEI's transfer button now actually works
inputSlotsStartIndex and inputSlotsEndIndex added to RecipeBookInventoryProvider interface (defaulted to 1 and 10)Needed for pre 1.21.2 implementations to use new v1.0.2 features correctly
New default (
false) boolean persistentInventory in RecipeBookInventoryProvider interface### Content:
- Provides the
RecipeBookInventoryProviderinterface - Contains function
getInventoriesForAutofillto return the list of inventories to be used