Use a variable to hold getProvider result

This commit is contained in:
Bob Dole 2022-07-09 05:19:11 -04:00
parent dd7f07c7eb
commit ebe164a812

View file

@ -129,8 +129,9 @@ public class ItemDescription {
.addTo(list); .addTo(list);
double capacity = BlockStressValues.getCapacity(block); double capacity = BlockStressValues.getCapacity(block);
Couple<Integer> generatedRPM = BlockStressValues.getProvider(block) != null ? BlockStressValues.IStressValueProvider stressProvider = BlockStressValues.getProvider(block);
BlockStressValues.getProvider(block).getGeneratedRPM(block) Couple<Integer> generatedRPM = stressProvider != null ?
stressProvider.getGeneratedRPM(block)
: null; : null;
StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.HIGH StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.HIGH