Is there a way to /testfor a specific potion?

Is there a way to /testfor a specific potion? - Grayscale Photo of Dirt Road

I am working on a map with a boss fight where a witch is the boss. During the boss fight, I need different mobs to spawn on the ground based on which potion the witch threw (slowness, poison, weakness, or damage).

Using the testfor command, I have tried: /testfor @e[type=ThrownPotion] {Potion:{id:potion,Damage:16388}} and I have connected a comparator output from the command block. Yes, the command block is on a clock.

When I throw the Poison Splash Potion (0:33), the command block says the potion did not have the required data structure.

Is there something wrong with the command? Is there something wrong with the ThrownPotion? Is there a possible way to do this?

Thanks






Pictures about "Is there a way to /testfor a specific potion?"

Is there a way to /testfor a specific potion? - Wooden Bridge on Rainforest
Is there a way to /testfor a specific potion? - Road Between Pine Trees
Is there a way to /testfor a specific potion? - Bird's Eye View Of Roadway Surrounded By Trees



How do you summon specific potions?

You can use the minecraft. used:minecraft. potion criteria in combination with a tag to do this. The criteria would be used to detect when the player drinks a potion and the tag would serve as an indicator that the player is holding the correct potion.

How do you test a specific item in Minecraft?

The /testfor command became obsolete in Minecraft 1.13, and has been replaced by the /execute command*. It will do the same as typing /testfor @e {SelectedItem:{id:"<item>"}} and then putting a comparator to the command block with the command, and then running the command which you wanna run.



Minecraft Bedrock - Test For Items In Inventory (Mobile/Xbox/PS4/Windows 10/Switch)




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Plato Terentev, Pixabay, veeterzy, Joshua Welch