Minecraft – Mob Spawners Survival 1.14.4

minecraft-commandsminecraft-java-edition

I'm trying to use a give command in a Survival world about mob spawners like a blaze spawner. When I place it in Creative, it spawns blazes, but in Survival just pigs! How can I fix this, without mods, or plugins, etc.?

I'm using this command on the moment:
give @p spawner{BlockEntityTag:{SpawnData:{id:"blaze"},Spawncount:5,RequiredPlayerRange:100,SpawnPotentials:[{Entity:{id:"blaze"},Weight:1}]}}

Best Answer

This is caused by a weirdly implemented security measure: Many items do not use their BlockEntityTag when placed by a player who is either in Survival or does not have OP level ≥2.

The reason for it is that you could use spawner items that spawn e.g. command block minecarts or falling blocks of command blocks or similar that then execute arbitrary commands. For a similar reason, you can't place command blocks onto the ground without these permissions.

This security measure might be intended to stop you from e.g. picking up items dropped from an OPped player and using them as a player without sufficient permissions. I do not know why it also checks for Creative mode, because players with OP level ≥2 can set themselves to Creative mode anyway. A bug report about this was closed as "Works as intended", but not with any good reasoning.

You can work around this by using /setblock to place spawners. If you want to do it in a fancy way, you can for example trigger a spawner to be placed at your location whenever you throw a snowball or do something else to easily trigger it.