mojira.dev
MC-82164

Spawner's NBT SpawnPotentials doesn't overwrite EntityId.

1. Spawner's NBT SpawnerPotentials doesn't overwrite EntityId.

/setblock ~ ~1 ~ minecraft:mob_spawner 0 destroy {EntityId:"Zombie", SpawnCount:2, Delay:0, SpawnRange:20, MaxNearbyEntities:5, MinSpawnDelay:0, MaxSpawnDelay:0,RequiredPlayerRange:40,SpawnPotentials:[{Type:PigZombie,Weight:100}]}

This code doesn't spawn any entities.

/setblock ~ ~1 ~ minecraft:mob_spawner 0 destroy {EntityId:"PigZombie", SpawnCount:2, Delay:0, SpawnRange:20, MaxNearbyEntities:5, MinSpawnDelay:0, MaxSpawnDelay:0,RequiredPlayerRange:40,SpawnPotentials:[{Type:PigZombie,Weight:100}]}

But this code works.

2. Spawner cannot spawn multiple different entities.
This problem is related to Problem 1.

/setblock ~ ~1 ~ minecraft:mob_spawner 0 destroy {EntityId:"Zombie", SpawnCount:1, Delay:0, SpawnRange:20, MaxNearbyEntities:5, MinSpawnDelay:0, MaxSpawnDelay:0, RequiredPlayerRange:40,SpawnPotentials:[ 
{Type:PigZombie,Weight:100,Properties:{CustomName:"AI_Lv1", DropChances:[1.0f,0.0f,0.0f,0.0f,0.0f],Equipment:[{id:"minecraft:iron_sword",Count:1b,tag:{display:{Name:"AI Lv.1의 검"}}}]}},
{Type:Zombie,Weight:100,Properties:{CustomName:"AI_Lv1", DropChances:[1.0f,0.0f,0.0f,0.0f,0.0f],Equipment:[{id:"minecraft:iron_sword",Count:1b,tag:{display:{Name:"AI Lv.1의 검"}}}]}}]}

Not work.

Comments 5

Cannot reproduce, the 3 commands you provide work fine for me, but you put a very large SpawnRange, with a very small SpawnCount. That might be why you don't see anything spawn.

@mrpingouin1

Do you want proof video? I can make it.
And what was your MC version?

p.s. I checked entities by

/testfor @e

in loading chunk zone.

This is no longer valid since in 1.9 EntityID got removed. See http://minecraft.gamepedia.com/Chunk_format#MobSpawner

For me this command spawns one horde of zombies, then the model inside the spawner turns into a pig and it stops spawning anything. I'm not using the EntityID tag here, as you may notice, but it still doesn't make the SpawnPotentials work.
I also tried getting rid of the Type:Zombie parts in the SpawnPotentials code (just in case for whatever reason that one was gone too) but that doesn't work either.

/setblock ~ ~2 ~ minecraft:mob_spawner 0 replace {SpawnData:{id:Zombie,Attributes:[{Name:generic.maxHealth,Base:10}],Health:10,PersistenceRequired:1,CustomName:Zombie,CustomNameVisible:0},SpawnPotentials:[{Type:Zombie,Weight:3,Properties:{id:Zombie,Attributes:[{Name:generic.maxHealth,Base:10}],Health:10,PersistenceRequired:1,CustomName:Zombie,CustomNameVisible:0}},{Type:Skeleton,Weight:1,Properties:{id:Skeleton,Attributes:[{Name:generic.maxHealth,Base:10}],Health:10,PersistenceRequired:1,CustomName:Skeleton,CustomNameVisible:0}}],SpawnCount:12,SpawnRange:6,RequiredPlayerRange:128,MinSpawnDelay:70,MaxSpawnDelay:100,MaxNearbyEntities:15}

Edit: This was done in 15w35e. So this is a bug that should be fixed for 1.9! (I noticed it said Affects versions 1.8.7)

McDic

(Unassigned)

Unconfirmed

Minecraft 1.8.7

Retrieved