#Item list with a common characteristic
20 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
You can get all items with Ingredient.all.stacks and then you can Loop over it and get the burn time for Each Item.
Ok, I'll try.
PlayerEvents.loggedIn(event => {
Ingredient.all.stacks.forEach(item => {
if(Item.of(item).getBurnTime == 150) {
console.log(item)
}
})
})
It doesn't work...
??neversay
Never say 'it crashed', 'it errored', or 'it didn't work' without providing the full error message/crash report/log files!
Ok, I'll try.
If I use getBurnTime(), kubejs say.
[14:07:34] [ERROR] ! #93: Error occurred while handling event 'PlayerEvents.loggedIn': Can't find method net.minecraftforge.common.extensions.IForgeItemStack.getBurnTime(). (server_scripts:itemstage.js#93)
And the second one is not auto-completed by probejs
If I use burnTime there aren't errors, but kubejs "write" nothing in console...
const $RecipeType = Java.loadClass('net.minecraft.world.item.crafting.RecipeType')
const smelting = $RecipeType.SMELTING
Ingredient.all.stacks.forEach(i => {
if(i.getBurnTime(smelting) == 150) console.log(i)
})
Ok, thanks.
Ingredient.all.stacks.forEach(item => {
if(item.getBurnTime(smelting) == 150) console.log(item)
})```

It doesn't print...