Arc-shaped sword strikes

Started by Casimys on Thu, 11/17/2022 - 20:39

Topic category: Help with modding (Java Edition)

Last seen on 13:03, 6. Jan 2023
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Arc-shaped sword strikes
Thu, 11/17/2022 - 20:39

I have seen in some mods very beautiful arc-shaped blows in the form of particles. Can you tell me how it is possible to create. Or is it even possible

Last seen on 13:09, 24. Jan 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yeah this is very much…
Thu, 11/17/2022 - 22:04

Yeah this is very much doable, depends on how precise you want it tho.


1.) Simple "swing" or "slash" particle that shows up when you hit something with the sword? Easily doable. 

2.) Pre-made half-ring made of particles that spawns in front of you when you use the weapon? Doable but will take some significant effort.

3.) Particles that spawn in the path that your sword is following during an attack? Good luck programming that.



The first option is just making a animated slash/swing particle. Take the texture of the standard vanilla minecraft sword slashing particle (should be somewhere on the internet) and then enhance it so it looks like a particle you would wanna have in your mod. Then animate the particle so it looks like it's moving. (kinda like it's doing a slashing/swinging motion and doesnt just spawn and float in the air without moving, you get what I mean)


The second option can be made by making presets of particles. Let me explain. If you just spawn a half-circle of particles it will likely face the same direction no matter what direction you're swinging your sword in. So you will have to fix this by employing a procedure that detects which direction you're looking at and then spawning the particles accordingly, so a slash towards East does't have the same curve as a slash towards South. I don't know if this makes sense to you, if it doesn't I could try to explain better later. 


The third option is something you could probably do but I have no idea how as I'm horrible at programming and this would require plenty of Java-related knowledge. So yeah I have no clue how to make that and I dont think it's even worth it.

Last seen on 13:03, 6. Jan 2023
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I would like to do what is…
Sat, 11/19/2022 - 12:32

I would like to do what is in option number 2, you can perhaps explain in more detail how this is possible. I've tried a lot of options but I can't figure out how to do it