Correct errors with new pathfinder

This commit is contained in:
Rseifert 2013-04-08 14:41:48 -04:00
parent 135e20f453
commit 0d924dc3c8
2 changed files with 3 additions and 6 deletions

View file

@ -151,13 +151,10 @@ public class TileEntityDrain extends TileEntityFluidDevice implements ITankConta
{
LiquidPathFinder pathFinder = new LiquidPathFinder(this.worldObj, false, this.MAX_WORLD_EDITS_PER_PROCESS * 2);
pathFinder.init(new Vector3(this.xCoord + this.getFacing().offsetX, this.yCoord + this.getFacing().offsetY, this.zCoord + this.getFacing().offsetZ));
System.out.println("Nodes:"+pathFinder.nodes.size()+"Results:"+pathFinder.results.size());
for (Vector3 vec : pathFinder.results)
{
if (!this.targetSources.contains(vec))
{
this.targetSources.add(vec);
}
this.addVectorToQue(vec);
}
}

View file

@ -83,7 +83,7 @@ public class LiquidPathFinder
LiquidStack liquid = FluidHelper.getLiquidFromBlockId(pos.getBlockID(world));
if (this.fill)
{
return (liquid != null || pos.getBlockID(world) == 0) && FluidHelper.getConnectedSources(world, pos) > 0;
return ((liquid != null || pos.getBlockID(world) == 0) && FluidHelper.getConnectedSources(world, pos) > 0);
}
else
{