Merge pull request #80 from OmniCypher-/master

Added color RED_DUST particle functionality and Lightning particle change
This commit is contained in:
MistPhizzle 2015-01-09 10:36:06 -05:00
commit d20e8d50e7
3 changed files with 30 additions and 20 deletions

View file

@ -1,19 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/LocalServer/BukkitForPlugins1.8.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/Factions.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/GriefPrevention.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/LWC.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/MassiveCore.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/NoCheatPlus.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/PreciousStones.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/TagAPI.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/Towny.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/WorldEdit.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/WorldGuard.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/LocalServer/plugins/KorraRPG.jar"/>
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/LocalServer/Spigot.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/bukkit-1.8-R0.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/CombatTag.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/Factions.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/GriefPrevention.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/LogBlock.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/LWC.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/MassiveCore.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/mcore.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/NoCheatPlus.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/PreciousStones.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/ProjectKorraRPG.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/TagAPI.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/Towny.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/Vault.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/WGRegionEvents.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/WorldEdit.jar"/>
<classpathentry kind="lib" path="C:/Users/Chris/Desktop/Plugins/Files/KorraDependables/WorldGuard.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1000,9 +1000,6 @@ public enum ParticleEffect {
if (speed < 0) {
throw new IllegalArgumentException("The speed is lower than 0");
}
if (amount < 1) {
throw new IllegalArgumentException("The amount is lower than 1");
}
this.effect = effect;
this.offsetX = offsetX;
this.offsetY = offsetY;

View file

@ -95,7 +95,16 @@ public class Lightning {
}
instances.add(this);
}
public void displayChargedParticles(){
Location l = player.getEyeLocation().add(player.getEyeLocation().getDirection().normalize().multiply(1));
l.setX(l.getX() + Math.random() * (0.1 - -0.1));
l.setY(l.getY() + Math.random() * (0.1 - -0.1));
l.setZ(l.getZ() + Math.random() * (0.1 - -0.1));
ParticleEffect.RED_DUST.display((float) 0, (float) 255, (float) 255, 0.1F, 0, l, 256D);
}
private void progress() {
if (player.isDead() || !player.isOnline()) {
removeWithTasks();
@ -117,7 +126,7 @@ public class Lightning {
Location loc = player.getEyeLocation().add(player.getEyeLocation()
.getDirection().normalize().multiply(1.2));
loc.add(0, 0.3, 0);
ParticleEffect.MAGIC_CRIT.display(loc, 0.3F, 0.1F, 0.3F, 0, 4);
displayChargedParticles();
}
else {
state = State.MAINBOLT;
@ -403,9 +412,9 @@ public class Lightning {
}
public void run() {
ParticleEffect.MAGIC_CRIT.display(loc, 0, 0, 0, 0, 1);
ParticleEffect.RED_DUST.display((float) 0, (float) 255, (float) 255, 0.1F, 0, loc, 256D);
count++;
if(count > 10)
if(count > 5)
this.cancel();
else if(count == 1) {