Started by
Casimys
on
Topic category: Help with modding (Java Edition)
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
Topic category: Help with modding (Java Edition)
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
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.
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
https://mcreator.net/forum/108183/tutorial-how-create-arc-shaped-particle-vfx-sword-slashes-and-more-procedure-file
this tutorial is basically what you need