Get entity instead of player

Started by mooxzyz on

Topic category: Help with modding (Java Edition)

Last seen on 16:06, 15. Feb 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Get entity instead of player

Hello i am using the following code to try make so when i right click an entity it lightning strikes them, here is the image:
https://imgur.com/a/JrKLCD3

why does it hit both me and the entity how do i make it just hit the entity

Last seen on 02:27, 13. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try using raytrace distance…
Sun, 02/18/2024 - 01:08

try using raytrace distance insted... however, that will make it always be a specific amount of blocks away from the player