From ebe164a812ba041f9b017db0363c1da5286e8242 Mon Sep 17 00:00:00 2001 From: Bob Dole <8822548+wchen1990@users.noreply.github.com> Date: Sat, 9 Jul 2022 05:19:11 -0400 Subject: [PATCH] Use a variable to hold getProvider result --- .../com/simibubi/create/foundation/item/ItemDescription.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java index 50d963889..3f0be8ba2 100644 --- a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java +++ b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java @@ -129,8 +129,9 @@ public class ItemDescription { .addTo(list); double capacity = BlockStressValues.getCapacity(block); - Couple generatedRPM = BlockStressValues.getProvider(block) != null ? - BlockStressValues.getProvider(block).getGeneratedRPM(block) + BlockStressValues.IStressValueProvider stressProvider = BlockStressValues.getProvider(block); + Couple generatedRPM = stressProvider != null ? + stressProvider.getGeneratedRPM(block) : null; StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.HIGH