In 1.8.8 you could define where entity from spawner whould appear:
/setblock ~ ~2 ~ minecraft:mob_spawner 0 replace {SpawnCount:1,SpawnRange:1,Delay:-1,MinSpawnDelay:50,MaxSpawnDelay:50,MaxNearbyEntities:1,RequiredPlayerRange:-1,SpawnPotentials:[{Type:MinecartCommandBlock,Weight:1,Properties:{Pos:[10.5,87.0,10.5]}}]}
In this case, minecartCommandBlock appeared at 10,87,10 every time the Delay hit 0. It was easy to set activator rail to run the command in cart
When I rewrited this for 1.9 snapshots, the Pos[x,y,z] entitydata was ignored. Tried both ways in Entity tag and in Properties tag:
/setblock ~ ~2 ~ minecraft:mob_spawner 0 replace {SpawnCount:1,SpawnRange:1,Delay:-1,MinSpawnDelay:50,MaxSpawnDelay:50,MaxNearbyEntities:1,RequiredPlayerRange:-1,SpawnPotentials:[{Entity:{id:"MinecartCommandBlock",Command:"hi",Pos:[10.5,87.0,10.5]},Weight:1}]}
In this case, minecartCommandBlock appears near spawner, randomly, definitely not in specified position. Setting SpawnRange:0 is still random y+-1, so minecart can spawn in spawner, over it or under.
In 15w40b the second command was working, in 15w41a it stopped working. Save file in attachment to easy check when it works and when not. It can be opened in 1.8.8 and in snapshots of 1.9.
Related issues
is duplicated by
Attachments
Comments


It might be related to MC-89923

Can confirm.

Confirmed. I was just about to post a bug report about this.
I can also confirm that this change took place after 15w39c, because the original behaviour still works in 15w39c.

The second command (1.9 style) was working since 15w35 or even earlier till 15w40b. It broke in 15w41a. Hope it will be fixed before official 1.9 release, because a lot of custom maps from mapmakers will be unfixable.

Indeed. I didn't notice sooner because I've been sitting on 15w39c until today.
One (hopefully temporary) workaround is to create an always-active repeat command block that teleports entities from the spawner to their expected position (the one given by the Pos tag). For this to work you'd need the SpawnRange set very low (i.e. 0) so you know exactly where the entities will spawn.

Confirmed for 15w44a.

Confirmed for 15w45a, also, you should use Pos:[10.5d,87.0d,10.5d]
instead of Pos:[10.5,87.0,10.5]

Steven, It is working without "d/f" at the end of numbers. Try it on 15w40b, and it will work. But later it will not.

@@unknown Oh, than that's probably because there's a dot in the numbers, so the game will make it a double
type.

@Steven W.d.V. Exactly.
— "When no letter is used and Minecraft can't tell the type from context, it assumes double (if there's a decimal point), int (if there's no decimal point and the number is small enough to store as an int), or string (if neither is true)."
scr: http://minecraft.gamepedia.com/Commands

Confirmed for 15w46a

Confirmed for 15w47c

Confirmed for 15w49b.

Confirmed for 15w50a & 15w51b.

This is not a discussion forum.

Confirmed for 16w03a.

Confirmed for 16w04a.

Confirmed for 16w05a.

Confirmed for 16w05b

Confirmed for 16w06a.

Thanks Searge! <3