When placing a command block with the auto tag that has a command to set a spawner with a specific entity in, the spawner will instead be a default pig spawner.
Steps to reproduce:
Use this command to get a command block with a command to /setblock a spawner with an armour stand that is automatically run when it is placed.
/give @p command_block{BlockEntityTag:{Command:"/setblock ~ ~ ~ spawner{SpawnCount:0,SpawnRange:0,MaxNearbyEntities:0,RequiredPlayerRange:0,SpawnData:{entity:{id:\"minecraft:armor_stand\",ArmorItems:[{},{},{},{id:\"minecraft:stone\",Count:1b}]}}} replace",auto:1b}} 1
Now place the command block you were given and notice it will place a spawner with a spinning pig.
Expected result (do the same steps above in 1.18): Placing the command block will place a spawner that has an armour stand with stone on its head.
Note:
Spawners show correctly after a relog
Attachments
Comments 3
Yes the spawner shows correctly when relogging, I believe it is the same bug as MC-252368
Thank you for your report!
We're tracking this issue in MC-252368, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
Relates to MC-252368, I expect it's the same bug actually, the block entity not syncing to the client due to the command block's block entity.
If you relog, does the spawner show correctly?