Mojira Archive
MC-132726

/data get and F3+I puts spaces into entity NBT

To reproduce: /summon zombie, then press F3+I or enter /data get entity @e[type=zombie,distance=..3,limit=1].

Example result:

/summon minecraft:zombie -14.08 56.00 -9.30 {HurtByTimestamp: 0, Attributes: [{Base: 20.0d, Name: "generic.maxHealth"}, {Base: 0.0d, Name: "generic.knockbackResistance"}, {Base: 0.23000000417232513d, Name: "generic.movementSpeed"}, {Base: 2.0d, Name: "generic.armor"}, {Base: 0.0d, Name: "generic.armorToughness"}, {Base: 35.0d, Name: "generic.followRange"}, {Base: 3.0d, Name: "generic.attackDamage"}, {Base: 0.0884933390979193d, Name: "zombie.spawnReinforcements"}], Invulnerable: 0b, FallFlying: 0b, PortalCooldown: 0, AbsorptionAmount: 0.0f, InWaterTime: -1, FallDistance: 0.0f, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], PersistenceRequired: 0b, Motion: [0.0d, -0.04826178387389901d, 0.0d], Leashed: 0b, Health: 18.0f, LeftHanded: 0b, Air: 132s, OnGround: 1b, Rotation: [0.0f, 0.0f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], CanBreakDoors: 0b, Fire: 0s, ArmorItems: [{}, {}, {}, {}], CanPickUpLoot: 0b, HurtTime: 6s, DrownedConversionTime: -1}

Spaces in NBT are superfluous at best and break the command at worst. Even if they work currently, they can easily break in other versions. This does not occur when using F3+I on a block with NBT data.