mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
The Mana Pump will not stop outputting a comparator signal once it stops pumping as long as it has a cart on the rail. #690
This commit is contained in:
1 parent
530757fd07
commit
d216d2b630
2 files changed
+9
-6
No files matched your search
@@ -21,6 +21,7 @@ public class TilePump extends TileMod {
|
||||
public float innerRingPos;
|
||||
public boolean active = false;
|
||||
public boolean hasCart = false;
|
||||
public boolean hasCartOnTop = false;
|
||||
public float moving = 0F;
|
||||
|
||||
public int comparator;
|
||||
@@ -59,15 +60,16 @@ public class TilePump extends TileMod {
|
||||
}
|
||||
}
|
||||
|
||||
if(!hasCart) {
|
||||
if(!hasCartOnTop)
|
||||
comparator = 0;
|
||||
if(active)
|
||||
setActive(false);
|
||||
}
|
||||
if(!hasCart && active)
|
||||
setActive(false);
|
||||
if(active && hasRedstone)
|
||||
setActive(false);
|
||||
|
||||
hasCart = false;
|
||||
|
||||
hasCartOnTop = false;
|
||||
|
||||
if(comparator != lastComparator)
|
||||
worldObj.func_147453_f(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
|
||||
lastComparator = comparator;
|
||||
|
||||
@@ -108,10 +108,11 @@ public class EntityPoolMinecart extends EntityMinecart {
|
||||
if(did) {
|
||||
worldObj.markBlockForUpdate(xp_, y, zp_);
|
||||
pump.hasCart = true;
|
||||
pump.comparator = (int) (((double) getMana() / (double) TilePool.MAX_MANA) * 15);
|
||||
if(!pump.active)
|
||||
pump.setActive(true);
|
||||
}
|
||||
pump.hasCartOnTop = true;
|
||||
pump.comparator = (int) (((double) getMana() / (double) TilePool.MAX_MANA) * 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user