// Path: src/api/java/com/github/atomicblom/shearmadness/api/particles/ICustomParticleFactory.java
// public interface ICustomParticleFactory extends IForgeRegistryEntry<ICustomParticleFactory> {
//     @SideOnly(Side.CLIENT)
//     IParticleFactory getParticleFactory();
// }


import com.github.atomicblom.shearmadness.api.particles.ICustomParticleFactory;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleManager;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.registry.IForgeRegistry;
package com.github.atomicblom.shearmadness.networking;


public class SpawnCustomParticleMessageHandler implements IMessageHandler<SpawnCustomParticleMessage, IMessage>
{
    @SuppressWarnings({"ReturnOfNull", "ConstantConditions"})
    @Override
    public IMessage onMessage(SpawnCustomParticleMessage message, MessageContext ctx)
    {
        final ParticleManager effectRenderer = Minecraft.getMinecraft().effectRenderer;

// Path: src/api/java/com/github/atomicblom/shearmadness/api/particles/ICustomParticleFactory.java
// public interface ICustomParticleFactory extends IForgeRegistryEntry<ICustomParticleFactory> {
//     @SideOnly(Side.CLIENT)
//     IParticleFactory getParticleFactory();
// }


// Path: src/main/java/com/github/atomicblom/shearmadness/networking/SpawnCustomParticleMessageHandler.java
import com.github.atomicblom.shearmadness.api.particles.ICustomParticleFactory;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleManager;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.registry.IForgeRegistry;

package com.github.atomicblom.shearmadness.networking;


public class SpawnCustomParticleMessageHandler implements IMessageHandler<SpawnCustomParticleMessage, IMessage>
{
    @SuppressWarnings({"ReturnOfNull", "ConstantConditions"})
    @Override
    public IMessage onMessage(SpawnCustomParticleMessage message, MessageContext ctx)
    {
        final ParticleManager effectRenderer = Minecraft.getMinecraft().effectRenderer;

        final IForgeRegistry<ICustomParticleFactory> registry = GameRegistry.findRegistry(ICustomParticleFactory.class);