diff --git a/src/main/java/malte0811/industrialwires/mech_mb/MechPartSpeedometer.java b/src/main/java/malte0811/industrialwires/mech_mb/MechPartSpeedometer.java index fb71f54..45c3a9e 100644 --- a/src/main/java/malte0811/industrialwires/mech_mb/MechPartSpeedometer.java +++ b/src/main/java/malte0811/industrialwires/mech_mb/MechPartSpeedometer.java @@ -94,15 +94,15 @@ private void update(boolean changedMax) { } private int roundHysteresis(int old, double newExact) { - double mod = newExact%1; final double THRESHOLD = .1; int floor = (int) Math.floor(newExact); if (floor == old) { return old; } - if (oldTHRESHOLD) { + if(old < 0) { return floor; - } else if (old>newExact && mod<1-THRESHOLD) { + } + if (newExact > old + 1 + THRESHOLD || newExact < old - THRESHOLD) { return floor; } return old; diff --git a/src/main/java/malte0811/industrialwires/mech_mb/MechPartTwoElectrodes.java b/src/main/java/malte0811/industrialwires/mech_mb/MechPartTwoElectrodes.java index 19430ea..4729afa 100644 --- a/src/main/java/malte0811/industrialwires/mech_mb/MechPartTwoElectrodes.java +++ b/src/main/java/malte0811/industrialwires/mech_mb/MechPartTwoElectrodes.java @@ -79,7 +79,7 @@ public List getEnergyConnections() { } protected double getMaxBuffer() { - return 10e3;//200kW + return 87148.9361702F;//4096RF } protected boolean has4Phases() {