blizzard particle redo

hub text
This commit is contained in:
Chiss 2014-12-23 10:36:48 +11:00
parent b83a81ec7e
commit 224d1bbf63
2 changed files with 25 additions and 6 deletions

View File

@ -3,12 +3,13 @@ package mineplex.core.gadget.gadgets;
import java.util.HashSet;
import java.util.Iterator;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.event.player.PlayerToggleFlightEvent;
@ -18,6 +19,7 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.gadget.types.ParticleGadget;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.core.gadget.GadgetManager;
@ -49,13 +51,31 @@ public class ParticleBlizzard extends ParticleGadget
if (!shouldDisplay(player))
continue;
player.getWorld().playSound(player.getLocation(), Sound.AMBIENCE_RAIN, 0.2f, 0.1f);
if (Manager.isMoving(player))
{
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4);
}
else
{
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(0, 5, 0), 1f, 0f, 1f, 0, 30);
double scale = (double)(player.getTicksLived() % 50) / 50d;
for (int i = 0 ; i < 4 ; i++)
{
double r = (1d-scale) * Math.PI * 2;
double x = Math.sin(r + (i * (Math.PI/2))) * (r%(Math.PI * 2)) * 0.4;
double z = Math.cos(r + (i * (Math.PI/2))) * (r%(Math.PI * 2)) * 0.4;
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(x, scale * 3, z), 0f, 0f, 0f, 0, 1);
if (scale > 0.95 && Recharge.Instance.use(player, GetName(), 1000, false, false))
{
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(0, scale * 3.5, 0), 0f, 0f, 0f, 0.2f, 60);
player.getWorld().playSound(player.getLocation(), Sound.STEP_SNOW, 0.75f, 1.5f);
}
}
}
}
}
@ -83,7 +103,6 @@ public class ParticleBlizzard extends ParticleGadget
{
if (GetActive().contains(event.getEntity().getShooter()))
{
//UtilFirework.launchFirework(player.getEyeLocation(), Type.BALL, color(), true, true, new Vector(r(0.1),r(0.1),r(0.1)), 1);
_arrows.add((Arrow)event.getEntity());
}
}

View File

@ -64,8 +64,8 @@ public class TextManager extends MiniPlugin
UtilBlockText.MakeText("TEAM DEATHMATCH", locComp.clone().add(15, 21, 0), faceComp, 159, (byte)1, TextAlign.CENTER);
UtilBlockText.MakeText("TEAM DEATHMATCH", locComp.clone().add(16, 21, 0), faceComp, (Manager.Type == HubType.Halloween) ? 89 : 159, (Manager.Type == HubType.Halloween) ? (byte)0 : (byte)15, TextAlign.CENTER);
//UtilText.MakeText("CAPTURE THE PIG", locComp.clone().add(15, 28, 0), faceComp, 159, (byte)14, TextAlign.CENTER);
//UtilText.MakeText("CAPTURE THE PIG", locComp.clone().add(16, 28, 0), faceComp, (Manager.Type == HubType.Halloween) ? 89 : 159, (Manager.Type == HubType.Halloween) ? (byte)0 : (byte)15, TextAlign.CENTER);
UtilBlockText.MakeText("CLANS", locComp.clone().add(15, 28, 0), faceComp, 159, (byte)14, TextAlign.CENTER);
UtilBlockText.MakeText("CLANS", locComp.clone().add(16, 28, 0), faceComp, (Manager.Type == HubType.Halloween) ? 89 : 159, (Manager.Type == HubType.Halloween) ? (byte)0 : (byte)15, TextAlign.CENTER);
//Arcade
UtilBlockText.MakeText("ARCADE", locArcade, faceArcade, 159, (byte)5, TextAlign.CENTER);