Minecraft – How to create an NBT file for a spawner in minecraft

minecraft-java-edition

How can I create an NBT file for a spawner in minecraft? If I already have the spawner in a world, how can I extract that as an NBT file for use in other things?

Best Answer

Structure blocks can allow you to select an area, and export it as a NBT file.

An image of structure blocks being used to save a creeper spawner

The saved .NBT file will contain all of the information for the blocks, entities and tile-entities within that region:

An image of NBTExplorer showing the saved structure file

A tool such as NBTExplorer will let you move these tags up to root and delete everything else, to have an NBT file containing only the tags of the spawner:

An image of NBTExplorer showing the saved structure file, this time with the tags for the spawner moved to the NBT root

If you're not in 1.10 yet, you may need to make a copy of the world and open that in 1.10 to use structure blocks.