Ink Blaster changes

This commit is contained in:
Sam 2017-05-01 11:10:06 +01:00
parent 6d4a68acdf
commit 0f925dd655
1 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,7 @@ public class PerkInkBlast extends SmashPerk implements IThrown
{
private int _cooldown;
private float _spread;
private float _projectileVelocity;
private int _knockbackMagnitude;
private int _bullets;
@ -51,6 +52,7 @@ public class PerkInkBlast extends SmashPerk implements IThrown
public void setupValues()
{
_cooldown = getPerkTime("Cooldown");
_spread = getPerkFloat("Spread");
_projectileVelocity = getPerkFloat("Projectile Velocity");
_knockbackMagnitude = getPerkInt("Knockback Magnitude");
_bullets = getPerkInt("Bullets");
@ -106,7 +108,7 @@ public class PerkInkBlast extends SmashPerk implements IThrown
Item ent = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(Material.INK_SACK, (byte) 0, 1, "Ink" + Math
.random()));
Vector random = new Vector(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);
Vector random = new Vector((Math.random() - 0.5) * _spread, (Math.random() - 0.5) * _spread, (Math.random() - 0.5) * _spread);
random.normalize();
random.multiply(_projectileVelocity);