From f3ad2a40ba87d88e102febf81c50e96fc28a0df2 Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Thu, 5 Mar 2015 15:29:03 +0100 Subject: [PATCH] Update ParticleEffect library Thanks to @DarkBlade12 for providing this awesome library. --- .../particleeffect/ParticleEffect.java | 684 ++++++++++++++---- .../particleeffect/ReflectionUtils.java | 2 +- 2 files changed, 538 insertions(+), 148 deletions(-) diff --git a/src/com/massivecraft/massivecore/particleeffect/ParticleEffect.java b/src/com/massivecraft/massivecore/particleeffect/ParticleEffect.java index e38c2d5a..b6fcd228 100644 --- a/src/com/massivecraft/massivecore/particleeffect/ParticleEffect.java +++ b/src/com/massivecraft/massivecore/particleeffect/ParticleEffect.java @@ -32,13 +32,14 @@ import com.massivecraft.massivecore.util.MUtil; * *

* It would be nice if you provide credit to me if you use this class in a published project * * @author DarkBlade12 - * @version 1.6 + * @version 1.7 */ public enum ParticleEffect { /** @@ -48,7 +49,7 @@ public enum ParticleEffect { *

  • The speed value influences the velocity at which the particle flies off * */ - EXPLOSION_NORMAL("explode", 0, -1), + EXPLOSION_NORMAL("explode", 0, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by exploding ghast fireballs and wither skulls: * */ - FIREWORKS_SPARK("fireworksSpark", 3, -1), + FIREWORKS_SPARK("fireworksSpark", 3, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by swimming entities and arrows in water: * */ - WATER_BUBBLE("bubble", 4, -1, false, true), + WATER_BUBBLE("bubble", 4, -1, ParticleProperty.DIRECTIONAL, ParticleProperty.REQUIRES_WATER), /** * A particle effect which is displayed by swimming entities and shaking wolves: * */ - WATER_SPLASH("splash", 5, -1), + WATER_SPLASH("splash", 5, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed on water when fishing: * */ - WATER_WAKE("wake", 6, 7), + WATER_WAKE("wake", 6, 7, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by water: * */ - SUSPENDED("suspended", 7, -1, false, true), + SUSPENDED("suspended", 7, -1, ParticleProperty.REQUIRES_WATER), /** * A particle effect which is displayed by air when close to bedrock and the in the void: * */ - SUSPENDED_DEPTH("depthSuspend", 8, -1), + SUSPENDED_DEPTH("depthSuspend", 8, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed when landing a critical hit and by arrows: * */ - CRIT("crit", 9, -1), + CRIT("crit", 9, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed when landing a hit with an enchanted weapon: * */ - CRIT_MAGIC("magicCrit", 10, -1), + CRIT_MAGIC("magicCrit", 10, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by primed tnt, torches, droppers, dispensers, end portals, brewing stands and monster spawners: * */ - SMOKE_NORMAL("smoke", 11, -1), + SMOKE_NORMAL("smoke", 11, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by fire, minecarts with furnace and blazes: * */ - SMOKE_LARGE("largesmoke", 12, -1), + SMOKE_LARGE("largesmoke", 12, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed when splash potions or bottles o' enchanting hit something: * */ SPELL("spell", 13, -1), @@ -158,6 +160,7 @@ public enum ParticleEffect { * */ SPELL_INSTANT("instantSpell", 14, -1), @@ -169,7 +172,7 @@ public enum ParticleEffect { *
  • The particle color gets lighter when increasing the speed and darker when decreasing the speed * */ - SPELL_MOB("mobSpell", 15, -1), + SPELL_MOB("mobSpell", 15, -1, ParticleProperty.COLORABLE), /** * A particle effect which is displayed by entities with active potion effects applied through a beacon: * */ - SPELL_MOB_AMBIENT("mobSpellAmbient", 16, -1), + SPELL_MOB_AMBIENT("mobSpellAmbient", 16, -1, ParticleProperty.COLORABLE), /** * A particle effect which is displayed by witches: * */ SPELL_WITCH("witchMagic", 17, -1), @@ -218,7 +222,7 @@ public enum ParticleEffect { *
  • The speed value has no influence on this particle effect * */ - VILLAGER_HAPPY("happyVillager", 21, -1), + VILLAGER_HAPPY("happyVillager", 21, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by mycelium: * */ - TOWN_AURA("townaura", 22, -1), + TOWN_AURA("townaura", 22, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by note blocks: * */ - NOTE("note", 23, -1), + NOTE("note", 23, -1, ParticleProperty.COLORABLE), /** * A particle effect which is displayed by nether portals, endermen, ender pearls, eyes of ender, ender chests and dragon eggs: * */ - PORTAL("portal", 24, -1), + PORTAL("portal", 24, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by enchantment tables which are nearby bookshelves: * */ - ENCHANTMENT_TABLE("enchantmenttable", 25, -1), + ENCHANTMENT_TABLE("enchantmenttable", 25, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by torches, active furnaces, magma cubes and monster spawners: * */ - FLAME("flame", 26, -1), + FLAME("flame", 26, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by lava: * */ - CLOUD("cloud", 29, -1), + CLOUD("cloud", 29, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by redstone ore, powered redstone, redstone torches and redstone repeaters: * */ - REDSTONE("reddust", 30, -1), + REDSTONE("reddust", 30, -1, ParticleProperty.COLORABLE), /** * A particle effect which is displayed when snowballs hit a block: * */ - SNOW_SHOVEL("snowshovel", 32, -1), + SNOW_SHOVEL("snowshovel", 32, -1, ParticleProperty.DIRECTIONAL), /** * A particle effect which is displayed by slimes: * */ - ITEM_CRACK("iconcrack", 36, -1, true), + ITEM_CRACK("iconcrack", 36, -1, ParticleProperty.DIRECTIONAL, ParticleProperty.REQUIRES_DATA), /** * A particle effect which is displayed when breaking blocks or sprinting: * */ - BLOCK_CRACK("blockcrack", 37, -1, true), + BLOCK_CRACK("blockcrack", 37, -1, ParticleProperty.DIRECTIONAL, ParticleProperty.REQUIRES_DATA), /** * A particle effect which is displayed when falling: * */ - BLOCK_DUST("blockdust", 38, 7, true), + BLOCK_DUST("blockdust", 38, 7, ParticleProperty.DIRECTIONAL, ParticleProperty.REQUIRES_DATA), /** * A particle effect which is displayed when rain hits the ground: *