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

Entities can be summoned with selector tags that cannot be selected for

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.13, Minecraft 1.13.1
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      It is possible to summon a mob that has invalid values in its Tags: array.

      Using the command

      /summon minecraft:creeper ~ ~ ~ {Tags:["hi there"]}

      I can summon a creeper with the following NBT data: 

      {HurtByTimestamp: 0, Attributes: [{Base: 20.0d, Name: "generic.maxHealth"}, {Base: 0.0d, Name: "generic.knockbackResistance"}, {Base: 0.25d, Name: "generic.movementSpeed"}, {Base: 0.0d, Name: "generic.armor"}, {Base: 0.0d, Name: "generic.armorToughness"}, {Base: 16.0d, Name: "generic.followRange"}, {Base: 2.0d, Name: "generic.attackDamage"}], Invulnerable: 0b, FallFlying: 0b, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], PersistenceRequired: 0b, Tags: ["hi there"], Fuse: 30s, Motion: [0.0d, -0.0784000015258789d, 0.0d], Leashed: 0b, Health: 20.0f, LeftHanded: 0b, Air: 300s, OnGround: 1b, ignited: 0b, Rotation: [0.0f, 0.0f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CanPickUpLoot: 0b, HurtTime: 0s, ExplosionRadius: 3b}
      

      Specifically, this creeper has the NBT data: Tags: ["hi there"]

      If I try to access this tag using a command, it is invalid because tag selectors do not use the same string formatting like CustomNames and therefore cannot have spaces.

      However, the tag is still there and can be accessed with NBT selectors

      Ideally, tags would use the string format like CustomName: in selectors so that @e[tag="hi there"] would work

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              getfugu Baker Fugu
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                CHK: