File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/main/java/gregtech/common/covers/detector Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -138,11 +138,11 @@ private void updateWidget(GTTextFieldWidget w) {
138138 }
139139
140140 private long getMinValue () {
141- return ( minValue ) ;
141+ return minValue ;
142142 }
143143
144144 private long getMaxValue () {
145- return ( maxValue ) ;
145+ return maxValue ;
146146 }
147147
148148 private void setMinValue (long val ) {
@@ -163,11 +163,11 @@ private void setUsePercent(boolean b) {
163163 this .usePercent = b ;
164164
165165 if (this .usePercent ) { // using percent
166- this .minValue = DEFAULT_MIN_PERCENT ;
167- this .maxValue = DEFAULT_MAX_PERCENT ;
166+ this .minValue = ( long ) Math . ceil ((( double ) this . minValue / getCoverHolderCapacity ()) * 100d ) ;
167+ this .maxValue = ( long ) Math . ceil ((( double ) this . maxValue / getCoverHolderCapacity ()) * 100d ) ;
168168 } else { // using discrete EU
169- this .minValue = DEFAULT_MIN_EU ;
170- this .maxValue = DEFAULT_MAX_EU ;
169+ this .minValue = ( long ) Math . floor (( this . minValue / 100d ) * getCoverHolderCapacity ()) ;
170+ this .maxValue = ( long ) Math . floor (( this . maxValue / 100d ) * getCoverHolderCapacity ()) ;
171171 }
172172 }
173173
You can’t perform that action at this time.
0 commit comments