How can I check if the item in a slot is a specific potion in MCreator 2025.2?

Started by Kaanatorium on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I check if the item in a slot is a specific potion in MCreator 2025.2?

Hey everyone,
I’m working on my mod in MCreator 2025.2 (NeoForge 1.21.1).
Right now, I’m trying to check if the item inside a specific slot (for example slot 1 of a custom GUI) is a specific potion, like a Potion of Healing.

Here’s what I tried so far in a procedure:

Question:
👉 What’s the correct way in MCreator to check if an item in a slot is a specific potion (e.g. minecraft:healing)?
Do I need to use tags, NBT, or some built-in function?

Thanks in advance for any help! 🙏

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you upload it to…
Tue, 10/28/2025 - 19:48

can you upload it to pastebin?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try this, potion…
Tue, 10/28/2025 - 20:30

try this,

potion.getComponents().get(DataComponents.POTION_CONTENTS) instanceof PotionContents potionContents && potionContents.is(Potions.AWKWARD)

 

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You’re a lifesaver — yes, it…
Tue, 10/28/2025 - 21:49

You’re a lifesaver — yes, it worked this time!