#Checking curios slots / give items to curios slot

5 messages · Page 1 of 1 (latest)

queen stratus
#

Hello there.
Is there a way to check if something is in a curios slot ?
And how can we place items in the curios slot ?

I found no documentations on how to use curios with KubeJS, so I don't even know if it is possible
Thanks for your help

vital emberBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

queen stratus
#

bump? anyone?

indigo narwhal
#

I learned it from elsewhere

/**
 * Check if the player has a certain item
 * @param {Internal.ServerPlayer} player
 * @param {Internal.ItemStack_} itemStack
 */
const $CuriosApi = Java.loadClass('top.theillusivec4.curios.api.CuriosApi');
function hasCurios(player, itemStack) {
    let curiosInventory = $CuriosApi.getCuriosInventory(player).resolve().get();

    return curiosInventory.equippedCurios.allItems.some((item) => item == itemStack);
}
queen stratus
#

It works ! thanks !