Posted March 15, 20205 yr How do I create a custom particle in 1.15? I am using deferred registries - and I have this public static DeferredRegister<ParticleType<?>> PARTICLE = new DeferredRegister<>(ForgeRegistries.PARTICLE_TYPES, Main.MOD_ID); public static RegistryObject<ParticleType<?>> CARBON = PARTICLE.register("carbon", () -> new BasicParticleType(false)); However, I'm not sure what to do from here, if this is all I need or I need to add a directory to the actual texture file
March 15, 20205 yr For particles there are 4 things: Particle ParticleType IParticleData IParticleFactory Having BasicParticleType covers the ParticleType and IParticleData Next you need a class that extends Particle (or TexturedParticle or SpriteTexturedParticle), in it you implement what you need (motion, texture, rendering). You finally need a class (I nest it in my Particle class) that extends IParticleFactory, it'll have a makeParticle function (i think that is the name) that will take as a parameter your registered ParticleType and return an instance of the particle you created above. For a simple particle BasicParticleType is fine, about 90% or more of vanilla particle use it. For more complex particles, you need a proper ParticleType and IParticleData, you can look at how vanilla does it in its redstone particle.
March 15, 20205 yr Author 38 minutes ago, Cyborgmas said: For particles there are 4 things: Particle ParticleType IParticleData IParticleFactory Having BasicParticleType covers the ParticleType and IParticleData Next you need a class that extends Particle (or TexturedParticle or SpriteTexturedParticle), in it you implement what you need (motion, texture, rendering). You finally need a class (I nest it in my Particle class) that extends IParticleFactory, it'll have a makeParticle function (i think that is the name) that will take as a parameter your registered ParticleType and return an instance of the particle you created above. For a simple particle BasicParticleType is fine, about 90% or more of vanilla particle use it. For more complex particles, you need a proper ParticleType and IParticleData, you can look at how vanilla does it in its redstone particle. Do you have an example I could look at maybe?
March 15, 20205 yr Author 2 minutes ago, Cyborgmas said: Take a look at any Particle in vanilla I've had a look, but where do they store the textures for them? I'm looking for the particle that comes from the end rod, but I can't find it
March 15, 20205 yr forgot a lot of rendering stuff had changed in 1.15, not sure if it applies to particles. Not at my setup right now so can't help more
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.