package projectzombie.init;

import java.util.ArrayList;

import bdf.types.BdfObject;
import projectzombie.items.modifier.ItemModifier;
import projectzombie.items.modifier.ItemModifierDamage;
import projectzombie.items.modifier.ItemModifierFluidStorage;
import projectzombie.items.modifier.ItemModifierMeta;
import projectzombie.items.modifier.ItemModifierTimer;
import projectzombie.items.modifier.ItemModifierTimerPaused;
import projectzombie.items.modifier.ItemModifierWater;

public class ItemModifiers
{
	public static final ArrayList<Class<? extends ItemModifier>> MODIFIERS = new ArrayList<>();
	
	private static void register(Class<? extends ItemModifier> m)
	{
		try {
			m.getConstructor(BdfObject.class);
		} catch (NoSuchMethodException | SecurityException err) {
			err.printStackTrace();
			System.exit(1);
		}
		
		MODIFIERS.add(m);
	}
	
	public static void init()
	{
		register(ItemModifierMeta.class);
		register(ItemModifierDamage.class);
		register(ItemModifierFluidStorage.class);
		register(ItemModifierWater.class);
		register(ItemModifierTimer.class);
		register(ItemModifierTimerPaused.class);
	}
}
