Store
object Store
A simple global key→value store for script state (numbers, booleans, strings).
Use it instead of many module-level lets when callbacks need to share mutable state: the swc4j bytecode compiler boxes each reassigned captured variable and miscomputes the stack when a single callback captures many of them (→ VerifyError). Reading/writing through Store keeps callbacks capture-free, sidestepping that limit. Keys are arbitrary strings.
Store.setNum("size", 2);
Jim.register(Event.RENDER_ENTITY, (e: EntityWrapper) => Tessellator.scale(Store.getNum("size", 1), 1, 1));Content copied to clipboard