Hi I would like to add a custom item with KubeJS & LootJs which is a loottable with a pool of items that have x% chance of coming out when you right click with the new item.
The result should automatically appear in the player's inventory and, if possible, a message in the chat or as a small display of what you have gotten.
The custom item should also disappear after use or the stack should count down if you have several of them.
Is this even possible or do you need a block for this?
The item to be used already exists, just no texture for it yet.
If so, maybe someone could help me.
E.g. You have item x, which you use by right-clicking and then item d and c are added to the inventory (if space is available, if not dropped), then the chat message or a small fade-in appears and item x disappears or is counted down.
StartupEvents.registry('item', event => {
event.create("essence")
.displayName("Essence");
});
This is code for the item register event.