Mojira Archive
MC-135084

Executing if certain potion in inventory.

There are two different types of potions for each potion even water. One can be tested for one can't and they both look identical. One type is by using the give command: 

/give @p potion{Potion:fire_resistance}

The other is getting it from the creative inventory, brewing it, or if using water, filling it up with a water block.

/execute if entity @p[nbt={Inventory:[{id:"minecraft:potion",tag:{Potion:fire_resistance}}]}]

This detects only the ones that have to be produced by the command. The brewed can't be found.

Invalid

Alex Smith

2018-07-28, 12:56 AM

2018-07-28, 01:05 AM

2018-07-28, 12:59 AM

0

0

Unconfirmed

Minecraft 1.13

-