Skip to content

Blockception throws "Invalid arguments" when using valid Molang c.other expression in item JSON #23

@CookieCzkBr

Description

@CookieCzkBr

Describe the bug

Blockception throws an internal error (Invalid arguments) while processing diagnostics when a valid Molang expression uses c.other inside an item JSON file.
The addon works normally in Minecraft Bedrock, but the Blockception diagnostic queue fails internally.

This appears to be a false positive caused by Blockception attempting to statically evaluate a runtime-only Molang context.

To Reproduce

Steps to reproduce the behavior:

Open VS Code with the Blockception extension enabled.

Open a Minecraft Bedrock addon workspace containing a BP and RP.

Open the file BP/items/wooden_crook.json.

Add a Molang expression using c.other-> (for example in repair_amount).

Let Blockception run diagnostics automatically.

Check the Blockception output logs.

See the error Processing diagnostic queue failed. Error: Invalid arguments.

Expected behavior

Blockception should not throw an internal error when encountering valid Molang expressions that rely on runtime-only contexts such as c.other.
At minimum, the expression should be ignored or flagged as unsupported, instead of breaking the diagnostic queue.

Screenshots

Not applicable.
Log output provided as text.

Desktop

OS: Windows 11 (Windows_NT x64 10.0.26200)

Editor: Visual Studio Code

VS Code Version: 1.108.2 (user setup)

Blockception Version: 9.0.9

Electron: 39.2.7

Chromium: 142.0.7444.235

Node.js: 22.21.1

V8: 14.2.231.21-electron.0

Smartphone

Not applicable.

Additional context

The Molang expression below is valid and works correctly in Minecraft Bedrock, but consistently triggers the Blockception internal error when diagnostics are enabled:

"repair_amount": "math.min(q.remaining_durability + c.other->q.remaining_durability + math.floor(q.max_durability / 20), c.other->q.max_durability)"

The issue seems related to Blockception attempting to statically evaluate Molang expressions that depend on runtime-only contexts (c.other), resulting in an internal exception.
This does not break the addon in-game and appears to be a false positive in the language server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions