#setMaxStackSize

20 messages · Page 1 of 1 (latest)

red edge
#

hey ive tried to modify the max stack size of a block and im very new to kubejs, and ive written this script in startupscripts

**BlockEvents.modification(event => {
event.modify("kubejs:stumblecargo", Item =>{
Item.setMaxStackSize(1)
})

})**

and it does seem like ive done this completely wrong. as setmaxstacksize doesnt seem to be the right thing for this?

burnt slateBOT
#

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

red edge
charred marten
#

i think you need to set it like a variable

fervent wing
#

seems like it should just be item.maxStackSize(int) or item.maxStackSize = 1

charred marten
#

yeah

#

the second option

fervent wing
#

there doesn't seem to be a setMaxStackSize(int) function in the ItemBuilder

red edge
#

where exactly is the itembuilder may i ask?

#

its a documentation right?

fervent wing
#

i looked at the code myself

#

but there's probably docs

red edge
#

oh yeah this is super useful

#

thank you

#

im seeing if this works

daring etherBOT
#

ProbeJS is an addon mod for KubeJS that generates typings files for VSCode, allowing VSCode to offer autocompletions for a ton of things!

Mod by @exotic leaf

charred marten
#

also lexxie forge docs

#

very useful