Based on 1.11.2 decompiled using MCP 9.35 rc1 and 17w17a decompiled using CFR
The command block and spawner minecart data fixer are not working correctly.
First of all the method net.minecraft.entity.item.EntityMinecartCommandBlock.registerFixesMinecartCommand(DataFixer) compares the id value with the current id of the command block block entity, which will always fail. It should compare it with the id of the EntityMinecartCommandBlock (see EntityMinecartMobSpawner.registerFixesMinecartMobSpawner(DataFixer)).
The second problem is that it sets the old block entity id (Control) when trying to apply command block fixes. This fails when trying to fix chunks which were loaded after the block entity id changes. Another problem is that it sets the old command block minecart entity as well which would result in them being lost upon loading old worlds.
While the method net.minecraft.entity.item.EntityMinecartMobSpawner.registerFixesMinecartMobSpawner(DataFixer) uses the entity id, it always uses the latest. The problem is that there were changes to the NBT data of spawner when the old entity ids were used. This means trying to load a pre-1.9 world with spawner minecarts will not fix these.
- Create a world in version 1.8.9
- Place a spawner
- Summon a spawner minecart
- Open the world in the latest version
→ The spawners were fixed, but the spawner minecarts lost their data
The problem in general is that some fixes might apply to versions where the ids where different. Therefor setting the latest block entity id will not apply the fixes. However, setting only the old id would cause problems with fixes after the id changes. This means it would be good to set the id based on the passed data version. To not have special cases and possibly miss one with new versions or if a fix for an old version was forgotten and added later some kind of id lookup to get the respective id for a version should solve this problem.