Repository navigation
Closed
Description
Issue type:
- 🐛 Bug
/// <reference path="../integratedscripting.d.ts" />
/**
*
* @param {import("../../integratedscripting").ValueItemstack} item
* @param {number} level
*/
function filterEnchantLevel(level, item) {
const nbtPath = `["minecraft:enchantments"].levels[?(@ >= ${level})]`;
const levelsNbt = idContext.ops.stringNbtPathMatchFirst(nbtPath, item.nbt());
let levelsList = [];
// I have to do this weird hack to convert it to list
// `idContext.ops.nbtAsIntList` doesn't work here, producing an empty list
// `levelsNbt` can be null at times, without null filtering, it causes errors and massive lags when used to filter loot from mob farm
if (levelsNbt && Array.isArray(levelsNbt)) {
levelsList = [...levelsNbt]
}
return levelsList.length > 0;
}
Short description:
Steps to reproduce the problem:
- Setup the script terminal, connect the function with a variable card, then apply a number to the variable card to get a filter operator
- Use the operator to filter on an item interface connected to a functional storage armoury cabinet filtering large stream of items
- The bug occurs. The average tps doesn't get affected much but there is consistent lag spike every a few second or so.
Expected behaviour:
Versions:
- This mod: integrateddynamics (v1.33.4), cyclopscore (v1.29.2), integratedtunnels (v1.9.4) integratedscripting 1.0.24
- Minecraft: The detected Minecraft version is "1.21.1".
- Mod loader version: The platform is a NeoForge server running version "21.1.247".
- ATM10 7.3
Log file: I kinda don't wanna share the spark profile publicly due to the lack of anonymization, I hope this flamegraph helps:
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
rubensworks commentedon Aug 20, 2026
Thanks for reporting!
rubensworks commentedon Aug 20, 2026
There's not much can do without more information about your setup, problem, or spark log though.
Putting this on hold until there's more information.
hechang27-sprt commentedon Aug 20, 2026
If you can provide an email, or some kind of dedicated upload portal, I will send it to you.
Translate script values back to NBT when an operator expects NBT (#73)
Register one script change listener per script instead of per error (#74