Skip to content

Commit

Permalink
Fix possible NPE from MultiblockDisplayText (#2453)
Browse files Browse the repository at this point in the history
(cherry picked from commit 596a08b)
  • Loading branch information
vrejhead authored and ALongStringOfNumbers committed May 7, 2024
1 parent 2935824 commit 2f8d115
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ public Builder addMufflerObstructedLine(boolean isObstructed) {
* Added if structure is formed, the machine is active, and the passed fuelName parameter is not null.
*/
public Builder addFuelNeededLine(String fuelName, int previousRecipeDuration) {
if (!isStructureFormed || !isActive) return this;
if (!isStructureFormed || !isActive || fuelName == null) return this;
ITextComponent fuelNeeded = TextComponentUtil.stringWithColor(TextFormatting.RED, fuelName);
ITextComponent numTicks = TextComponentUtil.stringWithColor(TextFormatting.AQUA,
TextFormattingUtil.formatNumbers(previousRecipeDuration));
Expand Down

0 comments on commit 2f8d115

Please sign in to comment.