Muffler calculation was backwards in case where the machine is not upgradeable

This commit is contained in:
Dave Smith committed 2019-03-11 14:00:26 -06:00
1 parent 46359bb13f
commit de0ab0d6c9
1 file changed
+2 -2
@@ -206,9 +206,9 @@ public class SoundHandler {
.getTileEntity(new BlockPos(original.getXPosF(), original.getYPosF(), original.getZPosF()));
if (te instanceof IUpgradeTile && ((IUpgradeTile) te).getComponent().supports(Upgrade.MUFFLING)) {
int mufflerCount = ((IUpgradeTile) te).getComponent().getUpgrades(Upgrade.MUFFLING);
return Math.max(0.001f, 1.0f - (mufflerCount / (float) Upgrade.MUFFLING.getMax()));
return 1.0f - (mufflerCount / (float)Upgrade.MUFFLING.getMax());
}
return 0;
return 1.0f;
}
@Override