💎Custom Items

Compatibility notes

The custom item feature is a major change to the plugin that introduces the support of custom items from 3rd plugins. Please read this page carefully to minimize your loss of data and avoid other unexpected issues.

The plugin is currently using a super minimal approach to identify, store and obtain item. A type of ore is basically a material name, and an ore (item) is a pair of material name and amount. The advantage is that it is fast to identify and perform calculations, simple to implement internally and minimal for data storage. However, the disadvantage is that it cannot work with item meta. For a long time, the plugin has prevented the use of non-raw items such as one that already having name or lore.

Luckily, it is possible to expand the mechanism the plugin is using for integrating custom items from 3rd plugins. For custom item plugins such as ItemsAdder, Oraxen, etc they are using the same approach that is having each custom item their own IDs. For any item in the server, they are identified, compared and obtained using IDs.

For the Custom Item support, the plugin maintains 100% backward compatibility to existing configuration and data. How does that work? Well, the plugin introduces a new prefix to every ore name and material name, called classifier. The classifier for ItemsAdder is ia, for Oraxen is ox and for vanilla is empty. Since the prefix of vanilla items is empty, it guarantees fully compatibility to the existing data without any upgrade.

However, there are breaking changes to the API. If you are a developer or an owner whose server use any OreProcessor addon, please be prepared for the update. I will try to maintain two versions of the plugin in short-term.

Features

  • Support Oraxen and ItemsAdder

  • Add item classifier

    • ia for ItemsAdder

    • ox for Oraxen

  • Support custom item in GUI

  • Support custom item in configuration

Usage

To add custom item, it is super simple, just prefix your item name with a classifier

coal # no classifer -> vanilla item whose material name is COAL
ox:custom_coal # ox classifier -> Oraxen item, with id is custom_coal
ia:mypack:coal # ia classifier -> ItemsAdder, with namespace and id is mypack:coal

Noticed that:

  • Vanilla material names are case-insensitive. For custom items, it depends on the 3rd plugin you are using. Reach to its documentation for further information

  • Some plugins might have namespace besides the ID. In the example above, the ItemsAdder item has namespace is mypack, the item ID is coal. To be used in OreProcessor, both the namespace and the ID must have a classifier ia

For example, this is how you allow the item in the coal storage.

# filter.yml
storage:
  coal: [coal, coal_ore, deepslate_coal_ore, coal_block, ia:mypack:coal]

To view the list of all items including the custom ones, you might use any command that having item parameter such as /ore add

Not-yet-implemented features

It is currently impossible to mine a custom block.

API breaking changes

See API

Last updated