mojira.dev
MC-78716

Summoned entities have invalid / wrong dimension tag

The "Dimension" tag of a summoned entity will always default to 0, no matter which dimension the entity was summoned into. The tag is not updated until the entity changes dimensions, such as travelling through a portal.

Steps to reproduce:

  1. Go to the nether.

  2. Spawn a cow using a spawn egg

  3. Run

    /testfor @e[type=Cow] {Dimension:-1}
    • The result in the chat window will be "Found Cow"

  4. Kill the cow

  5. Summon a cow using /summon Cow

  6. Run the same testfor command again

    • The result in chat will be "Cow did not match the required data structure"

Linked issues

Comments 5

I think the title is wrong it should be: Summoned entities have invalid / wrong dimension tag

Because what he is describing is that a summoned entites (for example a pig) will always have Dimension:0 as tag, whereas a "normal" entity or a entity spawned with a spawn egg will have the correct Dimension

Here is a example (1.8.3) for a pig in the nether:

Pig nether /summon

HurtByTimestamp:0,
Attributes:[0:{Base:10.0d,Name:"generic.maxHealth"},1:{Base:0.0d,Name:"generic.knockbackResistance"},2:{Base:0.25d,Name:"generic.movementSpeed"},3:{Base:16.0d,Modifiers:[0:{UUIDMost:3446414180352148544L,UUIDLeast:-5558872226752495235L,Amount:-0.045461612991129205d,Operation:1,Name:"Random spawn bonus"}],Name:"generic.followRange"}],
Invulnerable:0b,
ForcedAge:0,
PortalCooldown:0,
AbsorptionAmount:0.0f,
Saddle:0b,
FallDistance:0.0f,
InLove:0,
DeathTime:0s,
DropChances:[0:0.085f,1:0.085f,2:0.085f,3:0.085f,4:0.085f],
PersistenceRequired:0b,
HealF:10.0f,
Age:0,
Motion:[0:0.0d,1:-0.0784000015258789d,2:0.0d],
Leashed:0b,
UUIDLeast:-5050107578848892951L,
Health:10s,
Air:300s,
OnGround:1b,
Dimension:0,
Rotation:[0:0.0f,1:0.0f],
UUIDMost:-6274568444589815789L,
Equipment:[0:{},1:{},2:{},3:{},4:{}],
Pos:[0:19.83376161979342d,1:85.0d,2:6.638237978301281d],
Fire:-1s,
CanPickUpLoot:0b,
HurtTime:0s

Pig nether spawn egg

HurtByTimestamp:0,
Attributes:[0:{Base:10.0d,Name:"generic.maxHealth"},1:{Base:0.0d,Name:"generic.knockbackResistance"},2:{Base:0.25d,Name:"generic.movementSpeed"},3:{Base:16.0d,Modifiers:[0:{UUIDMost:-5227265439903103120L,UUIDLeast:-6295081180609957370L,Amount:0.11460214672514782d,Operation:1,Name:"Random spawn bonus"}],Name:"generic.followRange"}],
Invulnerable:0b,
ForcedAge:0,
PortalCooldown:0,
AbsorptionAmount:0.0f,
Saddle:0b,
FallDistance:0.0f,
InLove:0,
DeathTime:0s,
DropChances:[0:0.085f,1:0.085f,2:0.085f,3:0.085f,4:0.085f],
PersistenceRequired:0b,
HealF:10.0f,
Age:0,
Motion:[0:0.0d,1:-0.0784000015258789d,2:0.0d],
Leashed:0b,
UUIDLeast:-8199699924327681422L,
Health:10s,
Air:300s,
OnGround:1b,
Dimension:-1,
Rotation:[0:88.66136f,1:-32.432858f],
UUIDMost:2794461172832748833L,
Equipment:[0:{},1:{},2:{},3:{},4:{}],
Pos:[0:19.25823847878009d,1:85.0d,2:6.394914839160349d],
Fire:-1s,
CanPickUpLoot:0b,
HurtTime:0s

This might not seem so important, but it is. If something relies on this, Minecraft could eventually crash and entity selection is broken.

This relates to: MC-78527

Seems to be fixed in 15w36d

@@unknown: Can you confirm the fix ?

Yup, it's fixed. Sorry for the delayed response, there seems to be a bug with the notification system, I sometimes don't get notified.

Ok, thanks for the feedback.

KingSupernova

(Unassigned)

Confirmed

/summon, dataTag

Minecraft 1.8.3

Minecraft 15w36d

Retrieved