mojira.dev
MC-72774

Entities render incorrectly on the first frame after being summoned

The bug

Entities will sometimes render incorrectly on their first frame, probably due to entities not having NBT data until the first tick (or simply not rendering it).
This has been observed both with common commands

/summon minecraft:zombie ~ ~ ~ {active_effects:[{duration:-1,amplifier:0b,id:"minecraft:invisibility"}]}

and spawn eggs

/give @s minecraft:squid_spawn_egg{EntityTag:{id:"minecraft:squid",CustomName:"{\"text\":\"column\"}",CustomNameVisible:0b,NoAI:1b,Silent:1b,active_effects:[{duration:-1,amplifier:0b,id:"minecraft:invisibility"}]}} 1

Both status effects (specifically, invisibility), and rotation are affected by this problem.

I believe this causes the commonly seen bug of TNT and fireworks rendering for 1 tick even when they are supposed to explode immediately.

Linked issues

Attachments

Comments 23

Dlawso the Really Lucky Rabbit

Command used?

Jasper van den Berg

/summon Zombie ~ ~ ~ {ActiveEffects:[{Id:14,Amplifier:1,Duration:999999}]}

Confirmed for:

  • 1.8.1-pre2 Just build a clock summoning invisible mobs and you will see some of them appearing

Confirmed for 1.8.2-pre6, although the bug is actually kinda different. Entities will gain their effects instantly, but always get rendered in their default state on the first frame/tick regardless of any NBT tags present (potion effects, marker tag on armor stands, even just the entity's rotation).

You seem to be correct about the rotation, but this doesn't happen to me with the "Invisible" tag.

13 more comments

Can confirm in 1.17.1.

Can confirm in 1.18.1.

Can confirm in 1.18.2.

Can confirm in 1.19.

Can confirm in 1.19.2.

KingSupernova

(Unassigned)

Confirmed

Platform

Low

Rendering

Minecraft 1.8, Minecraft 1.8.1-pre2, Minecraft 1.8.1-pre3, Minecraft 1.8.1, Minecraft 1.8.2-pre4, ..., 1.19.4, 1.20.1, 1.20.4, 1.21.1, 24w40a

Retrieved