Help with detecting items

Started by Kittyman64 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with detecting items
Wed, 05/17/2023 - 21:51 (edited)

So I was making a space mod, and I wanted to make it so that if you had a full set of armor, you would get water breathing.

My current build

the empty "ifs" is where I want it to have it detect if they have the armor in the armor slot.

Edited by Kittyman64 on Wed, 05/17/2023 - 21:51
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here's a basic layout for…
Thu, 05/25/2023 - 07:40

Here's a basic layout for you

I'm actually quite surprised that this topic wasn't tackled sooner. It's quite simple, just a bunch of AND blocks with external inputs (Logic tab) and some item procedure blocks. I used iron as an example to pinpoint the armor slot numbers. 

 

Helmet - 3

Chestplate - 2

Leggings - 1

Boots - 0

 

I set the oxygen level to max as well because I really don't like using potion effects (they can easily be cleared and whatnot). It still provides the same benefits while also deactivating the set bonus when just one piece is missing, which is pretty accurate if you ask me. If you want to do set bonuses in the future, it's as simple as that.