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

/entitydata does not apply modified NBT data

XMLWordPrintable

    • Confirmed

      The bug

      It looks like the /entitydata command does not apply the modified NBT data to the entity.

      If the way NBT is written and read did not change then in the following the entity (xk2) is not reading the modified NBT data (eq3).

      nc.java (17w45a)
      private static int a(bk bk2, Collection<? extends xk> collection, eq eq2) throws CommandSyntaxException {
          int n2 = 0;
          int n3 = 0;
          int n4 = 0;
          for (xk xk2 : collection) {
              if (xk2 instanceof agh) {
                  ++n3;
                  continue;
              }
              eq eq3 = xk2.e(new eq());
              eq eq4 = eq3.h();
              eq3.a(eq2);
              if (eq3.equals(eq4)) {
                  ++n4;
                  continue;
              }
              // Here xk2 should read the modified NBT data
              ++n2;
              bk2.a(new gg("commands.entitydata.success", xk2.e(), eq3.c()), true);
          }
          if (n2 == 0) {
              if (n3 > 0) {
                  throw a.create();
              }
              if (n4 > 0) {
                  throw b.create();
              }
          }
          return n2;
      }
      

      How to reproduce

      1. Summon for example a glowing armor stand
        /summon armor_stand ~ ~ ~ {Glowing:1b}
        
      2. Try to stop the glowing
        /entitydata @e[type=armor_stand,limit=1] {Glowing:0b}
        

            dinnerbone [Mojang] Nathan Adams
            marcono1234 Marcono1234
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: