UHC anti-xray visibility update

This commit is contained in:
Chiss 2014-10-10 18:58:12 +11:00
parent 0acaf2e426
commit 7d1a62e810

View File

@ -1447,28 +1447,28 @@ public class UHC extends TeamGame
//Remove Non-Aired Veins
for (ArrayList<Block> vein : oreVeins)
{
boolean nearAir = false;
boolean visible = false;
//Check if Air is near Vein
for (Block ore : vein)
{
for (Block airCheck : UtilBlock.getSurrounding(ore, true))
for (Block visibleCheckBlock : UtilBlock.getSurrounding(ore, true))
{
if (airCheck.getType() == Material.AIR)
if (visibleCheckBlock.getType() == Material.AIR || UtilBlock.isVisible(visibleCheckBlock))
{
nearAir = true;
visible = true;
}
if (nearAir)
if (visible)
break;
}
if (nearAir)
if (visible)
break;
}
//Remove Vein
if (!nearAir)
if (!visible)
{
if (xrayDebug)
System.out.println("DELETING VEIN;");