is it possible to make headshots deal critical damage?

Started by the deadly scorpion on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Apr 2019
Points:
725

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 77
is it possible to make headshots deal critical damage?
Wed, 07/22/2020 - 21:07 (edited)

so im making a zombie apocalypse mod and i want the zombies to die only when they are shot in the head, but idk how to do this, can someone help me out with this.

 

here is the discord channel for my mod incase you wanna join https://discord.gg/mRRpVjZ

Edited by the deadly scorpion on Wed, 07/22/2020 - 21:07
Active 1 year ago
Joined Jan 2020
Points:
658

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 19
You can only do this with…
Fri, 08/21/2020 - 15:06

You can only do this with coding...

Active 2 weeks ago
Joined Sep 2021
Points:
934

User statistics:

  • Modifications: 0
  • Forum topics: 77
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 118
Are you using a projectile?…
Fri, 12/29/2023 - 00:14

Are you using a projectile? If you are, then you can detect when the projectile hits an entity, and then check if the entity is a zombie.

 

If it is, then check if the T position of the projectile is higher than the Y position of the zombie minus some value, (you'll have to do some tweaking for that).

 

Then if that is true, then damage/kill the zombie, and otherwise, do nothing.

 

If you want, I might be able to provide a rough procedure for you.

Active 1 month ago
Joined Jan 2023
Points:
267

User statistics:

  • Modifications: 2
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Does anyone have a rough…
Tue, 01/07/2025 - 17:47

Does anyone have a rough procedure of this I might be able to use?