fixed outpost forcefield knocking you away even if the building is complete, also made the particles show the actual boundaries

This commit is contained in:
NewGarbo 2016-01-12 07:44:20 +00:00
parent 7d858c72f3
commit 5b4b5fb2b5

View File

@ -277,13 +277,13 @@ public class Outpost implements Listener
// Forcefield // Forcefield
RGBData color = UtilColor.RgbLightBlue; 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 circleX = nextCircleStage.getX();
double circleZ = nextCircleStage.getZ(); 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 circleX = nextCircleStage.getX();
double circleZ = nextCircleStage.getZ(); 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; return;
} }