Bugfixes & liquid unit tests
This commit is contained in:
@@ -121,7 +121,7 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
||||
smoothLiquid = Mathf.lerpDelta(smoothLiquid, liquids.currentAmount() / liquidCapacity, 0.05f);
|
||||
|
||||
if(liquids.total() > 0.001f && timer(timerFlow, 1)){
|
||||
moveLiquid(tile.getNearbyEntity(tile.rotation()), leakResistance, liquids.current());
|
||||
moveLiquid(tile.getNearbyEntity(rotation()), leakResistance, liquids.current());
|
||||
noSleep();
|
||||
}else{
|
||||
sleep();
|
||||
|
||||
@@ -37,10 +37,10 @@ public class LiquidJunction extends LiquidBlock{
|
||||
|
||||
@Override
|
||||
public Tilec getLiquidDestination(Tilec source, Liquid liquid){
|
||||
int dir = source.relativeTo(tile.x, tile.y);
|
||||
int dir = source.absoluteRelativeTo(tile.x, tile.y);
|
||||
dir = (dir + 4) % 4;
|
||||
Tilec next = nearby(dir);
|
||||
if(next == null || !next.acceptLiquid(this, liquid, 0f) && !(next.block() instanceof LiquidJunction)){
|
||||
if(next == null || (!next.acceptLiquid(this, liquid, 0f) && !(next.block() instanceof LiquidJunction))){
|
||||
return this;
|
||||
}
|
||||
return next.getLiquidDestination(this, liquid);
|
||||
|
||||
Reference in New Issue
Block a user