Entity Accuracy?

Started by Suddz on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 months ago
Joined Jan 2021
Points:
736

User statistics:

  • Modifications: 2
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 198
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
Active 4 hours ago
Joined May 2022
Points:
1266

User statistics:

  • Modifications: 15
  • Forum topics: 25
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1142
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.

Active 12 hours ago
Joined Apr 2023
Points:
664

User statistics:

  • Modifications: 4
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 543
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.

Active 4 hours ago
Joined May 2022
Points:
1266

User statistics:

  • Modifications: 15
  • Forum topics: 25
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1142
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.

Active 12 hours ago
Joined Apr 2023
Points:
664

User statistics:

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

ok, I haven't extensively tested it