Entity Accuracy?

Started by Suddz on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Entity Accuracy?
Fri, 10/29/2021 - 15:43 (edited)

Hello, so i need to make an entity that have better accuracy when they shoot a projectile (custom projectile, if that matters) because it just shoots all over the place.

I am not a programmer by any means but i changed the attackspeed in code so i wonder if it is possible to change the accuracy in the code somewhere aswell (or with a procedure ofc)

 

Thanks!

Edited by Suddz on Fri, 10/29/2021 - 15:43
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm having similar troubles,…
Fri, 10/06/2023 - 18:41

I'm having similar troubles, though the projectile I'm using has identical speed properties to arrows; the mob only hits targets about a fifth of the time when they're more than twenty blocks away. I'm pretty sure there's a built in inaccuracy value for mob-fired projectiles, but in this case I need the mob to be highly accurate. I'll see if I can manually override this.

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm pretty sure that…
Fri, 10/06/2023 - 18:51

I'm pretty sure that entities created through MCreator use some degree of rounding for their aiming, I have tried creating entities that fire a sighting projectile to aim, and then use a procedure for the actual attack, and they usually fire consistently several blocks away from the target, not changing if the target moves slightly.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah, but it's weirdly…
Fri, 10/06/2023 - 18:53

Yeah, but it's weirdly inconsistent. I've tested with both entities standing still, and it's still pretty random at higher distances.

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok, I haven't extensively…
Fri, 10/06/2023 - 23:06

ok, I haven't extensively tested it