Mod

Equipment API

Quick rating

Equipment API

No reviews yet

An API that allows mods to register their own equipment slots

Mod Loaders
Forge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
0.1.1
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

An API that allows mods to add their own equipment slots, based on baubles, but allowing mods to register dedicated slots for special items.

Press the R key or click the pickaxe in the corner of the player inventory screen to open the equipment screen.

The equipment screen will show all the registered slots. If there are more than 8 you can click the arrow buttons to go to other pages.

- All the slots here are only for demonstration purposes, they aren't included in the mod.

How to use the API:

The API is very simple, it mostly consists of registering an EquipmentType, which handles what can be placed in a slot, the appearance of that slot, and what happens when that slot changes.

Registering a basic slot:

EquipmentApi.registerEquipment(YOUR_EQUIPMENT_ID, new EquipmentType() {
	
	ResourceLocation overlay = new ResourceLocation(YOURMODID, "textures/YOUR_SLOT_OVERLAY.png");
	
	@Override
	/* The texture to overlay on the slot (displays below the item) */
	public ResourceLocation getSlotOverlay(ItemStack stack) {
		return overlay;
		// you may also want to do `return stack == null ? null : overlay;`
		// this will make the background image disappear when you place an item in the slot
	}
	
	@Override
	/* Whether the player can take the supplied stack out of the slot */
	public boolean canRemoveStack(ItemStack stack, EntityPlayer player) {
		return true;
	}
	
	@Override
	/* Whether the player can place the supplied stack in the slot */
	public boolean canPlaceStack(ItemStack stack) {
		return stack != null && stack.getItem() != null && stack.getItem() == Items.arrow;
	}
	
	@Override
	/* The maximum stack size of this slot */
	public int getStackLimit() {
		return 64;
	}

	@Override
	/* The text description to show on hover, "\n" will work */
	public String getSlotDescription(EntityPlayer player) {
		return "Arrows";
	}
	
	@Override
	/* This is called whenever the slot is changed */
	public void onChange(ItemStack from, ItemStack to,
			EntityPlayer player) {
		
	}
});

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~2,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched and imported data for this project from CurseForge or Modrinth. High-traffic and active projects are checked more often.
Next pipeline sync