mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-13 05:54:17 +01:00
Merge pull request #3187 from wchen1990/mc1.18/dev
Add null check on ItemDescription's use of BlockStressValues.getProvider
This commit is contained in:
commit
86cab0716f
@ -129,8 +129,10 @@ public class ItemDescription {
|
|||||||
.addTo(list);
|
.addTo(list);
|
||||||
|
|
||||||
double capacity = BlockStressValues.getCapacity(block);
|
double capacity = BlockStressValues.getCapacity(block);
|
||||||
Couple<Integer> generatedRPM = BlockStressValues.getProvider(block)
|
BlockStressValues.IStressValueProvider stressProvider = BlockStressValues.getProvider(block);
|
||||||
.getGeneratedRPM(block);
|
Couple<Integer> generatedRPM = stressProvider != null ?
|
||||||
|
stressProvider.getGeneratedRPM(block)
|
||||||
|
: null;
|
||||||
|
|
||||||
StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.HIGH
|
StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.HIGH
|
||||||
: (capacity >= config.mediumCapacity.get() ? StressImpact.MEDIUM : StressImpact.LOW);
|
: (capacity >= config.mediumCapacity.get() ? StressImpact.MEDIUM : StressImpact.LOW);
|
||||||
|
Loading…
Reference in New Issue
Block a user