Skip to content

SNBT outputs booleans as 0b and 1b instead of false and true #792

@ProbsJustLuck

Description

@ProbsJustLuck

When type specific flags or entity flags are set (in predicates), attempting to inline the JSON will convert all of the "true" and "false" flags into "1" and "0" respectively. I'm unsure if this is intentional behavior, though it should probably stay as true/false
If the JSON is turned back into multiline, it is converted back into true/false as it originally was.

However, if the JSON is inlined and you put the text box into focus, then attempting to put it back into multiline will instead keep all the "1" and "0" values, showing errors on the website
To replicate, use this predicate:

{
  "condition": "minecraft:entity_properties",
  "entity": "this",
  "predicate": {
    "type_specific": {
      "type": "minecraft:player",
      "stats": [],
      "input": {
        "forward": true,
        "backward": true,
        "left": true,
        "right": true,
        "jump": true,
        "sneak": true,
        "sprint": true
      }
    },
    "flags": {
      "is_on_ground": true
    }
  }
}
2025-08-19.15-20-01.-.Trim.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions