Custom punch sound

Started by Ru4eyOk on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom punch sound
I decided to make my own hand hit sound, that only plays when the player punches.How to do it in a procedure?
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try using a produce whenever…
Sun, 05/21/2023 - 14:08

Try using a produce whenever an entity is hit. Then see if the source entity has air in their main hand. Basicly soruce entity is what hurt the entity, and we are detecting if the source entity has nothing in their hand to make the noise. If you want it player only, add an and statement and check if the source entity type is a player. Hopefuly this helps!
 

-- KrebPleb

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for the advice, but…
Sun, 05/21/2023 - 16:53

Thanks for the advice, but it still work incorrently