All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Accessory API

Accessory API

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

Side note:

Aether for Station API utilizes this mod!

Accessory API

Using Babric in b1.7.3, this mod provides an API to add additional slots for various items similar to the Trinkets API and Baubles API, with styling inspired by b1.7.3's Aether.

Inventory Preview

Developer Usage

To learn about modding b1.7.3 in the babric toolchain, join The Modification Station!
It's very similar to fabric and fabric-api, but for b1.7.3.

Workspace

Add Accessory API to your build.gradle

repositories {
    maven {
        name = "Jitpack"
        url "https://jitpack.io/"
    }
}

dependencies {
    modImplementation('com.github.matthewperiut:accessory-api:0.5.1') {
        transitive false
    }
}

Recommendation

If you want to quickly see how to use this API, clone the repo (in an ide preferably) and navigate to src/test/java/com/matthewperiut/testmod.
Also view API javadocs / documentation

Implementation

Implement "Accessory" inside your item class (with STAPI, will work with any API/mixins)

public class ExampleRing extends TemplateItemBase implements Accessory
{
    public Pendant(Identifier identifier)
    {
        super(identifier);
    }

    // To define trinket slots that your item can go into:
    @Override
    public String[] getAccessoryTypes(ItemInstance item)
    {
        return new String[]{ "ring" };
        // return new String[0]; // returns no slots
        // return new String[]{ "ring", "cape" }; // can be put in multiple types of slots
        // return new String[]{ "all" }; // can be in any accessory slot
    }

    // other methods you can use, use @Override
    // void tickWhileWorn(PlayerBase player, ItemInstance accessory)
    // void onAccessoryAdded(PlayerBase player, ItemInstance accessory)
    // void onAccessoryRemoved(PlayerBase player, ItemInstance accessory)

    // Rendering
    private YourCustomRenderer renderer;
    @Override
    public Optional<AccessoryRenderer> getRenderer()
    {
        return Optional.ofNullable(renderer);
    }
}

You can choose different types of default accessory types:
"pendant"
"cape"
"shield"
"ring"
"gloves"
"misc"
"all"
or use your own custom accessory type

Accessory Functions Explained

This is called when an accessory slot is clicked on with an item, the item is passed to the function.
This provides the slot information to see if it is compatible with it.
String[] getAccessoryTypes(ItemInstance item)

This is called in the tick function of the associated player, passing the item that is being ticked on which player.
void tickWhileWorn(PlayerBase player, ItemInstance item)

This is called when the inventory relating to the accessory has an item added/removed.
The function provides what player added/removed an accessory as well as the item that was added/removed.
void onAccessoryAdded(PlayerBase player, ItemInstance accessory)
void onAccessoryRemoved(PlayerBase player, ItemInstance accessory)

Provide rendering functions with getRenderer:
public AccessoryRenderer getRenderer()

Creating Accessory Renderer

example:

public class CustomRenderer implements AccessoryRenderer {
    void renderThirdPerson(PlayerBase player, PlayerRenderer renderer, ItemInstance itemInstance, double x, double y, double z, float h, float v)
    {
        // do entity rendering magic
    }

   void renderFirstPerson(PlayerBase player, PlayerRenderer renderer, ItemInstance itemInstance)
   {
       // do entity first person rendering magic
   }
}

Similar usage as EntityRenderers

Built-in AccessoryRenderers:
CapeRenderer
GloveRenderer
NecklaceRenderer
ConfigurableRenderer

How to Install Accessory API (Mod)

Accessory API by Slainlight is verified for Babric, Fabric, Ornithe across Minecraft versions b1.7.3 (latest release: 0.9.1+mcb1.7.3+babric, file size: 78 KB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (b1.7.3) and platform (Babric, Fabric, Ornithe).
  2. Make sure you have the compatible loader or environment installed for Babric, Fabric, Ornithe.
  3. Move the downloaded Accessory API file into your Minecraft .minecraft/mods folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
b1.7.3
Babric
5mo ago 1
b1.7.3
Ornithe
5mo ago 1
b1.7.3
Babric Fabric
5mo ago 1
b1.7.3
Babric Fabric
5mo ago 1
b1.7.3
Babric Fabric
5mo ago 1
b1.7.3
Babric Fabric
5mo ago 1
b1.7.3
Babric Fabric
5mo ago 1
b1.7.3
Babric Fabric
last yr. 1
b1.7.3
Babric
last yr. 1
b1.7.3
Babric
last yr. 1
b1.7.3
Babric
last yr. 1
b1.7.3
Babric
last yr. 1
b1.7.3
Babric
last yr. 1
b1.7.3
Babric
last yr. 1
b1.7.3
Babric
last yr. 1
b1.7.3
Babric
last yr. 1
b1.7.3
Babric
last yr. 1
b1.7.3
Babric
last yr. 1
add back hearts command
improve publishing
add back hearts command
improve publishing
Fix data storage format and unitweaks compat
[0.8.4] 0.8.4 by Slainlight on Jun 06, 2026
Download
Improve asset paths
[0.8.3] 0.8.3 by Slainlight on Jun 02, 2026
Download
Fix server crash on latest stapi
[0.8.2] 0.8.2 by Slainlight on Jun 02, 2026
Download
java 17 bc dany
[0.8.1] 0.8.1 by Slainlight on Jun 02, 2026
Download
revert ornithe keep improvements
[0.6.3] [b1.7.3] 0.6.3 by Slainlight on May 18, 2024
Download
Remove GUI changes when no slots have been added
[0.6.2] [b1.7.3] 0.6.2 by Slainlight on Apr 07, 2024
Download
Fix crash w/o SPC-Babric
[0.6.1] [b1.7.3] 0.6.1 by Slainlight on Mar 31, 2024
Download
Fix spamming console
[0.5.5] [b1.7.3] 0.5.5 by Slainlight on Nov 04, 2023
Download
  • Allow less than vanilla number of hearts
  • Create Hearts command for SPC
  • Number of hearts now works on multiplayer
[0.5.2] [b1.7.3] 0.5.2 by Slainlight on Nov 02, 2023
Download
Implementation of Extra HP
[0.5.1] [b1.7.3] 0.5.1 by Slainlight on Oct 18, 2023
Download
Initial Release
Accessory API Icon
Download Accessory API
Select game version
Select platform