mojira.dev
MC-212119

Glow Squids reset all NBT when unloaded

Glow squids do not permanently retain any NBT tags. Reloading them by closing and reopening the world resets all NBT to default values.

Using a command such as /summon minecraft:glow_squid ~ ~ ~ {NoAI:1} will result in it still having full AI

Linked issues

Comments 10

Using /data get entity @e[type=glow_squid,limit=1] gives this:

Glow Squid has the following entity data: {Brain: {memories: {}}, HurtByTimestamp: 0, Attributes: [{Base: 0.699999988079071d, Name: "minecraft:generic.movement_speed"}], Invulnerable: 0b, FallFlying: 0b, DarkTicksRemaining: 0, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], PersistenceRequired: 0b, UUID: [I; -852183328, -247447012, -1226603591, -688906928], Motion: [0.013942048884928226d, 0.012360158376395702d, 0.030300691723823547d], Health: 10.0f, LeftHanded: 0b, Air: 300s, OnGround: 0b, Rotation: [-35.71885f, 0.0f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Pos: [1136.5999999940395d, 64.66497143893503d, 205.0955783687532d], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CanPickUpLoot: 0b, HurtTime: 0s}

There is no NoAI tag even if it was summoned with it.

I'm pretty sure the cause for this is that GlowSquid#readAdditionalSaveData doesn't call super. Same reason for MC-212325

Other NBTs are glitched as well

can totally confirm by the wiki

@Justin zheng The wiki is not an official source of information

Not every NBT tag is reset. If you summon an invulnerable glow squid, the glow squid will still be invulnerable after a relog.

  1. /summon minecraft:glow_squid ~ ~ ~ {Invulnerable:1b}
  2. /data get entity @e[type=minecraft:glow_squid,limit=1,sort=nearest] Invulnerable

    The result is 1b and the glow squid does not take damage when you hit it in survival mode.

  3. Relog.

  4. /data get entity @e[type=minecraft:glow_squid,limit=1,sort=nearest] Invulnerable

    The result is still 1b and the glow squid still does not take damage when you hit it in survival mode.

Yeah, any of the base entity NBT persists, but anything mob-specific is lost

Would also like to add that this causes named Glow Squids to despawn as MC-212915 explains even when named with a name tag

Jordan Milligan

coschevi

Confirmed

Important

Commands, Mob behaviour

21w03a

Retrieved