JustEnoughItems (JEI)

repository·26.2·Indexed 21 days ago

https://github.com/mezz/justenoughitems

A high-performance Minecraft mod for browsing items and recipes. It provides a developer API for registering custom items and recipes, implementing Recipe Transfer Handlers (Basic, Universal, and custom IRecipeTransferHandler), extending recipe categories, and accessing runtime features like GUI control and filter text.

Tokens
1.3K
Snippets
0
Records
10
Agent score
76%

What's inside JustEnoughItems

  1. Overview of JustEnoughItems (JEI)

    26.2

    JustEnoughItems (JEI) is a Minecraft mod designed for viewing items and recipes. It focuses on stability, performance, and ease of use. Key characteristics include:

    • Minimalist focus: Provides only items and recipes.
    • Developer-friendly: Offers a clean API for mod developers to integrate with.
    • Lightweight: It is not a coremod and has no dependencies other than Forge (or the relevant loader like Fabric/NeoForge).

    For detailed technical implementation details, developers should refer to the JEI Developer Wiki.

  2. Access JEI runtime features via the Runtime API

    26.2

    The mezz.jei.api.runtime package provides access to JEI's runtime-specific features. This API allows developers to interact with the user interface elements that appear during gameplay, such as the JEI GUIs.

    Key capabilities include:

    • Controlling the JEI filter text.
    • Opening the recipe GUI.
    • Retrieving items currently displayed in JEI that are positioned under the user's mouse cursor.
  3. Use Universal Handlers for multi-category recipe systems

    26.2

    A Universal Handler is used when a single handler needs to support every category of recipe rather than being restricted to one. This is the preferred approach for:

    • Mods with recipe pattern encoding.
    • Automated recipe systems (e.g., Applied Energistics pattern encoding), where any recipe can be encoded easily through a single interface.
  4. Extend recipe categories using Recipe Category Extensions

    26.2

    Recipe Category Extensions is an opt-in feature that allows plugins to extend existing recipe categories. This is useful when you want other plugins to add or modify recipes within your defined categories.

    By default, the vanilla crafting recipe category is already compatible with this system. To extend the vanilla crafting category, implement the IModPlugin.registerVanillaCategoryExtensions method in your plugin.

  5. How Recipe Transfer Handlers work in JEI

    26.2

    Recipe Transfer Handlers enable the [+] button functionality in JEI. When a player clicks this button on a recipe, JEI moves the required items from the player's inventory directly into the target crafting area or machine slots.

    JEI provides three levels of implementation complexity depending on the requirements of the machine or process being supported:

  6. Implement custom IRecipeTransferHandler for complex machines

    26.2

    If your machine requires more than basic slot definitions—such as using ghost slots for crafting or interacting with a massive backend storage system—you must implement the IRecipeTransferHandler interface and register it manually.

    Important Implementation Details:

    • Networking: Because JEI is a client-side mod, you are responsible for sending your own packets to the server to trigger the transfer.
    • Safety: You must handle the logic to ensure items are transferred correctly without being deleted or duplicated.
    • Helpers: Use IRecipeTransferHandlerHelper to assist with the implementation details.
  7. Available Maven repositories for JEI

    26.2

    JEI is distributed via Maven repositories for various Minecraft versions and loaders (Forge, Fabric, NeoForge). You can find the metadata for specific versions at the following locations:

    Latest Versions

    • 26.2:
      • NeoForge: https://maven.blamejared.com/mezz/jei/jei-26.2-neoforge/maven-metadata.xml
      • Fabric: https://maven.blamejared.com/mezz/jei/jei-26.2-fabric/maven-metadata.xml
    • 26.1.2:
      • NeoForge: https://maven.blamejared.com/mezz/jei/jei-26.1.2-neoforge/maven-metadata.xml
      • Fabric: https://maven.blamejared.com/mezz/jei/jei-26.1.2-fabric/maven-metadata.xml
    • 1.21.11:
      • NeoForge: https://maven.blamejared.com/mezz/jei/jei-1.21.11-neoforge/maven-metadata.xml
      • Fabric: https://maven.blamejared.com/mezz/jei/jei-1.21.11-fabric/maven-metadata.xml

    Supported Versions

    Metadata is available for several major Minecraft versions including:

    • 1.21.1 (NeoForge, Fabric, Forge)
    • 1.20.1 (Fabric, Forge)
    • 1.21 (NeoForge, Fabric, Forge)
    • 1.19.2 (Fabric, Forge)
    • 1.18.2 (Fabric, Forge)
    • 1.16.5 (Forge)
    • 1.12.2 (Forge)

    Note: For versions available on Maven that are no longer receiving updates, see UNSUPPORTED_VERSIONS.md.

  8. Identify unsupported JustEnoughItems (JEI) versions

    26.2

    The following Minecraft versions are available on Maven but are not receiving updates. Use these versions only if your environment specifically requires them and you accept the lack of maintenance.

    Available Unsupported Versions by Minecraft Version:

    • 1.21.x: 1.21.10, 1.21.9, 1.21.8, 1.21.7, 1.21.5, 1.21.4
    • 1.20.x: 1.20.6, 1.20.4, 1.20.2, 1.20
    • 1.19.x: 1.19.4, 1.19.3, 1.19.1, 1.19
    • 1.18.x: 1.18.1, 1.18
    • 1.17.x: 1.17.1
    • 1.16.x: 1.16.4, 1.16.3, 1.16.2, 1.16.1
    • 1.15.x: 1.15.2, 1.15.1
    • 1.14.x: 1.14.4, 1.14.3, 1.14.2
    • 1.13.x: 1.13.2, 1.13
    • 1.12.x: 1.12.1

    Note that for many versions, multiple loaders (NeoForge, Fabric, or Forge) are available via their respective Maven metadata URLs.