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

Mejorar la syntaxis ntb

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Invalid
    • Affects Version/s: 1.16.4
    • Fix Version/s: None
    • Environment:
      Java 1.8 on Windows 10
    • Confirmation Status:
      Unconfirmed
    • Game Mode:
      Creative
    • Category:
      (Unassigned)

      Description

      It is an improvement, but the page does not allow to create the correct type of request

      it's about implementing the operators ( ==, !=, >, >=, <, <= ) to the label 'nbt'

      Here is an example of a code that could clarify quite well what I mean:

      CaseN° / Command Example:
      1.) data get entity @p {Inventory:[

      {id:"minecraft:diamond",Count:==24b}

      ]}
      2.) data get entity @p {Inventory:[

      {id:"minecraft:diamond",Count:!=24b}

      ]}
      3.) data get entity @p {Inventory:[

      {id:"minecraft:diamond",Count:>24b}

      ]}
      4.) data get entity @p {Inventory:[

      {id:"minecraft:diamond",Count:>=24b}

      ]}
      5.) data get entity @p {Inventory:[

      {id:"minecraft:diamond",Count:<24b}

      ]}
      6.) data get entity @p {Inventory:[

      {id:"minecraft:diamond",Count:<=24b}

      ]}

      Expected behaviour:
      1..6 Cases: Return True if the operation is correct!

      Actual behaviour:
      CaseN° 1.) data get entity @p {Inventory:[

      {id:"minecraft:diamond",Count:24b}

      ]}
      Return True if you have a stack of 24 diamond exactly, if you have more or less then Return False

      This can also be applied to other cases, for example:

      Expected behaviour:
      clear @p diamond ==24 << remove exactly 24 item, no more/no less!!

      Actual behaviour:
      clear @p diamond 24 << remove 24 diamonds or less if you have less!!
       
      I'm not sure if this can already be done, but I have searched everywhere without any results, apparently there is no way to handle operators in the commands, if they include this, it would give us much more freedom and we would not depend on external extensions to achieve amazing things without too much effort and efficiently.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            MillhioreBT Alx Olivencia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: