Fixed release valve redstone input
This commit is contained in:
parent
ff46fb58f5
commit
c18400cf95
1 changed files with 3 additions and 8 deletions
|
@ -27,15 +27,11 @@ public class TileEntityReleaseValve extends TileEntityFluidDevice implements ITi
|
||||||
private List<INetworkPipe> output = new ArrayList<INetworkPipe>();
|
private List<INetworkPipe> output = new ArrayList<INetworkPipe>();
|
||||||
private IFluidHandler[] input = new IFluidHandler[6];
|
private IFluidHandler[] input = new IFluidHandler[6];
|
||||||
|
|
||||||
public boolean isPowered = false;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity()
|
public void updateEntity()
|
||||||
{
|
{
|
||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
|
|
||||||
this.isPowered = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);
|
|
||||||
|
|
||||||
connected = ConnectionHelper.getSurroundingTileEntities(this);
|
connected = ConnectionHelper.getSurroundingTileEntities(this);
|
||||||
|
|
||||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||||
|
@ -53,7 +49,7 @@ public class TileEntityReleaseValve extends TileEntityFluidDevice implements ITi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.worldObj.isRemote && !isPowered && this.ticks % 20 == 0)
|
if (!this.worldObj.isRemote && this.ticks % 10 == 0 && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord))
|
||||||
{
|
{
|
||||||
this.validateNBuildList();
|
this.validateNBuildList();
|
||||||
// start the draining process
|
// start the draining process
|
||||||
|
@ -74,7 +70,6 @@ public class TileEntityReleaseValve extends TileEntityFluidDevice implements ITi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +177,7 @@ public class TileEntityReleaseValve extends TileEntityFluidDevice implements ITi
|
||||||
{
|
{
|
||||||
output += " Output: UnRestricted and";
|
output += " Output: UnRestricted and";
|
||||||
}
|
}
|
||||||
if (!this.isPowered)
|
if (!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord))
|
||||||
{
|
{
|
||||||
output += " Open ";
|
output += " Open ";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue