How to detect the effect of the potion effect cloud?

Started by 5487apple on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to detect the effect of the potion effect cloud?

Hi!

I'm working on a mod for elemental materials on 1.16.5, and one of the parts needs to be splashed on blocks with specified splash or lingering potions to infect blocks, but I don't know how to detect the type of potion used .
I've tried using NBT detection (detect "Potion") and the /data command (/data get entity @s), but I can't figure out how to output the /data command.
I'm using a "when entity spawned" trigger.

(I tried for a long time)

(Sorry for bad english^^)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nbt name of potion used: …
Wed, 08/09/2023 - 18:34

Nbt name of potion used: "Potion" ({Potion:"minecraft:luck"} is luck potion). /data get entity @p Potion