Skip to content

Commit 4dad110

Browse files
committed
fix npe
1 parent daf83c9 commit 4dad110

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/gregtech/common/metatileentities/multi/electric/generator/MetaTileEntityLargeTurbine.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,12 @@ protected void addErrorText(List<ITextComponent> textList) {
188188
@Override
189189
protected MultiblockUIFactory createUIFactory() {
190190
MultiblockFuelRecipeLogic recipeLogic = (MultiblockFuelRecipeLogic) recipeMapWorkable;
191-
boolean noRotor = getRotorHolder() == null;
192191
IntSyncValue efficiency = new IntSyncValue(
193-
() -> noRotor ? 0 : getRotorHolder().getRotorEfficiency(), null);
192+
() -> getRotorHolder() == null ? 0 : getRotorHolder().getRotorEfficiency(), null);
194193
IntSyncValue total = new IntSyncValue(
195-
() -> noRotor ? 0 : getRotorHolder().getTotalEfficiency(), null);
194+
() -> getRotorHolder() == null ? 0 : getRotorHolder().getTotalEfficiency(), null);
196195
IntSyncValue durability = new IntSyncValue(
197-
() -> noRotor ? 0 : getRotorHolder().getRotorDurabilityPercent(), null);
196+
() -> getRotorHolder() == null ? 0 : getRotorHolder().getRotorDurabilityPercent(), null);
198197
BooleanSyncValue rotorFree = new BooleanSyncValue(
199198
this::isRotorFaceFree, null);
200199
StringSyncValue fuelAmount = new StringSyncValue(recipeLogic::getRecipeFluidInputInfo, null);

0 commit comments

Comments
 (0)