2

I know how to create a datapack, but can't manage to find the exact name for the regeneration arrow as a result of a craft. Tried

"item": "minecraft:tipped_arrow{Potion:"minecraft:regeneration"}",

but didn't work. Thanks for your help!

2
  • 1
    I don't think you can nest quotes like that.
    – SF.
    Commented May 27, 2019 at 9:34
  • 1
    Just throw one on the ground and use /data get. Commented May 27, 2019 at 10:16

1 Answer 1

3

There are 3 problems with your current code:

  • minecraft:tipped_arrow does not exist. It should simply be minecraft:arrow with the Potion NBT tag.

  • There has to be a space between minecraft:arrow and the { marking the start of the NBT tags.

  • You can't nest quotes like that in JSON files. It makes the parser think you typed in two strings, minecraft:tipped_arrow{Potion: and } and that minecraft:regeneration is just random text. The easiest way is to simply put ' characters rather than " around minecraft:regeneration (or whatever potion you're using).

In the end, it should look like this:

"item": "minecraft:arrow {Potion:'minecraft:regeneration'}",
2
  • 1
    Escaping nested quotes with \" should work as well. You'll need that if you have more than one.
    – dly
    Commented May 28, 2019 at 7:21
  • Except that "minecraft:tipped_arrow{Potion:"minecraft:regeneration"}" worked in game, not with the datapack...
    – Eli
    Commented May 28, 2019 at 17:22

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.