-1

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?

2
  • Do you want an "NBT file" (how NBT data is stored, readable with an NBT editor) or the text that you would type into a command to create that block (human-readable plaintext, looks similar to JSON).
    – SirBenet
    Commented Jun 10, 2016 at 17:54
  • The actual NBT file itself. I would like to use it for McDungeon for custom spawners. That program reads in NBT files to generate spawners.
    – Minecraaft
    Commented Jun 10, 2016 at 18:00

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.