About Custom Items

Let's talk about some limitations and problems with it.

Custom items are quite an elaborate feature in TailsLib since it was the very first one and the project was created for its sake.

Limitations

Item system problem

For example, because of the item system, each item is essentially the same and each item accesses an instance of its class where the logic is defined.

This trivially means that it will be almost impossible to split up and make 40 versions of an item in one class. But there is a workaround via the item id which can be constantly checked, but remember that for this you may need to make your own system which will be compatible with the TailsLib item system.

Why am i just not make an instance for every item? I'm afraid that could make perfromance issues. The problem here that item is used everywhere by player but are not. Every instance require some amount of RAM of your server, yes it small amount but when on your server playing like 100 players the might use 200 custom items and here we got a problem. 200 instances of custom item may require 1-2GB of server RAM and thats why we have 1 instance for every item. But you can use UUID option for items to make it more cool and customizable (also NamespacedKey system of BukkitAPI).

By default UUID are disabled for your item.

Enable it with .withUUID() function in CustomItemData

You can also use CustomItemProperty system for customizing your items.

Recipes

Recipes are my own personal headache.

When I made saves for blocks it was much easier than figuring out why I can't get a particular item from crafting. I can only get the type of item with no nbt tags.

Last updated