Checking if Main/Off Hand doesnt have an item in it ?

Started by GhostFN on

Topic category: Help with modding (Java Edition)

Last seen on 16:53, 8. Jul 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Checking if Main/Off Hand doesnt have an item in it ?

I am working on a procedure to do this:

If a player hits or destroys a log with a block or nothing in their hand they take damage! I know how to check if there is a block or item in main/off hand but how do I check if there is nothing in main/off hand ?

 

Last seen on 11:44, 5. Sep 2020
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There's an "Empty itemstack"…
Thu, 07/02/2020 - 16:24

There's an "Empty itemstack" block in "Minecraft components".

Empty itemstack

Last seen on 21:21, 21. Feb 2021
Joined May 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how would I use it exactly…
Wed, 07/08/2020 - 02:05

how would I use it exactly for this purpose?

Last seen on 15:05, 6. Oct 2023
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey GhostFN! I can help you…
Wed, 07/08/2020 - 10:28

Hey GhostFN! I can help you with that...

I'm using the 2nd 2020.4 Snapshot:

( Image here: https://imgur.com/kn4eW4p )

Imgur Link

 

Last seen on 16:53, 8. Jul 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks a lot it worked!
Wed, 07/08/2020 - 16:53

Thanks a lot it worked!