package com.elmakers.mine.bukkit.api.effect;

public enum ParticleType {
	
	SMOKE("smoke"),
	LARGE_SMOKE("largesmoke"),
	BLOCK_BREAKING("iconcrack_{subtype}"),
	SNOWBALL_POOF("snowballpoof"),
	SNOW_SHOVEL("snowshovel"),
	TOOL_BREAKING("tilecrack_{subtype}"),
	PORTAL("portal"),
	SPLASH("splash"),
	BUBBLE("bubble"),
	SUSPENDED("suspended"),
	DEPTH_SUSPENDED("depthsuspend"),
	TOWN_AURA("townaura"),
	HUGE_EXPLOSION("hugeexplosion"),
	LARGE_EXPLOSION("largeexplode"),
	FLAME("flame"),
	HEART("heart"),
	CLOUD("cloud"),
	CRITICAL("crit"),
	MAGIC_CRITICAL("magicCrit"),
	NOTE("note"),
	MAGIC_RUNES("enchantmenttable"),
	LAVA("lava"),
	FOOTSTEP("footstep"),
	RED_DUST("reddust"),
	WATER_DRIPPING("dripWater"),
	LAVA_DRIPPING("dripLava"),
	HAPPY_VILLAGER("happyVillager"),
	SLIME("slime"),
	SPELL("spell"),
	MOB_SPELL("mobSpell"),
	INSTANT_SPELL("instantSpell"),
	UNKNOWN("nil");

	private String particleName;
	
	private ParticleType(String particleName) {
		this.particleName = particleName;
	}
	
	public String getParticleName() {
		return particleName;
	}
	
	public String getParticleName(String subtype) {
		return particleName.replace("{subtype}", subtype);
	}
	
	public static ParticleType fromName(String name, ParticleType particle) {
		for (ParticleType t : ParticleType.values()) {
			if (t.getParticleName().replace("_", "").equalsIgnoreCase(name.replace("_", ""))) {
				particle = t;
				break;
			}
		}
		return particle;
	}
}

@@ -70,233 +70,125 @@
 e %7B%0A
-%09%0A%09SMOKE(%22smoke%22),%0A%09LARGE_SMOKE(%22largesmoke%22),%0A%09BLOCK_BREAKING(%22iconcrack_%7Bsubtype%7D%22),%0A%09SNOWBALL_POOF(%22snowballpoof%22),%0A%09SNOW_SHOVEL(%22snowshovel%22),%0A%09TOOL_BREAKING(%22tilecrack_%7Bsubtype%7D%22),%0A%09PORTAL(%22portal%22),%0A%09SPLASH(%22splash%22),%0A%09
+    HUGE_EXPLOSION(%22hugeexplosion%22),%0A    LARGE_EXPLOSION(%22largeexplode%22),%0A    FIREWORKS_SPARK(%22fireworksSpark%22),%0A    
 BUBB
@@ -201,17 +201,20 @@
 bble%22),%0A
-%09
+    
 SUSPENDE
@@ -227,15 +227,16 @@
 pend
-ed
 %22),%0A
-%09
+    
 DEPT
@@ -253,17 +253,17 @@
 D(%22depth
-s
+S
 uspend%22)
@@ -264,17 +264,20 @@
 pend%22),%0A
-%09
+    
 TOWN_AUR
@@ -295,226 +295,365 @@
 %22),%0A
-%09HUGE_EXPLOSION(%22hugeexplosion%22),%0A%09LARGE_EXPLOSION(%22largeexplode%22),%0A%09FLAME(%22flame%22),%0A%09HEART(%22heart%22),%0A%09CLOUD(%22cloud%22),%0A%09CRITICAL(%22crit%22),%0A%09MAGIC_CRITICAL(%22magicCrit%22),%0A%09NOTE(%22note%22),%0A%09MAGIC_RUNES(%22enchantmenttable%22),%0A%09
+    CRITICAL(%22crit%22),%0A    MAGIC_CRITICAL(%22magicCrit%22),%0A    SMOKE(%22smoke%22),%0A    MOB_SPELL(%22mobSpell%22),%0A    MOB_SPELL_AMBIENT(%22mobSpellAmbient%22),%0A    SPELL(%22spell%22),%0A    INSTANT_SPELL(%22instantSpell%22),%0A    WITCH_MAGIC(%22witchMagic%22),%0A    NOTE(%22note%22),%0A    PORTAL(%22portal%22),%0A    MAGIC_RUNES(%22enchantmenttable%22),%0A    EXPLOSION(%22explode%22),%0A    FLAME(%22flame%22),%0A    
 LAVA
@@ -662,17 +662,20 @@
 lava%22),%0A
-%09
+    
 FOOTSTEP
@@ -692,31 +692,160 @@
 %22),%0A
-%09RED_DUST(%22reddust%22),%0A%09
+    SPLASH(%22splash%22),%0A    WAKE(%22wake%22),%0A%09LARGE_SMOKE(%22largesmoke%22),%0A    CLOUD(%22cloud%22),%0A    RED_DUST(%22reddust%22),%0A    SNOWBALL_POOF(%22snowballpoof%22),%0A    
 WATE
@@ -869,17 +869,20 @@
 ater%22),%0A
-%09
+    
 LAVA_DRI
@@ -904,13 +904,56 @@
 %22),%0A
-%09HAPP
+    SLIME(%22slime%22),%0A    HEART(%22heart%22),%0A    ANGR
 Y_VI
@@ -964,12 +964,12 @@
 ER(%22
-happ
+angr
 yVil
@@ -981,98 +981,157 @@
 %22),%0A
-%09SLIME(%22slime%22),%0A%09SP
+    HAPPY_VILLAGER(%22happyVillager%22),%0A    SNOW_SHOV
 EL
-L
 (%22s
-p
+nowshov
 el
-l
 %22),%0A
-%09MOB_SPELL(%22mobSpell%22),%0A%09INSTANT_SPELL(%22instantSpell
+%0A%09BLOCK_BREAKING(%22iconcrack_%7Bsubtype%7D%22),%0A%09TOOL_BREAKING(%22tilecrack_%7Bsubtype%7D
 %22),%0A
+%0A
 %09UNK

Update ParticleType