package com.yolp900.itsjustacharm.client.particles; import com.yolp900.itsjustacharm.reference.LibParticles; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; public enum ModParticles { ConstructionTableConstruction(LibParticles.ConstructionTableConstruction) { @Override public ModParticle getModParticle(World world, double x, double y, double z, double size, double red, double green, double blue) { return new ParticleConstructionTableConstruction(world, x, y, z, size, red, green, blue); } @Override public void registerSprite() { for (int i = 1; i < 5; i++) { ParticleHandler.registerSprite(new ResourceLocation(LibParticles.ConstructionTableConstruction.getTexture().getResourceDomain(), LibParticles.ConstructionTableConstruction.getTexture().getResourcePath() + i)); } } }, Levitator(LibParticles.Levitator) { @Override public ModParticle getModParticle(World world, double x, double y, double z, double size, double red, double green, double blue) { return new ParticleBase(LibParticles.Levitator, world, x, y, z, size, red, green, blue); } }, Levitate(LibParticles.Levitate) { @Override public ModParticle getModParticle(World world, double x, double y, double z, double size, double red, double green, double blue) { return new ParticleBase(LibParticles.Levitate, world, x, y, z, size, red, blue, green); } }; private LibParticles particle; ModParticles(LibParticles particle) { this.particle = particle; } public LibParticles getParticle() { return particle; } public abstract ModParticle getModParticle(World world, double x, double y, double z, double size, double red, double green, double blue); public void registerSprite() { ParticleHandler.registerSprite(getParticle().getTexture()); } }