Fishing Day and Anvil Dance fixes and minor changes.
- Changed TNT spawn criteria, now only spawning while fishing hook is in water. - Changed grass on Fishing Day map, excluded possible spawn locations that are included in spawn points. - Fixed fireworks from Anvil Dance spawning on other challenges.
This commit is contained in:
parent
d4fd466029
commit
d7bef0d117
|
@ -198,37 +198,40 @@ public class MineWare extends SoloGame implements IThrown
|
|||
public void PopulateOrders()
|
||||
{
|
||||
_challenges.add(ChallengeAnvilDance.class);
|
||||
_challenges.add(ChallengeFallingBlocks.class);
|
||||
_challenges.add(ChallengeWaveCrush.class);
|
||||
_challenges.add(ChallengePickASide.class);//
|
||||
_challenges.add(ChallengeKOTL.class);
|
||||
_challenges.add(ChallengePunchThePig.class);
|
||||
_challenges.add(ChallengeDogvsCat.class);
|
||||
_challenges.add(ChallengeShootChickens.class);
|
||||
_challenges.add(ChallengeReverseTag.class);
|
||||
_challenges.add(ChallengeKangarooJump.class);
|
||||
_challenges.add(ChallengeMiniOITQ.class);
|
||||
_challenges.add(ChallengeMineADiamond.class);
|
||||
_challenges.add(ChallengeRushPush.class);
|
||||
_challenges.add(ChallengeBlockLobbers.class);
|
||||
_challenges.add(ChallengeStandOnColor.class);
|
||||
_challenges.add(ChallengeMilkACow.class);
|
||||
_challenges.add(ChallengeDragonEgg.class);
|
||||
_challenges.add(ChallengeChestLoot.class);
|
||||
_challenges.add(ChallengeLavaRun.class);
|
||||
_challenges.add(ChallengeNavigateMaze.class);
|
||||
_challenges.add(ChallengeVolleyPig.class);
|
||||
_challenges.add(ChallengeSmashOff.class);
|
||||
_challenges.add(ChallengeTntLauncher.class);
|
||||
_challenges.add(ChallengeArrowRampage.class);
|
||||
_challenges.add(ChallengeCloudFall.class);
|
||||
_challenges.add(ChallengeInfestation.class);
|
||||
_challenges.add(ChallengeBouncingBlock.class);
|
||||
_challenges.add(ChallengeBuildRace.class);
|
||||
_challenges.add(ChallengeFastFood.class);
|
||||
_challenges.add(ChallengeMinecartDance.class);
|
||||
_challenges.add(ChallengeRedLightGreenLight.class);
|
||||
_challenges.add(ChallengeFishingDay.class);
|
||||
|
||||
// _challenges.add(ChallengeAnvilDance.class);
|
||||
// _challenges.add(ChallengeFallingBlocks.class);
|
||||
// _challenges.add(ChallengeWaveCrush.class);
|
||||
// _challenges.add(ChallengePickASide.class);//
|
||||
// _challenges.add(ChallengeKOTL.class);
|
||||
// _challenges.add(ChallengePunchThePig.class);
|
||||
// _challenges.add(ChallengeDogvsCat.class);
|
||||
// _challenges.add(ChallengeShootChickens.class);
|
||||
// _challenges.add(ChallengeReverseTag.class);
|
||||
// _challenges.add(ChallengeKangarooJump.class);
|
||||
// _challenges.add(ChallengeMiniOITQ.class);
|
||||
// _challenges.add(ChallengeMineADiamond.class);
|
||||
// _challenges.add(ChallengeRushPush.class);
|
||||
// _challenges.add(ChallengeBlockLobbers.class);
|
||||
// _challenges.add(ChallengeStandOnColor.class);
|
||||
// _challenges.add(ChallengeMilkACow.class);
|
||||
// _challenges.add(ChallengeDragonEgg.class);
|
||||
// _challenges.add(ChallengeChestLoot.class);
|
||||
// _challenges.add(ChallengeLavaRun.class);
|
||||
// _challenges.add(ChallengeNavigateMaze.class);
|
||||
// _challenges.add(ChallengeVolleyPig.class);
|
||||
// _challenges.add(ChallengeSmashOff.class);
|
||||
// _challenges.add(ChallengeTntLauncher.class);
|
||||
// _challenges.add(ChallengeArrowRampage.class);
|
||||
// _challenges.add(ChallengeCloudFall.class);
|
||||
// _challenges.add(ChallengeInfestation.class);
|
||||
// _challenges.add(ChallengeBouncingBlock.class);
|
||||
// _challenges.add(ChallengeBuildRace.class);
|
||||
// _challenges.add(ChallengeFastFood.class);
|
||||
// _challenges.add(ChallengeMinecartDance.class);
|
||||
// _challenges.add(ChallengeRedLightGreenLight.class);
|
||||
// _challenges.add(ChallengeFishingDay.class);
|
||||
|
||||
// ============== trashed ==============
|
||||
// _challenges.add(ChallengeSimonSays.class);
|
||||
|
|
|
@ -4,13 +4,6 @@ import java.util.ArrayList;
|
|||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilShapes;
|
||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
||||
import nautilus.game.arcade.game.games.mineware.MineWare;
|
||||
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.Location;
|
||||
|
@ -26,8 +19,16 @@ import org.bukkit.event.EventHandler;
|
|||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilShapes;
|
||||
import nautilus.game.arcade.game.games.mineware.Challenge;
|
||||
import nautilus.game.arcade.game.games.mineware.MineWare;
|
||||
|
||||
public class ChallengeAnvilDance extends Challenge
|
||||
{
|
||||
// The amount of seconds until the anvils start to dance.
|
||||
|
@ -50,6 +51,8 @@ public class ChallengeAnvilDance extends Challenge
|
|||
|
||||
// The amount of anvils that have yet to land in the platform or are launched in air.
|
||||
private HashSet<FallingBlock> _fallingAnvils = new HashSet<FallingBlock>();
|
||||
|
||||
private BukkitTask _fireworkTask;
|
||||
|
||||
public ChallengeAnvilDance(MineWare host)
|
||||
{
|
||||
|
@ -105,6 +108,7 @@ public class ChallengeAnvilDance extends Challenge
|
|||
@Override
|
||||
public void cleanupRoom()
|
||||
{
|
||||
_fireworkTask.cancel();
|
||||
_paused = false;
|
||||
|
||||
for(Block block : _landedAnvils)
|
||||
|
@ -289,7 +293,7 @@ public class ChallengeAnvilDance extends Challenge
|
|||
|
||||
private void playFireworksTask()
|
||||
{
|
||||
new BukkitRunnable()
|
||||
_fireworkTask = new BukkitRunnable()
|
||||
{
|
||||
int height = _fireworkHeight;
|
||||
int times = 0;
|
||||
|
|
|
@ -125,7 +125,7 @@ public class ChallengeFishingDay extends Challenge
|
|||
}
|
||||
else
|
||||
{
|
||||
if(y == 5)
|
||||
if(y == 5 && !getSpawns().contains(block.getLocation()))
|
||||
{
|
||||
block.setType(Material.GRASS);
|
||||
|
||||
|
@ -379,12 +379,15 @@ public class ChallengeFishingDay extends Challenge
|
|||
// Check if the player is retracting the hook.
|
||||
// Once hook is retracted, the entity is valid but not on ground.
|
||||
|
||||
return _fishing.get(fisher) && hook.isValid() && !hook.isOnGround();
|
||||
Location droppedHook = hook.getLocation();
|
||||
Block below = droppedHook.getBlock().getRelative(BlockFace.DOWN);
|
||||
|
||||
return _fishing.get(fisher) && hook.isValid() && !hook.isOnGround() && below.getType() == Material.STATIONARY_WATER;
|
||||
}
|
||||
|
||||
private void createExplosion(Player target, Location dropsite)
|
||||
{
|
||||
if (Recharge.Instance.use(target, "TNT Spawn", 700, false, false))
|
||||
if(Recharge.Instance.use(target, "TNT Spawn", 700, false, false))
|
||||
{
|
||||
World world = dropsite.getWorld();
|
||||
|
||||
|
|
Loading…
Reference in New Issue