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

Started by GhostFN on

Topic category: Help with Minecraft modding (Java Edition)

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 ?

 

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

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?

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!