[Create 0.5] ItemDescription's use of getProvider is not null safe
wchen1990 opened this issue ยท 0 comments
If a mod based on Create does not provide a IStressValueProvider the following lines would cause a NullPointerException:
Create/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java
Lines 132 to 133 in d59e748
BlockStressValues.getProvider is marked as nullable so there should be a check at the very least before we call getGeneratedRPM. Like so:
Couple<Integer> generatedRPM = BlockStressValues.getProvider(block) != null ?
BlockStressValues.getProvider(block).getGeneratedRPM(block)
: null;