Fixed projectile hitboxes and specific values

This commit is contained in:
Cheese 2015-04-04 10:54:03 +11:00
parent ae298644e2
commit c79432c8b9
39 changed files with 77 additions and 76 deletions

View File

@ -46,7 +46,7 @@ public class ItemFleshHook extends ItemGadget implements IThrown
1.6, false, 0, 0.2, 10, false);
Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true,
Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, null, 0, UpdateType.TICK, 2d);
Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, null, 0, UpdateType.TICK, 0.5f);
//Inform
UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + "."));

View File

@ -58,7 +58,7 @@ public class ItemMelonLauncher extends ItemGadget implements IThrown
1, false, 0, 0.2, 10, false);
Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true,
null, 1f, 1f, null, null, 0, UpdateType.TICK, 2d);
null, 1f, 1f, null, null, 0, UpdateType.TICK, 0.5f);
//Inform
UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + "."));

View File

@ -115,7 +115,7 @@ public class MorphBat extends MorphGadget implements IThrown
0.01, true, -0.3, 0, 10, false);
Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true,
null, 1f, 1f, null, null, 0, UpdateType.TICK, 3d);
null, 1f, 1f, null, null, 0, UpdateType.TICK, 0.5f);
//Inform
UtilPlayer.message(player, F.main("Skill", "You used " + F.skill("Poop") + "."));

View File

@ -98,7 +98,7 @@ public class MorphVillager extends MorphGadget implements IThrown
//Throw
Manager.getProjectileManager().AddThrow(gem, player, this, -1, true, true, true,
null, 1.4f, 0.8f, null, null, 0, UpdateType.TICK, 2d);
null, 1.4f, 0.8f, null, null, 0, UpdateType.TICK, 0.5f);
Manager.getDonationManager().RewardGems(null, this.GetName() + " Throw", player.getName(), player.getUniqueId(), -20);

View File

@ -31,42 +31,42 @@ public class ProjectileManager extends MiniPlugin
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, double hitboxMult)
long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, float hitboxGrow)
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, false,
null, 1f, 1f, null, 0, null, null, hitboxMult));
null, 1f, 1f, null, 0, null, null, hitboxGrow));
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, boolean pickup, double hitboxMult)
long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, boolean pickup, float hitboxGrow)
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, pickup,
null, 1f, 1f, null, 0, null, null, hitboxMult));
null, 1f, 1f, null, 0, null, null, hitboxGrow));
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle,
Sound sound, float soundVolume, float soundPitch, Effect effect, int effectData, UpdateType effectRate , double hitboxMult)
Sound sound, float soundVolume, float soundPitch, Effect effect, int effectData, UpdateType effectRate , float hitboxGrow)
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, false,
sound, soundVolume, soundPitch, effect, effectData, effectRate, null, hitboxMult));
sound, soundVolume, soundPitch, effect, effectData, effectRate, null, hitboxGrow));
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle,
Sound sound, float soundVolume, float soundPitch, ParticleType particle, Effect effect, int effectData, UpdateType effectRate, double hitboxMult)
Sound sound, float soundVolume, float soundPitch, ParticleType particle, Effect effect, int effectData, UpdateType effectRate, float hitboxGrow)
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, false,
sound, soundVolume, soundPitch, effect, effectData, effectRate, particle, hitboxMult));
sound, soundVolume, soundPitch, effect, effectData, effectRate, particle, hitboxGrow));
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle,
Sound sound, float soundVolume, float soundPitch, ParticleType particle, UpdateType effectRate, double hitboxMult)
Sound sound, float soundVolume, float soundPitch, ParticleType particle, UpdateType effectRate, float hitboxMult)
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, false,

View File

@ -206,7 +206,7 @@ public class StackerManager extends MiniPlugin implements IThrown
UtilAction.velocity(throwee, thrower.getLocation().getDirection(), 1.8, false, 0, 0.3, 2, false);
_projectileManager.AddThrow(throwee, thrower, this, -1, true, false, true, false, 2.4d);
_projectileManager.AddThrow(throwee, thrower, this, -1, true, false, true, false, 0.5f);
//Portal Delay
Manager.SetPortalDelay(thrower);

View File

@ -34,6 +34,7 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.disguise.disguises.DisguisePig;
import mineplex.core.disguise.disguises.DisguisePlayer;
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
@ -120,14 +121,10 @@ public class Illusion extends SkillActive
for (Player other : UtilServer.getPlayers())
if (UtilMath.offset2d(skel, other) < 70)
inRange.add(other);
Player[] disguiseList = new Player[inRange.size()];
for (int i=0 ; i<inRange.size() ; i++)
disguiseList[i] = inRange.get(i);
//Disguise
DisguisePlayer disguise = new DisguisePlayer(skel, ((CraftPlayer)player).getHandle().getProfile());
Factory.Disguise().disguise(disguise, disguiseList);
Factory.Disguise().disguise(disguise, inRange.toArray(new Player[inRange.size()]));
//Invis
Factory.Condition().Factory().Cloak(GetName(), player, player, 2 + 1*level, false, true);

View File

@ -98,20 +98,11 @@ public class BlockToss extends SkillCharge implements IThrown
}
Block grab = event.getClickedBlock();
if (!UtilBlock.solid(grab) || grab.getType() == Material.BEDROCK)
return;
//Recharge
if (!Recharge.Instance.use(player, GetName(), 1000, false, false))
return;
if (grab.getRelative(BlockFace.UP).getType() != Material.AIR)
{
UtilPlayer.message(player, F.main(GetName(), "You cannot grab this block."));
return;
}
//Door
if (grab.getRelative(BlockFace.UP).getTypeId() == 64 || grab.getRelative(BlockFace.UP).getTypeId() == 71)
{
@ -139,7 +130,6 @@ public class BlockToss extends SkillCharge implements IThrown
//Block to Item
FallingBlock block = player.getWorld().spawnFallingBlock(player.getEyeLocation(), event.getClickedBlock().getType(), (byte)0);
Factory.BlockRestore().Add(event.getClickedBlock(), 0, (byte)0, 10000);
//Action
player.eject();
@ -207,7 +197,7 @@ public class BlockToss extends SkillCharge implements IThrown
//Action
UtilAction.velocity(block, cur.getLocation().getDirection(), mult, false, 0, 0, 1, true);
Factory.Projectile().AddThrow(block, cur, this, -1, true, true, true,
null, 0, 0, null, 0, UpdateType.FASTEST, 2.5d);
null, 0, 0, null, 0, UpdateType.FASTEST, 1.2f);
//Event
UtilServer.getServer().getPluginManager().callEvent(new SkillEvent(cur, GetName(), ClassType.Brute));
@ -287,15 +277,7 @@ public class BlockToss extends SkillCharge implements IThrown
_falling.remove(cur);
Block block = cur.getLocation().getBlock();
int id = block.getTypeId();
if (
id != 1 &&
id != 2 &&
id != 3 &&
id != 4 &&
id != 12 &&
id != 13 &&
id != 80)
if (block.getType() != cur.getMaterial())
continue;
block.setTypeIdAndData(0, (byte)0, false);

View File

@ -108,7 +108,7 @@ public class FleshHook extends SkillActiveCharge implements IThrown
1 + charge , false, 0, 0.2, 20, false);
Factory.Projectile().AddThrow(item, cur, this, -1, true, true, true,
Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, UpdateType.TICK, 1.5d);
Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, UpdateType.TICK, 1.2f);
//Inform
UtilPlayer.message(cur, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));

View File

@ -90,7 +90,7 @@ public class AxeThrow extends SkillActive implements IThrown
player.setItemInHand(null);
//Projectile
Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, false, 2.5d);
Factory.Projectile().AddThrow(item, player, this, -1, true, true, true, false, 0.6f);
//Store
_thrown.put(item, player);

View File

@ -70,7 +70,7 @@ public class FreezingBlast extends SkillActive implements IThrown
Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(79));
item.setVelocity(player.getLocation().getDirection());
Factory.Projectile().AddThrow(item, player, this, -1, true, true, true,
Sound.FIZZ, 0.6f, 1.6f, null, 0, UpdateType.FASTEST, 2d);
Sound.FIZZ, 0.6f, 1.6f, null, 0, UpdateType.FASTEST, 1f);
//Inform
UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));

View File

@ -7,8 +7,10 @@ import org.bukkit.block.Block;
import org.bukkit.entity.Item;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
import mineplex.core.itemstack.ItemStackFactory;
@ -25,6 +27,8 @@ import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
public class GlacialBlade extends SkillActive implements IThrown
{
private float radius = 1.5f;
public GlacialBlade(SkillFactory skills, String name, ClassType classType, SkillType skillType,
int cost, int levels,
int energy, int energyMod,
@ -71,7 +75,7 @@ public class GlacialBlade extends SkillActive implements IThrown
Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()).subtract(0, 0.2, 0), ItemStackFactory.Instance.CreateStack(370));
UtilAction.velocity(item, player.getLocation().getDirection(), 1.6, false, 0, 0.2, 10, false);
Factory.Projectile().AddThrow(item, player, this, -1, true, true, true,
null, 0, 0, ParticleType.SNOW_SHOVEL, UpdateType.TICK, 1.5d);
null, 0, 0, ParticleType.SNOW_SHOVEL, UpdateType.TICK, radius);
//Effect
item.getWorld().playSound(item.getLocation(), Sound.ORB_PICKUP, 1f, 2f);
@ -120,4 +124,21 @@ public class GlacialBlade extends SkillActive implements IThrown
{
}
@EventHandler
public void radiusSet(PlayerCommandPreprocessEvent event)
{
if (event.getMessage().startsWith("/gbr "))
{
try
{
radius = Float.parseFloat(event.getMessage().split(" ")[1]);
event.getPlayer().sendMessage("Radius: " + radius);
}
catch(Exception e)
{
event.getPlayer().sendMessage("Radius FAIL: " + radius);
}
}
}
}

View File

@ -48,7 +48,7 @@ public class IcePrison extends SkillActive implements IThrown
{
"Launch an icy orb. When it collides,",
"it creates a hollow sphere of ice",
"thats lasts for #2#1.5 seconds.",
"thats lasts for #1#1.5 seconds.",
});
}
@ -70,8 +70,8 @@ public class IcePrison extends SkillActive implements IThrown
//Action
Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(79));
item.setVelocity(player.getLocation().getDirection());
Factory.Projectile().AddThrow(item, player, this, System.currentTimeMillis() + 2000, true, false, false,
Sound.FIZZ, 0.6f, 1.6f, ParticleType.SNOW_SHOVEL, UpdateType.TICK, 1.5d);
Factory.Projectile().AddThrow(item, player, this, -1, true, true, true,
Sound.FIZZ, 0.6f, 1.6f, ParticleType.SNOW_SHOVEL, UpdateType.TICK, 1.5f);
//Inform
UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));
@ -148,7 +148,7 @@ public class IcePrison extends SkillActive implements IThrown
if (!UtilBlock.airFoliage(freeze))
return;
long time = 4000 + (1500 * level);
long time = 2500 + (1500 * level);
int yDiff = freeze.getY() - mid.getY();

View File

@ -102,7 +102,7 @@ public class LightningOrb extends SkillActive implements IThrown
Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(57));
item.setVelocity(player.getLocation().getDirection());
Factory.Projectile().AddThrow(item, player, this, System.currentTimeMillis() + 5000 - (400 * level), true, false, false,
Sound.FIZZ, 0.6f, 1.6f, ParticleType.FIREWORKS_SPARK, UpdateType.TICK, 2d);
Sound.FIZZ, 0.6f, 1.6f, ParticleType.FIREWORKS_SPARK, UpdateType.TICK, 1f);
//Inform
UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));

View File

@ -160,7 +160,7 @@ public abstract class ItemUsable extends Item implements IThrown
org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(GetType()));
UtilAction.velocity(ent, player.getLocation().getDirection(), _throwPower, false, 0, 0.2, 10, false);
Factory.Throw().AddThrow(ent, player, this, expire, _throwPlayer, _throwBlock, _throwIdle, _throwPickup, 1d);
Factory.Throw().AddThrow(ent, player, this, expire, _throwPlayer, _throwBlock, _throwIdle, _throwPickup, 0.5f);
ThrowCustom(event, ent);
}

View File

@ -116,7 +116,7 @@ import nautilus.game.arcade.shop.ArcadeShop;
public class ArcadeManager extends MiniPlugin implements IRelation
{
// Modules
// Modules
private BlockRestore _blockRestore;
private Blood _blood;
private Chat _chat;

View File

@ -189,7 +189,7 @@ public class Runner extends SoloGame implements IThrown
byte data = block.getData();
MapUtil.QuickChangeBlockAt(block.getLocation(), Material.AIR);
FallingBlock ent = block.getWorld().spawnFallingBlock(block.getLocation(), id, data);
Manager.GetProjectile().AddThrow(ent, null, this, -1, true, false, false, false, 1d);
Manager.GetProjectile().AddThrow(ent, null, this, -1, true, false, false, false, 1f);
blockIterator.remove();
}

View File

@ -152,7 +152,7 @@ public class Stacker extends SoloGame implements IThrown
UtilAction.velocity(throwee, thrower.getLocation().getDirection(), 1.8, false, 0, 0.3, 2, false);
Manager.GetProjectile().AddThrow(throwee, thrower, this, -1, true, false, true, false, 2.4d);
Manager.GetProjectile().AddThrow(throwee, thrower, this, -1, true, false, true, false, 1f);
}
@Override
@ -170,7 +170,7 @@ public class Stacker extends SoloGame implements IThrown
//Hit Own Stack > Rethrow
if (hit.equals(data.GetThrower()))
{
Manager.GetProjectile().AddThrow(data.GetThrown(), data.GetThrower(), this, -1, true, false, true, false, 2.4d);
Manager.GetProjectile().AddThrow(data.GetThrown(), data.GetThrower(), this, -1, true, false, true, false, 1f);
return;
}

View File

@ -85,7 +85,7 @@ public class PerkApple extends Perk implements IThrown
org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.APPLE));
UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 1d);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 0.5f);
}
@Override

View File

@ -57,7 +57,7 @@ public class PerkAxeThrower extends Perk implements IThrown
org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(player.getItemInHand().getType()));
UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 2.5d);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 0.6f);
//Remove Axe
player.setItemInHand(null);

View File

@ -72,7 +72,7 @@ public class PerkBaconBlast extends Perk implements IThrown
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true,
null, 1f, 1f,
null, 1, UpdateType.SLOW,
2d);
0.5f);
//Inform
UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + "."));

View File

@ -60,7 +60,7 @@ public class PerkBlockRestorer extends Perk implements IThrown
org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.COMMAND));
UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, -1, false, false, true, false, 2d);
Manager.GetProjectile().AddThrow(ent, player, this, -1, false, false, true, false, 0.5f);
}
@Override

View File

@ -144,7 +144,7 @@ public class PerkBlockToss extends SmashPerk implements IThrown
//Action
UtilAction.velocity(block, cur.getLocation().getDirection(), mult, false, 0.2, 0, 1, true);
Manager.GetProjectile().AddThrow(block, cur, this, -1, true, true, true,
null, 0, 0, null, 0, UpdateType.FASTEST, 2d);
null, 0, 0, null, 0, UpdateType.FASTEST, 1.5f);
//Event
PerkBlockThrowEvent blockEvent = new PerkBlockThrowEvent(cur);

View File

@ -123,7 +123,7 @@ public class PerkBoneRush extends SmashPerk implements IThrown
{
Item bone = player.getWorld().dropItem(player.getLocation().add(Math.random()*5 - 2.5, Math.random()*3, Math.random()*5 - 2.5), new ItemStack(Material.BONE));
UtilAction.velocity(bone, dir, 0.6 + 0.3 * Math.random(), false, 0, 0.1 + Math.random() * 0.05, 0.3, false);
Manager.GetProjectile().AddThrow(bone, player, this, -1, true, true, true, false, 1d);
Manager.GetProjectile().AddThrow(bone, player, this, -1, true, true, true, false, 0.5f);
}
}
}

View File

@ -78,7 +78,7 @@ public class PerkCowBomb extends Perk implements IThrown
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true,
null, 1f, 1f,
null, 1, UpdateType.SLOW,
2d);
0.5f);
//Inform
UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + "."));

View File

@ -79,7 +79,7 @@ public class PerkCreeperSulphurBomb extends SmashPerk implements IThrown
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true,
null, 1f, 1f,
null, 1, UpdateType.SLOW,
2.5d);
0.5f);
//Inform
UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + "."));

View File

@ -79,7 +79,7 @@ public class PerkHammerThrow extends Perk implements IThrown
UtilAction.velocity(item, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, true);
//Projectile
Manager.GetProjectile().AddThrow(item, player, this, -1, true, true, true, false, 2.5d);
Manager.GetProjectile().AddThrow(item, player, this, -1, true, true, true, false, 0.6f);
//Store
_thrown.put(item, player);

View File

@ -87,7 +87,7 @@ public class PerkInkBlast extends SmashPerk implements IThrown
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true,
null, 1f, 1f,
Effect.SMOKE, 4, UpdateType.TICK,
2d);
0.5f);
}
//Inform

View File

@ -64,7 +64,7 @@ public class PerkIronHook extends Perk implements IThrown
1.8, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(item, player, this, -1, true, true, true,
Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, null, 0, UpdateType.TICK, 2d);
Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, null, 0, UpdateType.TICK, 1f);
//Inform
UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + "."));

View File

@ -89,7 +89,7 @@ public class PerkPigBaconBounce extends SmashPerk implements IThrown
//Launch
Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.PORK));
UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 1d);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 1f);
ent.setPickupDelay(9999);
//Sound

View File

@ -99,7 +99,7 @@ public class PerkRevealer extends Perk implements IThrown
Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.DIAMOND));
UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 1d);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 0.5f);
}
@EventHandler

View File

@ -194,7 +194,7 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
UtilAction.velocity(slime, player.getLocation().getDirection(), 1 + charge/2d, false, 0, 0.2, 10, true);
Manager.GetProjectile().AddThrow(slime, player, this, -1, true, true, true,
null, 0, 0, null, 0, UpdateType.FASTEST, 2d);
null, 0, 0, null, 0, UpdateType.FASTEST, 1f);
}
@EventHandler

View File

@ -69,7 +69,7 @@ public class PerkThrower extends Perk implements IThrown
//Throw
UtilAction.velocity(throwee, thrower.getLocation().getDirection(), 1.4, false, 0, 0.3, 0.8, true);
Manager.GetProjectile().AddThrow(throwee, thrower, this, -1, true, false, true, false, 2d);
Manager.GetProjectile().AddThrow(throwee, thrower, this, -1, true, false, true, false, 1f);
//Audio
thrower.getWorld().playSound(thrower.getLocation(), Sound.SHEEP_IDLE, 2f, 3f);

View File

@ -97,7 +97,7 @@ public class PerkWeb extends Perk implements IThrown
org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.WEB));
UtilAction.velocity(ent, player.getLocation().getDirection(), 0.8, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 1d);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 0.5f);
}
@Override

View File

@ -76,7 +76,7 @@ public class PerkWebShot extends SmashPerk implements IThrown
random.multiply(0.2);
UtilAction.velocity(ent, player.getLocation().getDirection().multiply(-1).add(random), 1 + Math.random() * 0.4, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 2d);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 0.5f);
}
//Inform

View File

@ -72,7 +72,7 @@ public class PerkWitherWeb extends Perk implements IThrown
random.multiply(0.25);
UtilAction.velocity(ent, player.getLocation().getDirection().add(random), 1 + Math.random() * 0.4, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 2d);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 0.5f);
}
//Inform

View File

@ -108,7 +108,7 @@ public class PerkWoolBomb extends Perk implements IThrown
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true,
null, 1f, 1f,
null, 1, UpdateType.SLOW,
2d);
0.5f);
_thrown.put(player, ent);

View File

@ -100,7 +100,7 @@ public class PerkZombieBile extends SmashPerk implements IThrown
org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()).subtract(0, 0.5, 0), ItemStackFactory.Instance.CreateStack(Material.ROTTEN_FLESH));
UtilAction.velocity(ent, player.getLocation().getDirection().add(rand), 0.8, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, System.currentTimeMillis() + 2000, true, true, true, false, 1.5d);
Manager.GetProjectile().AddThrow(ent, player, this, System.currentTimeMillis() + 2000, true, true, true, false, 0.5f);
}
}
}

View File

@ -337,6 +337,9 @@ public class HolidayManager implements Listener
@EventHandler
public void coinPickup(PlayerPickupItemEvent event)
{
if (UtilPlayer.isSpectator(event.getPlayer()))
return;
if (_coins.contains(event.getItem()))
{
event.setCancelled(true);
@ -352,8 +355,6 @@ public class HolidayManager implements Listener
event.setCancelled(true);
}
}
@EventHandler
public void itemClean(UpdateEvent event)