How to select a specific item / back tank oxygen system

Started by _Raven26 on

Topic category: Help with MCreator software

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to select a specific item / back tank oxygen system

I'm making an oxygen system for an item but there is a problem. I'm using durability for the oxygen tanks and trying to lower the durability of them when the player is underwater but idk how to select THE oxygen tank item the player is currently using.

Here is my code:

https://ibb.co/XXGPbzC

PS: I'm not new to MCreator or procedures so you don't need to give me a whole tutorial. Also, if there is a better way to make an oxygen system, please tell me.

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Anybody got an idea? I haven…
Thu, 08/08/2024 - 02:01

Anybody got an idea? I haven't figured anything out.

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is totally a better…
Thu, 08/08/2024 - 11:04
  1. There is totally a better way to make an oxygen system: in the item procedures tab there is a thing called NBT data with which it's easier to code
  2. If the oxygen tank only works when in a slot of armor, not just anywhere in the inventory you can use the "set custom data number tag "TagName" of (Get item from armor slot 2 of Event/target entity if it has inventory) to [0]" block, the main block is in item procedures/data and the part in the brackets if in Entity procedure/data and set it to                                 "get custom data number tag "TagName" of (Get item from armor slot 2 of Event/target entity if it has inventory)" + [1]  or - [1] of you take away the oxygen
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
or to summarize it use the…
Thu, 08/08/2024 - 11:05

or to summarize it use the data number tags

 

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! I'll try this…
Mon, 08/19/2024 - 04:46

Thanks! I'll try this sometime.