Skip to content

Commit 8c9a6bd

Browse files
committed
improve EBF formStructure() a bit
1 parent 395de04 commit 8c9a6bd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityElectricBlastFurnace.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,8 @@ private Consumer<List<IDrawable>> addHeatCapacity(IntSyncValue temp) {
134134
@Override
135135
protected void formStructure(PatternMatchContext context) {
136136
super.formStructure(context);
137-
Object type = context.get("CoilType");
138-
if (type instanceof IHeatingCoilBlockStats) {
139-
this.blastFurnaceTemperature = ((IHeatingCoilBlockStats) type).getCoilTemperature();
140-
} else {
141-
this.blastFurnaceTemperature = CoilType.CUPRONICKEL.getCoilTemperature();
142-
}
137+
IHeatingCoilBlockStats type = context.getOrDefault("CoilType", CoilType.CUPRONICKEL);
138+
this.blastFurnaceTemperature = type.getCoilTemperature();
143139
// the subtracted tier gives the starting level (exclusive) of the +100K heat bonus
144140
this.blastFurnaceTemperature += 100 *
145141
Math.max(0, GTUtility.getFloorTierByVoltage(getEnergyContainer().getInputVoltage()) - GTValues.MV);

0 commit comments

Comments
 (0)