mojira.dev
MC-90101

Mob Spawner is overwriting (ignoring?) Pos[x,y,z] data of entity

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.

Linked issues

Attachments

Comments 21

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.

11 more comments

Confirmed for 16w04a.

Confirmed for 16w05a.

Confirmed for 16w05b

Confirmed for 16w06a.

Thanks Searge! <3

Irbis

michael

Community Consensus

CommandBlock, MobSpawner

Minecraft 15w41b, Minecraft 15w42a, Minecraft 15w43a, Minecraft 15w43b, Minecraft 15w43c, ..., Minecraft 16w05b, Minecraft 16w06a, Minecraft 16w07a, Minecraft 16w07b, Minecraft 1.9 Pre-Release 1

Minecraft 1.9 Pre-Release 2

Retrieved