Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-229018

In predicate condition "value_check" having no score counts as having score 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17, 1.19.3
    • Community Consensus
    • (Unassigned)

      When testing with the "value_check" predicate for the condition of score 0, it also includes every entity having no score. This doesn't happen if the predicate "entity_scores" or the command "execute if score ... matches 0" is used.

      How to reproduce:

      /scoreboard objectives add testsb dummy
      

      Using the following predicate (value_check.json):

      {    
        "condition""minecraft:value_check",    
        "value": {        
          "type""minecraft:score",        
          "target""this",       
           "score""testsb"    
        },    
        "range": 0
      }
      

      This works as expected: => Test failed

      /execute if score @s reddi.vm matches 0
      

      This is faulty: => Test passed

      /execute if predicate testns:value_check
      

      This is also faulty for non entity scores (noscorepred.json):

      {
        "condition": "minecraft:value_check",
        "value": {
          "type": "minecraft:score",
          "target": {
            "type": "minecraft:fixed",
            "name": "noscore"
          },
          "score": "testsb"
        },
        "range": 0
      }
      

      This is faulty: => Test passed

      /execute if predicate testns:noscorepred
      

      And in comparison (entity_scores.json):

      {
        "condition": "minecraft:entity_scores",
        "entity": "this",
        "scores": {
          "testsb": 0
        }
      }
      

      This works again as expected: => Test failed

      /execute if predicate testns:entity_scores
      

            Unassigned Unassigned
            reddi reddi
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: