Override item stack size with stack.override_count()
Posted: Sat Oct 12, 2024 11:37 pm
I would like to be able to override the stack size of an item using scripting. Stacks over a normal stack size is already a "feature", in how updating mods/versions can decrease a stack size, but already existing stacks are unaffected. It would be useful and convenient to open this feature to scripting.
Currently, LuaItemStack.count() sets the item stack amount equal to the amount parameter or the item stack size, whichever is lower. Therefore, it is impossible to obtain "overstacked" stacks, even through scripting.
I would like LuaItemStack.count() to accept a "override_stack_size" parameter, or a new method along the lines of LuaItemStack.override_count() that does not check if the input count is greater than the item stack size.
example of normal item stack next to overstacked item stack
Currently, LuaItemStack.count() sets the item stack amount equal to the amount parameter or the item stack size, whichever is lower. Therefore, it is impossible to obtain "overstacked" stacks, even through scripting.
I would like LuaItemStack.count() to accept a "override_stack_size" parameter, or a new method along the lines of LuaItemStack.override_count() that does not check if the input count is greater than the item stack size.
example of normal item stack next to overstacked item stack