All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Recipe Book Access API

Recipe Book Access API

by Jomlom • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Recipe Book Access Banner

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! Recipe Book Access Demonstration \ 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
26.2
Neoforge
28d ago 1
26.2
Fabric
28d ago 1
26.1.x
Neoforge
28d ago 1
26.1.x
Fabric
28d ago 1
1.21.11
Neoforge
28d ago 1
1.21.11
Fabric
28d ago 1
1.21.x
Neoforge
28d ago 1
1.21.x
Fabric
28d ago 1
1.21.x
Neoforge
28d ago 1
1.21.x
Fabric
28d ago 1
1.21.x
Neoforge
28d ago 1
1.21.x
Fabric
28d ago 1
1.20.1
Neoforge
28d ago 1
1.20.1
Fabric
28d ago 1
26.2
Neoforge
1mo ago 1
26.2
Fabric
1mo ago 1
26.2
Neoforge
1mo ago 1
26.2
Fabric
1mo ago 1
26.1.x
Neoforge
2mo ago 1
26.1.x
Fabric
2mo ago 1
1.21.11
Neoforge
2mo ago 1
1.21.11
Fabric
2mo ago 1
1.21.x
Neoforge
2mo ago 1
1.21.x
Fabric
2mo ago 1
1.21.x
Neoforge
2mo ago 1
1.21.x
Fabric
2mo ago 1
1.21.x
Neoforge
2mo ago 1
1.21.x
Fabric
2mo ago 1
1.20.1
Neoforge
2mo ago 1
1.20.1
Fabric
2mo ago 1
1.21.11
Neoforge
2mo ago 1
1.21.11
Fabric
2mo ago 1
1.21.x
Neoforge
2mo ago 1
1.21.x
Fabric
2mo ago 1
1.21.x
Neoforge
2mo ago 1
1.21.x
Fabric
2mo ago 1
1.21.x
Neoforge
2mo ago 1
1.21.x
Fabric
2mo ago 1
1.21.x
Fabric
4mo ago 1
1.20.1
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
1.21.x
Fabric
last yr. 1
Small crash fix for 26.2
# NeoForge Support!
  • 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

# NeoForge Support!
  • 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
### Support for up to 1.21.11
### 1.20.1 JEI Support Functionality
## JEI Support Functionality
### + Support for 1.21.5
### 1.20.1 Support Released!
Integers 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
Items in crafting grid will also now do their returning to original inventories when screen is closed [TOGGLEABLE]

New default (false) boolean persistentInventory in RecipeBookInventoryProvider interface
### Support for 1.21 and 1.21.1 has been Released!
Added protection against encoding empty stacks.
Initial Release

### Content:
  • Provides the RecipeBookInventoryProvider interface
  • Contains function getInventoriesForAutofill to return the list of inventories to be used

Recipe Book Access API Icon
Download Recipe Book Access API
Select game version
Select platform