Refactoring / Launch pad tweaks
This commit is contained in:
@@ -51,14 +51,14 @@ public class ItemModule extends BlockModule{
|
||||
boolean updateFlow = flowTimer.get(30);
|
||||
|
||||
for(int i = 0; i < items.length; i++){
|
||||
flow[i].addValue(cacheSums[i]);
|
||||
flow[i].add(cacheSums[i]);
|
||||
if(cacheSums[i] > 0){
|
||||
cacheBits.set(i);
|
||||
}
|
||||
cacheSums[i] = 0;
|
||||
|
||||
if(updateFlow){
|
||||
displayFlow[i] = flow[i].hasEnoughData() ? flow[i].getMean() : -1;
|
||||
displayFlow[i] = flow[i].hasEnoughData() ? flow[i].mean() : -1;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
@@ -267,7 +267,7 @@ public class ItemModule extends BlockModule{
|
||||
}
|
||||
|
||||
public interface ItemConsumer{
|
||||
void accept(Item item, float amount);
|
||||
void accept(Item item, int amount);
|
||||
}
|
||||
|
||||
public interface ItemCalculator{
|
||||
|
||||
@@ -26,10 +26,10 @@ public class LiquidModule extends BlockModule{
|
||||
smoothLiquid = Mathf.lerpDelta(smoothLiquid, currentAmount(), 0.1f);
|
||||
if(showFlow){
|
||||
if(flow == null) flow = new WindowedMean(windowSize);
|
||||
flow.addValue(lastAdded);
|
||||
flow.add(lastAdded);
|
||||
lastAdded = 0;
|
||||
if(currentFlowRate < 0 || flowTimer.get(updateInterval)){
|
||||
currentFlowRate = flow.hasEnoughData() ? flow.getMean() : -1f;
|
||||
currentFlowRate = flow.hasEnoughData() ? flow.mean() : -1f;
|
||||
}
|
||||
}else{
|
||||
currentFlowRate = -1f;
|
||||
|
||||
Reference in New Issue
Block a user