Update projectile manager usage on challenges.

This commit is contained in:
Thanos paravantis 2015-11-11 14:06:32 +02:00
parent d93c2c7108
commit 1830d5eaa3
3 changed files with 3 additions and 9 deletions

View File

@ -94,8 +94,6 @@ public class MineWare extends SoloGame implements IThrown
GiveClock = false;
// Welcome Thanos
VersionRequire1_8 = true; // due to features that's limited to 1.8
Manager.GetCreature().SetDisableCustomDrops(true);
PopulateOrders();

View File

@ -149,7 +149,7 @@ public class ChallengeBlockLobbers extends Challenge
UtilInv.remove(event.getPlayer(), event.getPlayer().getItemInHand().getType(), (byte) 0, 1);
UtilAction.velocity(fBlock, event.getPlayer().getLocation().getDirection(), 1.5, false, 0.0, 0.3, 10.0, true);
Host.Manager.GetProjectile().AddThrow(fBlock, event.getPlayer(), Host, -1, true, false, true, 0.2f);
Host.Manager.GetProjectile().AddThrow(fBlock, event.getPlayer(), Host, -1, true, false, true, false, 0.2f);
}
@EventHandler

View File

@ -2,18 +2,13 @@ package nautilus.game.arcade.game.games.mineware.challenges;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.ListIterator;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilShapes;
import mineplex.core.projectile.ProjectileUser;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.game.games.mineware.Challenge;
import nautilus.game.arcade.game.games.mineware.MineWare;
import nautilus.game.arcade.game.games.mineware.events.challengeEndEvent;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
@ -240,8 +235,9 @@ public class ChallengeWaveCrush extends Challenge
}
FallingBlock fBlock = Host.WorldData.World.spawnFallingBlock(theBlock.getLocation().clone().add(0, 1, 0), theBlock.getType(),
theBlock.getData());
Host.Manager.GetProjectile().AddThrow(fBlock, null, Host, 1, true, false, true, false, 0.2f);
Host.Manager.GetProjectile().AddThrow(fBlock, null, Host, -1, true, false, true, 0.2f);
fBlock.setVelocity(new Vector(0, 10, 0).normalize());
theBlock.setType(Material.AIR);
theBlock = Host.WorldData.World.getBlockAt(theBlock.getX() - 1, theBlock.getY(), theBlock.getZ());