From 5b4b5fb2b5ab82703a460b4e6635e743f7cc53a3 Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Tue, 12 Jan 2016 07:44:20 +0000 Subject: [PATCH] fixed outpost forcefield knocking you away even if the building is complete, also made the particles show the actual boundaries --- .../mineplex/game/clans/clans/outpost/Outpost.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/outpost/Outpost.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/outpost/Outpost.java index 94f61dfe4..95ae92a19 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/outpost/Outpost.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/outpost/Outpost.java @@ -277,13 +277,13 @@ public class Outpost implements Listener // Forcefield RGBData color = UtilColor.RgbLightBlue; - for (int x = -_type._size; x <= _type._size; x++) + for (int x = _forceFieldStart.getBlockX(); x <= _forceFieldEnd.getBlockX(); x++) { - for (int z = -_type._size; z <= _type._size; z++) + for (int z = _forceFieldStart.getBlockZ(); z <= _forceFieldStart.getBlockZ(); z++) { - if (x == -_type._size || x == _type._size || z == -_type._size || z == _type._size) + if (x == _forceFieldStart.getBlockX() || x == _forceFieldEnd.getBlockX() || z == _forceFieldStart.getBlockZ() || z == _forceFieldEnd.getBlockZ()) { - UtilParticle.PlayParticleToAll(ParticleType.RED_DUST, _origin.clone().add(x + .5, .1, z + .5), new Vector(color.getRed(), color.getGreen(), color.getBlue()), 1f, 0, ViewDist.NORMAL); + UtilParticle.PlayParticleToAll(ParticleType.RED_DUST, new Location(_core.getWorld(), x + .5, UtilBlock.getHighest(_core.getWorld(), x, z).getY() + .15, z + .5), new Vector(color.getRed(), color.getGreen(), color.getBlue()), 1f, 0, ViewDist.NORMAL); } } } @@ -299,7 +299,7 @@ public class Outpost implements Listener double circleX = nextCircleStage.getX(); double circleZ = nextCircleStage.getZ(); - UtilParticle.PlayParticleToAll(ParticleType.MOB_SPELL, _core.clone().add(circleX + .5, 1.1d, circleZ + .5), new Vector(color.getRed(), color.getGreen(), color.getBlue()), 5.f, 0, ViewDist.NORMAL); + UtilParticle.PlayParticleToAll(ParticleType.MOB_SPELL, _core.clone().add(circleX + .5, 1.1d, circleZ + .5), new Vector(color.getRed(), color.getGreen(), color.getBlue()), 1.f, 0, ViewDist.NORMAL); } { @@ -310,7 +310,7 @@ public class Outpost implements Listener double circleX = nextCircleStage.getX(); double circleZ = nextCircleStage.getZ(); - UtilParticle.PlayParticleToAll(ParticleType.MOB_SPELL, _core.clone().add(circleX + .5, 1.1d, circleZ + .5), new Vector(color.getRed(), color.getGreen(), color.getBlue()), 5.f, 0, ViewDist.NORMAL); + UtilParticle.PlayParticleToAll(ParticleType.MOB_SPELL, _core.clone().add(circleX + .5, 1.1d, circleZ + .5), new Vector(color.getRed(), color.getGreen(), color.getBlue()), 1.f, 0, ViewDist.NORMAL); } } @@ -330,7 +330,7 @@ public class Outpost implements Listener } } - if (event.getType() != UpdateType.FAST && getState() == OutpostState.CONSTRUCTING) + if (event.getType() != UpdateType.FAST || getState() != OutpostState.CONSTRUCTING) { return; }