In this tutorial, I am showing you how to create your particles.
Step 1: Creating the particle class
To create your own particles, we will need to create our own particle class so that we can do whatever we want. Create a class and have it extend an Entity<particleName>FX. List of EntityFX is available at the end of this post.
I will be using the Redstone's particles as I want my particle's appearance and behaviour to be the same as the Redstone's, so I extend EntityReddustFX.
public class EntityPositiveSpeedforceFX extends EntityReddustFX
{
}
You will receive an error. Don't worry.
Now, let's look at the EntityReddustFX's main methods:
So I want to change the color so I will be calling EntityFX#particleRed, EntityFX#particleGreen, EntityFX#particleBlue in my second method. Your class should look like this:
Alrighty! That's it for our custom particle class.
Step 2: Creating a spawning particle class
We need to create a class in which we can call the method from that class to spawn our particles. So create a new class and call it ParticleSpawner or whatever you wanna name it. We need to create a field that calls Minecraft#getMinecraft.
private static Minecraft mc = Minecraft.getMinecraft();
Next we need to create a method that will be called to spawn our particles.
public class ParticleSpawner
{
private static Minecraft mc = Minecraft.getMinecraft();
public static EntityFX spawnParticle(String particleName, double par2, double par4, double par6, double par8, double par10, double par12)
{
return null;
}
}
Once you have something that look like that, we will need to type the int, double etc.
Do you see the if statement, "particleName.equals("positive_speedforce")? The string is the name of our particle when we call the spawnParticle method. Alright, I hoped I made this portion clear enough and understandable as this is the crucial part. Next step on! Full speed ahead!
Final step: Spawning our particle!
I will be calling my spawnParticle method in my EventHandler (it's where my speedsters' lightning streak will come from). And here is the method!
As you can see, the string "positive_speedforce" has to be same as the string in the if statement in our ParticleSpawner class,
else
{
if (particleName.equals("positive_speedforce"))
{
var21 = new EntityPositiveSpeedforceFX(mc.theWorld, par2, par4, par6, (float)par8, (float)par10, (float)par12);
}
mc.effectRenderer.addEffect(var21);
return var21;
}
So, talking about the parameters. The first parameter is obviously a String which has to have the same characters as in the if statement in the ParticleSpawner class. The 2nd, 3rd and 4th parameters are where the particles will be spawned, the positions to be exact, x, y, z respectively. The last 3 parameters are the offsets, and they are x, y and z offsets. I hope you understood this part!
If you got any problems, ask here. I will be creating an FAQ section when there are questions commonly asked in this thread. I hope this tutorial help you people. I think this tutorial will work for 1.8, if not just ask here too! ^^
And now, the Entity<particleName>FX list:
EntityAuraFX
EntityBlockDustFX
EntityBreakingFX
EntityBubbleFX
EntityCloudFX
EntityCrit2FX
EntityCritFX
EntityDiggingFX
EntityDropParticleFX
EntityEnchantmentTableParticleFX
EntityExplodeFX
EntityFirework
EntityFIshWakeFX
EntityFlameFX
EntityFootStepFX
EntityHeartFX
EntityHugeExplodeFX
EntityLargeExplodeFX
EntityLavaFX
EntityNoteFX
EntityParticleEmitter
EntityPickupFX
EntityPortalFX
EntityRainFX
EntityReddustFX
EntitySmokeFX
EntitySnowShovelFX
EntitySpellParticleFX
EntitySplashFX
EntitySuspendFX
You can find the Entity classes in forgeSrc<numbers>/net/minecraft/client/particle.
Thanks for reading this tutorial. If I missed anything out, please tell me in this thread or PMs and I will have it edited! If this tutorial helped, give me a like!
Give me feedback on how I can improve, examples: format of tutorial etc. See ya!
Credits
MrCrayfish for his open source mod. Without it, I wouldn't be able to figure out how to create custom particles.
Create tutorial "The rendering of the hands when holding a specific item" or tell me in a PM, really want to know(don't know how things are done in 1.8.9). I liked your topic:)
Hm, it seems I will have to create the video sooner than I thought. Either today or tomorrow, the video will be uploaded. Check my youtube channel for the update soon. Link to it is in my signature.
Hm, it seems I will have to create the video sooner than I thought. Either today or tomorrow, the video will be uploaded. Check my youtube channel for the update soon. Link to it is in my signature.
this tutorial teaches you how to create your own particles and event handlers. 15:30 is where the particle spawning code is, 19:50 is where the custom particle (custom texture on your particle) is. Enjoy the video and subscribe and give a thumbs up if it helped you or if you liked the video.
In this tutorial, I am showing you how to create your particles.
Step 1: Creating the particle class
To create your own particles, we will need to create our own particle class so that we can do whatever we want. Create a class and have it extend an Entity<particleName>FX. List of EntityFX is available at the end of this post.
I will be using the Redstone's particles as I want my particle's appearance and behaviour to be the same as the Redstone's, so I extend EntityReddustFX.
You will receive an error. Don't worry.
Now, let's look at the EntityReddustFX's main methods:
We will copy the parameters over into our entity particle class. Your entity particle class should look something like this:
So I want to change the color so I will be calling EntityFX#particleRed, EntityFX#particleGreen, EntityFX#particleBlue in my second method. Your class should look like this:
Alrighty! That's it for our custom particle class.
Step 2: Creating a spawning particle class
We need to create a class in which we can call the method from that class to spawn our particles. So create a new class and call it ParticleSpawner or whatever you wanna name it. We need to create a field that calls Minecraft#getMinecraft.
Next we need to create a method that will be called to spawn our particles.
Once you have something that look like that, we will need to type the int, double etc.
Do you see the if statement, "particleName.equals("positive_speedforce")? The string is the name of our particle when we call the spawnParticle method. Alright, I hoped I made this portion clear enough and understandable as this is the crucial part. Next step on! Full speed ahead!
Final step: Spawning our particle!
I will be calling my spawnParticle method in my EventHandler (it's where my speedsters' lightning streak will come from). And here is the method!
As you can see, the string "positive_speedforce" has to be same as the string in the if statement in our ParticleSpawner class,
So, talking about the parameters. The first parameter is obviously a String which has to have the same characters as in the if statement in the ParticleSpawner class. The 2nd, 3rd and 4th parameters are where the particles will be spawned, the positions to be exact, x, y, z respectively. The last 3 parameters are the offsets, and they are x, y and z offsets. I hope you understood this part!
If you got any problems, ask here. I will be creating an FAQ section when there are questions commonly asked in this thread. I hope this tutorial help you people. I think this tutorial will work for 1.8, if not just ask here too! ^^
And now, the Entity<particleName>FX list:
You can find the Entity classes in forgeSrc<numbers>/net/minecraft/client/particle.
Thanks for reading this tutorial. If I missed anything out, please tell me in this thread or PMs and I will have it edited! If this tutorial helped, give me a like!
Give me feedback on how I can improve, examples: format of tutorial etc. See ya!
Credits
Create tutorial "The rendering of the hands when holding a specific item" or tell me in a PM, really want to know(don't know how things are done in 1.8.9). I liked your topic:)
I don't understand. U should create a video
Nicholas Pham
What part of my tutorial do you not understand?
I will be creating a video tutorial on this soon, it will be on my youtube channel and on my website,
The question of course is not on how you solved the problem for armor when you hit hands out of armor?
Yay thanks
Nicholas Pham
No, I was asking Flippypenguin121's question.
You didn't answer my 1st question, which part of the tutorial did you not understand?
Step 1 and 2
Nicholas Pham
Hm, it seems I will have to create the video sooner than I thought. Either today or tomorrow, the video will be uploaded. Check my youtube channel for the update soon. Link to it is in my signature.
Post the video on this thread too
Nicholas Pham
Of course,
Video is here!
this tutorial teaches you how to create your own particles and event handlers. 15:30 is where the particle spawning code is, 19:50 is where the custom particle (custom texture on your particle) is. Enjoy the video and subscribe and give a thumbs up if it helped you or if you liked the video.