Skip to content

[BUG] Using an array of objects with hud_render throws 'Incorrect type, expected object.' #59

@selenivee

Description

@selenivee

Describe the bug
Using an array of objects inside a hud_render throws an error in VSCode, works perfectly fine in game. Using 1.20.2, fabric 0.16.10

To Reproduce
Use an array of objects in the hud_render section of any power that supports it.

Expected behavior
No problem being marked.

My code and screenshots

"selector": {
      "type": "origins:resource",
      "min": 1,
      "max": 7,
      "hud_render": {
         "should_render": false
      }
   },
   "hudselector": {
      "type": "origins:resource",
      "min": 0,
      "max": 1,
      "min_action": {
         "type": "origins:change_resource",
         "change": 1,
         "operation": "set",
         "resource": "selenivee:spellcaster/spellswap_hudselector"
      },
      "hud_render": [
         {
            "should_render": true,
            "condition": {
               "type": "origins:resource",
               "resource": "selenivee:spellcaster/spellswap_selector",
               "comparison": "==",
               "compare_to": 1
            },
            "sprite_location": "selenivee:textures/gui/sprites/selector.png",
            "bar_index": 0,
            "order": 1
         }
      ]
   }

Image

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions