The bug
The mob inside a minecart with spawner is never rendered, even if the spawner is customized.
How to reproduce
Summon a minecart with spawner that spawns mobs. The steps below show how to do this without hardcoding any spawner data.
/setblock ~2 ~2 ~ spawner
/summon minecraft:spawner_minecart ~2 ~ ~
/give @s minecraft:blaze_spawn_egg
/tick freeze
Right-click the spawner with the spawn egg (you cannot do the same to the minecart due to MC-110427)
/data modify entity @n[type=minecraft:spawner_minecart] {} merge from block ~2 ~2 ~
Break the floating spawner block
/tick unfreeze
❌ Observe that despite the complete absence of visual indication that the spawner minecart is doing anything, it will (after a significant delay) spawn blazes as expected
Note
Note that since 15w33a, no miniature is rendered at all; prior to this verison, a pig was rendered. The attached screenshot is from before 15w33a.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by
relates to
Attachments
Comments
I spawned this minecart with spawner using summon command. It spawns mobs correctly, but mob miniature is incorrect (pig instead of skeleton). Effect of this bug is only visual, it does not affect spawning.
Bug affects all minecarts with spawner in 1.7.2. Tested with 5 types of mobs, always the same result (pig miniature inside the spawner).

I can confirm this for 14w32d, though the pig is also off centered now

Still in pre2
Confirmed for 1.8

Confirmed for
1.8.5
1.8.6
The rotation also doesn't stop if the player gets out of range

In the latest snapshots, not sure which one, the entity seems to have disappeared completely?
Confirmed for 15w47c

Confirmed for
15w50a No entity is displayed at all, probably because of the "fix" of MC-66894
The reason for that is, that the func_151260_c()
method in the /Client/src/net/minecraft/entity/EntityTrackerEntry.java
class (MCP 1.8 names) sends a S0EPacketSpawnObject
packet for minecarts. This packet is only able to store one additional integer for special information. However for minecarts this integer is used to represent the minecart type. This means the client does not get the information about which mob is visible.
private Packet func_151260_c()
{
if (this.trackedEntity instanceof EntityItem)
{
//...
}
//...
else if (this.trackedEntity instanceof EntityMinecart)
{
EntityMinecart var9 = (EntityMinecart)this.trackedEntity;
return new S0EPacketSpawnObject(this.trackedEntity, 10, var9.func_180456_s().func_180039_a());
}
//...
}
One way to "fix" this would be to override the method NBTTagCompound func_174819_aU()
in the /Client/src/net/minecraft/entity/ai/EntityMinecartMobSpawner.java
class to either return all NBT data or only the entity to spawn. As updating packets are not send every tick, it might be better to send all the data to make sure the displayed mob changes at the right point for the client. This would also require to add code to the func_174834_g(NBTTagCompound p_174834_1_)
method in the /Client/src/net/minecraft/entity/Entity.java
class to just call the readEntityFromNBT(NBTTagCompound tagCompund)
method. Or adding a data watcher for these fields might work as well, but I am not too familiar with how they work.

There is no entity in spawner minecart for 1.9-pre2
Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.
This is an automated comment on any open or reopened issue with out-of-date affected versions.

Currently this cannot be reproduced due to being blocked by MC-110426.

After some more investigation, I've decided that MC-110426 should be merged into this ticket. The actual difference that caused the mob to stop rendering is mundane: Mojang removed the call to TileEntityMobSpawnerRenderer.renderMob(minecart.func_98039_d(), minecart.posX, minecart.posY, minecart.posZ, partialTicks)
in RenderMinecartMobSpawner
in 15w33a (for 1.9; it exists in 15w32c). The underlying issue of the mob inside not being sent to the client still exists, and could be fixed nowadays with NBT entity metadata (as is done with parrots on players). Were the rendering to be re-enabled without fixing the syncing, the pig issue would resurface. This ticket already listed versions where the mob didn't render for a few versions, so it is bit more confusing to try to keep them separate.

In 1.16.1 and 20w29a
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Can confirm in 21w11a.
Can confirm in 1.16.5 and 21w14a.
Can confirm in 21w17a.
Affects 1.17
Can confirm in 1.17.1.
Affects 21w40a
Can confirm in 1.18.1
Can confirm in 1.18.2.
Can confirm in 1.19.
Can confirm in 1.19.2.
Please add steps to reproduce.