mojira.dev
MC-84392

Potions no longer have damage values. I can't use commands to give specific potions like healing or whatever.

I have a bomb system in Minecraft for an adventure map. However, since there are no damage values for potions, it does not work.

Comments 6

Sure you can. The commands have just changed, because the way potions are stored has changed. Try this, for example:

/give <player> minecraft:potion 1 0 {Potion:"minecraft:swiftness"}

However I do have one question. If I wanted to have a villager sell a potion, I would originally have had the following: sell: {id: "potion", Damage:16248, Count: 64}, rewardExp: false}.

I tried putting the following but it didn't work:

sell: {id: "splash_potion", Potion:harming, Count: 64}, rewardExp: false}.

What would the command be in the new update?

Because potions now use NBT, creating a trade for one is similar to creating a trade for an enchanted item. You need to include the tag:{} object in the item definition, and inside it list all the NBT tags you want the item to have, such as the Potion tag. Here's a working example:

/summon Villager ~1 ~ ~ {Profession:2,Career:1,CareerLevel:4,Offers:{Recipes:[
  {buy:{id:emerald,Count:1},sell:{id:splash_potion,Count:1,tag:{Potion:minecraft:swiftness}}}
]}}

What if you want to create a custom potion with multiple effects using a command block, though (because I don't seem to be able too)?

Custom potions currently appear to be broken for splash potions: see MC-83471. However, it should currently work with regular potions, though the format may change in future snapshots.

Nate Eng

(Unassigned)

Unconfirmed

Minecraft 15w31c

Retrieved