Lots of work.

This commit is contained in:
Mysticate 2015-09-26 23:18:05 -04:00
parent 9350386361
commit 54eca7fa9e
9 changed files with 574 additions and 421 deletions

View File

@ -12,7 +12,6 @@ import mineplex.core.common.util.UtilMath;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
public class MMMazes
{
@ -190,30 +189,14 @@ public class MMMazes
for (Location loc : _spawns)
{
Location mod = loc.clone();
for (int i = 0 ; i < 3 ; i++)
{
mod.subtract(0, 1, 0).getBlock().setType(Material.GOLD_BLOCK);
}
loc.clone().subtract(0, 1, 0).getBlock().setType(Material.REDSTONE_BLOCK);
}
for(Location loc : _centerSafeZone)
for (Location loc : _centerSafeZone)
{
for (int i = 0 ; i < 3 ; i++)
{
Block cur = loc.clone().subtract(0, i, 0).getBlock();
cur.getRelative(BlockFace.DOWN).setType(Material.STAINED_CLAY);
cur.getRelative(BlockFace.DOWN).setData((byte) 5);
}
loc.clone().subtract(0, 1, 0).getBlock().setTypeIdAndData(159, (byte) 5, true);
}
// for(Location loc : _safeZones)
// {
// loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.STAINED_CLAY);
// loc.getBlock().getRelative(BlockFace.DOWN).setData((byte) 5);
// }
_built = true;
}
@ -291,6 +274,210 @@ public class MMMazes
//6 = paths through safe barrier
private static final int[][] M1 = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
};
}

View File

@ -10,7 +10,6 @@ import java.util.Set;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilBlock;
@ -20,7 +19,11 @@ import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.DisguiseFactory;
@ -31,13 +34,18 @@ import mineplex.core.disguise.disguises.DisguiseSnowman;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.games.monstermaze.MMMazes.MazePreset;
import nautilus.game.arcade.game.games.monstermaze.MazeMobWaypoint.CardinalDirection;
import nautilus.game.arcade.game.games.monstermaze.events.AbilityUseEvent;
import nautilus.game.arcade.game.games.monstermaze.events.FirstToSafepadEvent;
import nautilus.game.arcade.game.games.monstermaze.events.MonsterBumpPlayerEvent;
import nautilus.game.arcade.game.games.monstermaze.events.SafepadBuildEvent;
import nautilus.game.arcade.game.games.monstermaze.events.SnowmanHitEvent;
import nautilus.game.arcade.game.games.monstermaze.kits.KitSmasher;
import net.minecraft.server.v1_7_R4.Packet;
import net.minecraft.server.v1_7_R4.PacketPlayOutAnimation;
import net.minecraft.server.v1_7_R4.PacketPlayOutBlockBreakAnimation;
import org.bukkit.Bukkit;
import org.bukkit.Color;
@ -53,7 +61,10 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Snowman;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.block.EntityBlockFormEvent;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerInteractEvent;
@ -67,8 +78,9 @@ public class Maze implements Listener
private ArrayList<Location> _goals;
private ArrayList<Location> _centerSafeZone;
private int _centerSafeZoneDecay = 11;
private ArrayList<Location> _centerSafeZonePaths;
private NautHashMap<Location, Long> _centerSafeZoneDecay = new NautHashMap<Location, Long>();
// private NautHashMap<Location, Long> _centerSafeZoneDecay = new NautHashMap<Location, Long>();
private HashSet<Block> _waypoints;
private HashSet<Block> _disabledWaypoints;
@ -86,8 +98,8 @@ public class Maze implements Listener
private ArrayList<Player> _playersOnPad = new ArrayList<Player>();
private double _phaseTimer = 60;
private double _phaseTimerStart = 60;
private int _phaseTimer = 60;
private int _phaseTimerStart = 60;
private SafePad _nextSafePad;
@ -126,7 +138,7 @@ public class Maze implements Listener
for(Location loc : _playerContainmentUnitLocations)
{
loc.getBlock().setType(Material.STAINED_GLASS);
loc.getBlock().setData((byte)3);
loc.getBlock().setData((byte) 5);
}
_center = maze.getCenter();
@ -134,6 +146,11 @@ public class Maze implements Listener
_safePad = _nextSafePad;
_nextSafePad = null;
for (Player player : Host.GetPlayers(true))
{
player.setCompassTarget(_safePad.getLocation());
}
Bukkit.getPluginManager().registerEvents(this, Host.Manager.getPlugin());
}
@ -170,23 +187,6 @@ public class Maze implements Listener
bump();
removeMobsOnSafePad();
}
@EventHandler
public void updateFaster(UpdateEvent event)
{
if (event.getType() != UpdateType.FASTER)
return;
if (!Host.IsLive())
return;
decrementPhaseTime();
if (UtilTime.elapsed(Host.getGameLiveTime(), 15000))
{
deteriorateCenter();
}
}
@EventHandler
public void updateSecond(UpdateEvent event)
@ -198,6 +198,12 @@ public class Maze implements Listener
return;
decrementSafePadTime();
decrementPhaseTime();
if (UtilTime.elapsed(Host.getGameLiveTime(), 20000))
{
deteriorateCenter();
}
}
@EventHandler
@ -209,6 +215,11 @@ public class Maze implements Listener
if (!Host.IsLive())
return;
// if (UtilTime.elapsed(Host.getGameLiveTime(), 15000))
// {
// deteriorateCenter();
// }
if (_safePad == null)
{
for (Player p : Host.GetPlayers(true))
@ -294,7 +305,19 @@ public class Maze implements Listener
DamageCause.ENTITY_ATTACK, 4, false, false, false,
"Monster", "Monster Attack");
Bukkit.getPluginManager().callEvent(new SnowmanHitEvent(player));
PacketPlayOutAnimation animation = new PacketPlayOutAnimation();
animation.a = ent.getEntityId();
animation.b = 0;
for (Player cur : UtilServer.getPlayers())
{
for (int i = 0 ; i < 3 ; i++)
{
UtilPlayer.sendPacket(cur, animation);
}
}
Bukkit.getPluginManager().callEvent(new MonsterBumpPlayerEvent(player));
}
}
}
@ -472,8 +495,8 @@ public class Maze implements Listener
Location loc = UtilAlg.Random(validSpawns);
Host.CreatureAllowOverride = true;
Entity ent = loc.getWorld().spawn(loc, Snowman.class);
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
DisguiseBase disguise = DisguiseFactory.createDisguise(ent, Host.getMonsterType());
if (disguise instanceof DisguiseSlime)
@ -488,7 +511,7 @@ public class Maze implements Listener
Host.CreatureAllowOverride = false;
UtilEnt.Vegetate(ent);
UtilEnt.Vegetate(ent, true);
UtilEnt.ghost(ent, true, false);
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));
@ -510,8 +533,8 @@ public class Maze implements Listener
while (spawned <= numToSpawn)
{
Host.CreatureAllowOverride = true;
Entity ent = loc.getWorld().spawn(loc, Snowman.class);
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
DisguiseBase disguise = DisguiseFactory.createDisguise(ent, Host.getMonsterType());
if (disguise instanceof DisguiseSlime)
@ -526,7 +549,7 @@ public class Maze implements Listener
Host.CreatureAllowOverride = false;
UtilEnt.Vegetate(ent);
UtilEnt.Vegetate(ent, true);
UtilEnt.ghost(ent, true, false);
_ents.put(ent, new MazeMobWaypoint(ent.getLocation()));
@ -541,13 +564,50 @@ public class Maze implements Listener
private Location pickNextLocForSafePad() // short method name
{
if (!_oldSafePads.isEmpty())
if (_safePad != null || !_oldSafePads.isEmpty())
{
return UtilAlg.findFurthest(_oldSafePads.getFirst().getLocation(), _goals);
ArrayList<Location> best = new ArrayList<Location>();
ArrayList<Location> toAvoid = new ArrayList<Location>();
for (SafePad pad : _oldSafePads)
{
toAvoid.add(pad.getLocation());
}
if (_safePad != null)
{
toAvoid.add(_safePad.getLocation());
}
for (Location pos : _goals)
{
boolean canAdd = true;
for (Location avoid : toAvoid)
{
if (UtilMath.offset(pos, avoid) < 40)
{
canAdd = false;
}
}
if (canAdd)
{
best.add(pos);
}
}
if (best.isEmpty())
{
return UtilAlg.findFurthest(_center, _goals);
}
else
{
return UtilAlg.Random(best);
}
}
else
{
return _goals.get(UtilMath.r(_goals.size()));
return UtilAlg.findFurthest(_center, _goals);
}
}
@ -565,132 +625,207 @@ public class Maze implements Listener
public void spawnSafePad()
{
_disabledWaypoints.clear();
final Maze instance = this;
//Delay
_nextSafePad = new SafePad(Host, instance, pickNextLocForSafePad().clone().subtract(0, 1, 0)); // maybe don't need to clone()
_nextSafePad = new SafePad(Host, this, pickNextLocForSafePad().clone().subtract(0, 1, 0)); // maybe don't need to clone()
_nextSafePad.build();
// addSafeZone();
_curSafe++;
Iterator<Block> iter = _waypoints.iterator();
while (iter.hasNext()) {
Block b = iter.next();
if (UtilBlock.getInBoundingBox(_nextSafePad.getLocation().clone().add(2, 0, 2), _nextSafePad.getLocation().clone().add(-2, 0, -2)).contains(b.getRelative(BlockFace.DOWN)))
{
_disabledWaypoints.add(b);
iter.remove();
}
}
Iterator<Entity> it = _ents.keySet().iterator();
while (it.hasNext()) {
Entity e = it.next();
if (_nextSafePad.isOn(e))
{
_ents.remove(_ents.get(e));
it.remove();
e.remove();
}
}
Bukkit.getPluginManager().callEvent(new SafepadBuildEvent());
}
@SuppressWarnings("deprecation")
public void deteriorateCenter()
{
if (_centerSafeZone.isEmpty() && _centerSafeZoneDecay.isEmpty())
if (_centerSafeZone.isEmpty() || _centerSafeZoneDecay == -1
// && _centerSafeZoneDecay.isEmpty()
)
return;
if (!_centerSafeZone.isEmpty())
_centerSafeZoneDecay--;
ArrayList<Packet> toSend = new ArrayList<Packet>();
int ind = 0;
Iterator<Location> iterator = _centerSafeZone.iterator();
while (iterator.hasNext())
{
Location toBreak = _centerSafeZone.remove(UtilMath.r(_centerSafeZone.size()));
Location cur = iterator.next();
Location loc = cur.clone().subtract(0, 1, 0);
if(_centerSafeZoneDecay == 10)
{
loc.getBlock().setTypeIdAndData(159, (byte) 5, true);
toSend.add(getBreakPacket(loc, ind, 1));
}
else if(_centerSafeZoneDecay == 9)
{
toSend.add(getBreakPacket(loc, ind, 2));
}
else if(_centerSafeZoneDecay == 8)
{
loc.getBlock().setTypeIdAndData(159, (byte) 4, true);
toSend.add(getBreakPacket(loc, ind, 3));
}
else if(_centerSafeZoneDecay == 7)
{
toSend.add(getBreakPacket(loc, ind, 4));
}
else if(_centerSafeZoneDecay == 6)
{
loc.getBlock().setTypeIdAndData(159, (byte) 1, true);
toSend.add(getBreakPacket(loc, ind, 5));
}
else if(_centerSafeZoneDecay == 5)
{
toSend.add(getBreakPacket(loc, ind, 6));
}
else if(_centerSafeZoneDecay == 4)
{
loc.getBlock().setTypeIdAndData(159, (byte) 14, true);
toSend.add(getBreakPacket(loc, ind, 7));
}
else if(_centerSafeZoneDecay == 3)
{
toSend.add(getBreakPacket(loc, ind, 8));
}
else if(_centerSafeZoneDecay == 2)
{
toSend.add(getBreakPacket(loc, ind, 9));
}
else if(_centerSafeZoneDecay == 1)
{
toSend.add(getBreakPacket(loc, ind, -1));
iterator.remove();
loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 152);
if (_centerSafeZonePaths.contains(cur))
{
if (!_waypoints.contains(cur.getBlock()))
_waypoints.add(cur.getBlock());
if (!_map.contains(cur))
_map.add(cur);
if (!_goals.contains(_center))
_goals.add(_center);
_centerSafeZonePaths.remove(cur);
_preset.buildMazeBlockAt(cur);
}
else
{
loc.getBlock().setTypeIdAndData(0, (byte) 0, true);
}
}
if (_centerSafeZonePaths.contains(toBreak))
if (_centerSafeZoneDecay != 1)
{
if (!_waypoints.contains(toBreak.getBlock()))
_waypoints.add(toBreak.getBlock());
if (!_map.contains(toBreak))
_map.add(toBreak);
_centerSafeZonePaths.remove(toBreak);
_preset.buildMazeBlockAt(toBreak);
for (int i = 0 ; i < 3 ; i++)
{
Location cur = toBreak.clone().subtract(0, i, 0);
cur.getWorld().playEffect(cur, Effect.STEP_SOUND, cur.getBlock().getTypeId());
}
}
else
{
_centerSafeZoneDecay.put(toBreak, System.currentTimeMillis());
UtilParticle.PlayParticle(ParticleType.BLOCK_DUST.getParticle(Material.STAINED_CLAY, loc.getBlock().getData()), loc.clone().add(0, .2, 0), 0.5f, 0.5f, 0.5f, 0.05f, 8, ViewDist.NORMAL, Host.GetPlayers(false).toArray(new Player[Host.GetPlayers(false).size()]));
}
ind++;
}
if (!_centerSafeZoneDecay.isEmpty())
for (Player p : UtilServer.getPlayers())
{
NautHashMap<Location, Long> copy = new NautHashMap<Location, Long>(_centerSafeZoneDecay);
for (Entry<Location, Long> entry : copy.entrySet())
{
if (UtilTime.elapsed(entry.getValue(), 1250)) //break
{
for (int i = 1 ; i < 4 ; i++)
{
Location cur = entry.getKey().clone().subtract(0, i, 0);
cur.getWorld().playEffect(cur, Effect.STEP_SOUND, 152);
cur.getBlock().setTypeIdAndData(0, (byte) 0, true);
}
_centerSafeZonePaths.remove(entry.getKey());
_centerSafeZoneDecay.remove(entry.getKey());
continue;
}
else if (UtilTime.elapsed(entry.getValue(), 1000)) //red
{
for (int i = 1 ; i < 4 ; i++)
{
Location cur = entry.getKey().clone().subtract(0, i, 0);
cur.getBlock().setTypeIdAndData(159, (byte) 14, true);
}
continue;
}
else if (UtilTime.elapsed(entry.getValue(), 750)) //orange
{
for (int i = 1 ; i < 3 ; i++)
{
Location cur = entry.getKey().clone().subtract(0, i, 0);
cur.getBlock().setTypeIdAndData(159, (byte) 1, true);
}
continue;
}
else if (UtilTime.elapsed(entry.getValue(), 500)) //yellow
{
for (int i = 1 ; i < 4 ; i++)
{
Location cur = entry.getKey().clone().subtract(0, i, 0);
cur.getBlock().setTypeIdAndData(159, (byte) 4, true);
}
continue;
}
else if (UtilTime.elapsed(entry.getValue(), 250)) //blue
{
for (int i = 1 ; i < 4 ; i++)
{
Location cur = entry.getKey().clone().subtract(0, i, 0);
cur.getBlock().setTypeIdAndData(159, (byte) 3, true);
}
continue;
}
}
UtilPlayer.sendPacket(p, toSend.toArray(new Packet[toSend.size()]));
}
if (_centerSafeZoneDecay == 1)
{
_centerSafeZoneDecay = -1;
}
// if (!_centerSafeZone.isEmpty())
// {
// Location toBreak = _centerSafeZone.remove(UtilMath.r(_centerSafeZone.size()));
//
// if (_centerSafeZonePaths.contains(toBreak))
// {
// if (!_waypoints.contains(toBreak.getBlock()))
// _waypoints.add(toBreak.getBlock());
//
// if (!_map.contains(toBreak))
// _map.add(toBreak);
//
// _centerSafeZonePaths.remove(toBreak);
// _preset.buildMazeBlockAt(toBreak);
//
// for (int i = 0 ; i < 3 ; i++)
// {
// Location cur = toBreak.clone().subtract(0, i, 0);
// cur.getWorld().playEffect(cur, Effect.STEP_SOUND, cur.getBlock().getTypeId());
// }
// }
// else
// {
// _centerSafeZoneDecay.put(toBreak, System.currentTimeMillis());
// }
// }
//
// if (!_centerSafeZoneDecay.isEmpty())
// {
// NautHashMap<Location, Long> copy = new NautHashMap<Location, Long>(_centerSafeZoneDecay);
//
// for (Entry<Location, Long> entry : copy.entrySet())
// {
// if (UtilTime.elapsed(entry.getValue(), 1250)) //break
// {
// for (int i = 1 ; i < 4 ; i++)
// {
// Location cur = entry.getKey().clone().subtract(0, i, 0);
// cur.getWorld().playEffect(cur, Effect.STEP_SOUND, 152);
// cur.getBlock().setTypeIdAndData(0, (byte) 0, true);
// }
//
// _centerSafeZonePaths.remove(entry.getKey());
// _centerSafeZoneDecay.remove(entry.getKey());
// continue;
// }
// else if (UtilTime.elapsed(entry.getValue(), 1000)) //red
// {
// for (int i = 1 ; i < 4 ; i++)
// {
// Location cur = entry.getKey().clone().subtract(0, i, 0);
// cur.getBlock().setTypeIdAndData(159, (byte) 14, true);
// }
// continue;
// }
// else if (UtilTime.elapsed(entry.getValue(), 750)) //orange
// {
// for (int i = 1 ; i < 3 ; i++)
// {
// Location cur = entry.getKey().clone().subtract(0, i, 0);
// cur.getBlock().setTypeIdAndData(159, (byte) 1, true);
// }
// continue;
// }
// else if (UtilTime.elapsed(entry.getValue(), 500)) //yellow
// {
// for (int i = 1 ; i < 4 ; i++)
// {
// Location cur = entry.getKey().clone().subtract(0, i, 0);
// cur.getBlock().setTypeIdAndData(159, (byte) 4, true);
// }
// continue;
// }
// else if (UtilTime.elapsed(entry.getValue(), 250)) //blue
// {
// for (int i = 1 ; i < 4 ; i++)
// {
// Location cur = entry.getKey().clone().subtract(0, i, 0);
// cur.getBlock().setTypeIdAndData(159, (byte) 3, true);
// }
// continue;
// }
// }
// }
}
private Packet getBreakPacket(Location location, int index, int progress)
{
return new PacketPlayOutBlockBreakAnimation(index, location.getBlockX(), location.getBlockY(), location.getBlockZ(), progress);
}
public void decrementSafePadTime()
@ -702,7 +837,6 @@ public class Maze implements Listener
if (pad.decay())
{
//TODO Deal with all this waypoint stuff
if(_oldDisabledWaypoints.size() > 0)
{
for(Block b : _oldDisabledWaypoints)
@ -724,7 +858,7 @@ public class Maze implements Listener
if(_phaseTimer == -1) return;
_phaseTimer -= .25;
_phaseTimer--;
if(_phaseTimer == 20) // only gets to this by running out of time naturally, not by player
{
UtilTextMiddle.display("", C.cGreen + C.Bold + (int) _phaseTimer, 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()]));
@ -748,6 +882,7 @@ public class Maze implements Listener
if(_phaseTimer == 2)
{
UtilTextMiddle.display("", C.cGold + C.Bold + (int) _phaseTimer, 5, 40, 5, Host.GetPlayers(true).toArray(new Player[Host.GetPlayers(true).size()]));
spawnSafePad();
}
if(_phaseTimer == 1)
@ -770,23 +905,59 @@ public class Maze implements Listener
Host.Manager.GetDamage().NewDamageEvent(p, null, null,
DamageCause.CUSTOM, 500, false, false, false,
"Game", "Map damage");
UtilTextMiddle.display("", C.cRed + C.Bold + "You didn't make it to the Safe Pad!", 5, 40, 5, p);
UtilPlayer.message(p, F.main("Game", "You didn't make it to the Safe Pad!"));
UtilTextMiddle.display("", C.cRed + C.Bold + "You weren't on the Safe Pad!", 5, 40, 5, p);
UtilPlayer.message(p, F.main("Game", "You weren't on the Safe Pad!"));
}
}
spawn(15);
stopSafePad();
_playersOnPad.clear();
//_phaseTimer = -1;
_phaseTimerStart = 60 - (_curSafe * 3);
_phaseTimerStart = Math.max(15, 60 - (_curSafe * 2));
_phaseTimer = _phaseTimerStart;
spawnSafePad();
if (_nextSafePad == null)
{
spawnSafePad();
}
_disabledWaypoints.clear();
Iterator<Block> iter = _waypoints.iterator();
while (iter.hasNext())
{
Block b = iter.next();
if (UtilBlock.getInBoundingBox(_nextSafePad.getLocation().clone().add(2, 0, 2), _nextSafePad.getLocation().clone().add(-2, 0, -2)).contains(b.getRelative(BlockFace.DOWN)))
{
_disabledWaypoints.add(b);
iter.remove();
}
}
Iterator<Entity> it = _ents.keySet().iterator();
while (it.hasNext())
{
Entity e = it.next();
if (_nextSafePad.isOn(e))
{
_ents.remove(_ents.get(e));
it.remove();
e.remove();
}
}
_curSafe++;
_safePad = _nextSafePad;
_nextSafePad = null;
for (Player player : Host.GetPlayers(true))
{
player.setCompassTarget(_safePad.getLocation());
}
}
}
@ -846,7 +1017,7 @@ public class Maze implements Listener
if (allOn)
{
_phaseTimer = Math.min(4.0, _phaseTimer);
_phaseTimer = Math.min(4, _phaseTimer);
}
}
@ -909,8 +1080,29 @@ public class Maze implements Listener
return _ents.keySet();
}
public double getPhaseTimer()
public int getPhaseTimer()
{
return _phaseTimer;
}
@EventHandler
public void onGameStateDead(GameStateChangeEvent event)
{
if (event.GetState() != GameState.Dead)
return;
HandlerList.unregisterAll(this);
}
@EventHandler
public void onSnowForm(EntityBlockFormEvent event)
{
event.setCancelled(true);
}
@EventHandler
public void onEntityCombust(EntityCombustEvent event)
{
event.setCancelled(true);
}
}

View File

@ -33,11 +33,7 @@ import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.Snowman;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.EntityBlockFormEvent;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.scoreboard.Team;
@ -78,7 +74,7 @@ public class MonsterMaze extends SoloGame
this.PrepareFreeze = false;
this.HungerSet = 20;
registerStatTrackers(
new SnowmanHitTracker(this),
new AbilityUseTracker(this),
@ -118,10 +114,6 @@ public class MonsterMaze extends SoloGame
_maze.fillSpawn(150);
}
else if (event.GetState() == GameState.End)
{
HandlerList.unregisterAll(getMaze());
}
}
private EntityType loadEntityType()
@ -257,20 +249,6 @@ public class MonsterMaze extends SoloGame
}
}
@EventHandler
public void antisnow(EntityBlockFormEvent e)
{
if(e.getEntity() instanceof Snowman)
if(e.getNewState().getType().equals(Material.SNOW))
e.setCancelled(true);
}
@EventHandler
public void onEntityCombust(EntityCombustEvent event)
{
event.setCancelled(true);
}
public EntityType getMonsterType()
{
return _monsterType;

View File

@ -285,7 +285,7 @@ public class SafePad
{
for (final SafePadBlock bl : _blocks)
{
if (bl.getBlockMaterial() == Material.QUARTZ_BLOCK || bl.getBlockMaterial() == Material.QUARTZ_STAIRS)
if (bl.getBlockMaterial() == Material.QUARTZ_BLOCK || bl.getBlockMaterial() == Material.QUARTZ_STAIRS || bl.getBlockMaterial() == Material.AIR)
{
bl.restore();
}

View File

@ -4,7 +4,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
public class SnowmanHitEvent extends PlayerEvent
public class MonsterBumpPlayerEvent extends PlayerEvent
{
/**
* @author Mysticate
@ -23,7 +23,7 @@ public class SnowmanHitEvent extends PlayerEvent
return getHandlerList();
}
public SnowmanHitEvent(Player player)
public MonsterBumpPlayerEvent(Player player)
{
super(player);
}

View File

@ -1,6 +1,7 @@
package nautilus.game.arcade.game.games.monstermaze.kits;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.Kit;
@ -41,6 +42,7 @@ public class KitJumper extends Kit
@Override
public void GiveItems(Player player)
{
player.getInventory().setItem(0, ItemStackFactory.Instance.CreateStack(Material.COMPASS, (byte) 0, 1, F.item("Safe Pad Locator")));
player.getInventory().setItem(8, ItemStackFactory.Instance.CreateStack(Material.FEATHER, (byte)0, 5, C.cYellow + C.Bold + 5 + " Jumps Remaining"));
}
}

View File

@ -41,7 +41,7 @@ public class KitSmasher extends Kit
@Override
public void GiveItems(Player player)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.COAL, (byte)0, 3,
C.cYellow + C.Bold + "Right Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Smash"));
player.getInventory().setItem(0, ItemStackFactory.Instance.CreateStack(Material.COMPASS, (byte) 0, 1, F.item("Safe Pad Locator")));
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.COAL, (byte) 0, 3, C.cYellow + C.Bold + "Right Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Smash"));
}
}

View File

@ -8,7 +8,7 @@ import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.game.games.monstermaze.MonsterMaze;
import nautilus.game.arcade.game.games.monstermaze.events.SnowmanHitEvent;
import nautilus.game.arcade.game.games.monstermaze.events.MonsterBumpPlayerEvent;
import nautilus.game.arcade.stats.StatTracker;
import org.bukkit.entity.Player;
@ -28,7 +28,7 @@ public class PilotTracker extends StatTracker<MonsterMaze>
}
@EventHandler
public void onSnowmanHit(SnowmanHitEvent event)
public void onSnowmanHit(MonsterBumpPlayerEvent event)
{
if (!getGame().IsLive())
return;

View File

@ -6,7 +6,7 @@ import java.util.List;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.games.monstermaze.MonsterMaze;
import nautilus.game.arcade.game.games.monstermaze.events.SnowmanHitEvent;
import nautilus.game.arcade.game.games.monstermaze.events.MonsterBumpPlayerEvent;
import nautilus.game.arcade.stats.StatTracker;
import org.bukkit.entity.Player;
@ -27,7 +27,7 @@ public class SnowmanHitTracker extends StatTracker<MonsterMaze>
}
@EventHandler
public void onSnowmanHit(SnowmanHitEvent event)
public void onSnowmanHit(MonsterBumpPlayerEvent event)
{
if (!getGame().IsLive())
return;