Some additional bug fixes were applied on the previous commit.
Water damage by TNT on game lobbies is now patched.
This commit is contained in:
parent
50a8191fcb
commit
c2518bc6c4
@ -14,7 +14,11 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.ItemGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -40,6 +44,7 @@ public class ItemTNT extends ItemGadget
|
||||
public void ActivateCustom(Player player)
|
||||
{
|
||||
TNTPrimed tnt = player.getWorld().spawn(player.getEyeLocation().add(player.getLocation().getDirection()), TNTPrimed.class);
|
||||
tnt.setYield(0.0F); // Added in order to prevent water from being evaporated.
|
||||
UtilAction.velocity(tnt, player.getLocation().getDirection(), 0.6, false, 0, 0.2, 1, false);
|
||||
_tnt.add(tnt);
|
||||
|
||||
@ -58,7 +63,7 @@ public class ItemTNT extends ItemGadget
|
||||
|
||||
HashMap<Player, Double> players = UtilPlayer.getInRadius(event.getLocation(), 10);
|
||||
for (Player player : players.keySet())
|
||||
{
|
||||
{
|
||||
if (Manager.collideEvent(this, player))
|
||||
continue;
|
||||
|
||||
@ -67,6 +72,9 @@ public class ItemTNT extends ItemGadget
|
||||
//Knockback
|
||||
UtilAction.velocity(player, UtilAlg.getTrajectory(event.getLocation(), player.getLocation()), 3 * mult, false, 0, 0.5 + 2 * mult, 10, true);
|
||||
}
|
||||
|
||||
// Simulating explosion to prevent water from being evaporated.
|
||||
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, event.getLocation(), 0, 0, 0, 0, 1, ViewDist.NORMAL, UtilServer.getPlayers());
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,6 +11,7 @@ import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.minestrike.MineStrike;
|
||||
import nautilus.game.arcade.game.games.minestrike.Radio;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -78,7 +79,10 @@ public abstract class FireGrenadeBase extends Grenade
|
||||
public void run()
|
||||
{
|
||||
if (round == game.getRound() && !game.isFreezeTime())
|
||||
game.Manager.GetBlockRestore().Add(block, 51, (byte)0, (long) (_baseTime + blocks.get(block) * _baseTime));
|
||||
{
|
||||
double time = _baseTime + blocks.get(block) * _baseTime;
|
||||
game.Manager.GetBlockRestore().Add(block, 51, (byte)0, (long) time);
|
||||
}
|
||||
}
|
||||
}, 60 - (int)(60d * blocks.get(block)));
|
||||
}
|
||||
|
@ -48,9 +48,12 @@ import mineplex.core.common.util.MapUtil;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilBlockText;
|
||||
import mineplex.core.common.util.UtilBlockText.TextAlign;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
@ -1297,7 +1300,7 @@ public class GameLobbyManager implements Listener, IPacketHandler
|
||||
|
||||
if (Manager.GetGame().GetState() == GameState.Live)
|
||||
return;
|
||||
|
||||
|
||||
event.blockList().clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user