How do I check what block is in my off hand without a lot of if statements

Started by oddmandrill on

Topic category: Help with Minecraft modding (Java Edition)

Active 9 months ago
Joined Dec 2022
Points:
312

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
How do I check what block is in my off hand without a lot of if statements

I wanted to make it so I would place down a lot of whatever block is in my off hand. If its oak planks, place oak planks. If its cobble, set down cobble. Is there a way to check what block I have in my offhand without needing to make a series of if statements for each block in the game?

Active 1 day ago
Joined Dec 2014
Points:
1084

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 673
You can do this with the …
Wed, 10/02/2024 - 11:33

You can do this with the "Item in main-hand" block

Active 1 day ago
Joined Dec 2014
Points:
1084

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 673
^ and then to be able to use…
Wed, 10/02/2024 - 11:34

^ and then to be able to use it as a block in your procedure.

Active 9 months ago
Joined Dec 2022
Points:
312

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
OH MY GOD THANK YOU
Wed, 10/02/2024 - 23:09

OH MY GOD THANK YOU