(SOLVED) how to make a check if there is an entity with an item in the right hand nearby

Started by ImSeyo on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(SOLVED) how to make a check if there is an entity with an item in the right hand nearby
Fri, 10/13/2023 - 14:45 (edited)

check if there is an entity with an item in the right hand nearby

Edited by ImSeyo on Fri, 10/13/2023 - 14:45
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a procedure, and create…
Thu, 10/12/2023 - 21:43

Make a procedure, and create a local logic variable. Use an entity iterator bracket with your desired radius, and check if the item in the main hand of the entity iterator is your desired item: if it is, set the local logic variable to true. Entity iterators check all entities in their radius individually, but by using a local variable, it will turn the check to true if any of them have the item in their main hand.

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! I used it a little…
Fri, 10/13/2023 - 14:44

Thanks! I used it a little differently, but you still helped me a lot.