Skip to content

Commit

Permalink
Fix Heat Capacity not showing in ABS and EBF (#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealKC authored and krossgg committed Oct 13, 2024
1 parent 2df9986 commit 77b8d3d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/main/java/com/gregtechceu/gtceu/data/machine/GCyMMachines.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@
import com.gregtechceu.gtceu.data.material.GTMaterials;
import com.gregtechceu.gtceu.data.recipe.GTRecipeModifiers;
import com.gregtechceu.gtceu.data.recipe.GTRecipeTypes;
import com.gregtechceu.gtceu.utils.FormattingUtil;

import net.minecraft.ChatFormatting;
import net.minecraft.core.Direction;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.Style;
import net.minecraft.world.level.block.Blocks;

import java.util.ArrayList;
Expand Down Expand Up @@ -498,6 +501,18 @@ public static void init() {}
})
.workableCasingRenderer(GTCEu.id("block/casings/gcym/high_temperature_smelting_casing"),
GTCEu.id("block/multiblock/gcym/blast_alloy_smelter"))
.additionalDisplay((controller, components) -> {
if (controller instanceof CoilWorkableElectricMultiblockMachine coilMachine && controller.isFormed()) {
components.add(Component.translatable("gtceu.multiblock.blast_furnace.max_temperature",
Component
.translatable(
FormattingUtil
.formatNumbers(coilMachine.getCoilType().getCoilTemperature() +
100L * Math.max(0, coilMachine.getTier() - GTValues.MV)) +
"K")
.setStyle(Style.EMPTY.withColor(ChatFormatting.RED))));
}
})
.compassSections(GTCompassSections.TIER[IV])
.compassNodeSelf()
.register();
Expand Down Expand Up @@ -948,6 +963,18 @@ public static void init() {}
})
.workableCasingRenderer(GTCEu.id("block/casings/gcym/high_temperature_smelting_casing"),
GTCEu.id("block/multiblock/gcym/mega_blast_furnace"))
.additionalDisplay((controller, components) -> {
if (controller instanceof CoilWorkableElectricMultiblockMachine coilMachine && controller.isFormed()) {
components.add(Component.translatable("gtceu.multiblock.blast_furnace.max_temperature",
Component
.translatable(
FormattingUtil
.formatNumbers(coilMachine.getCoilType().getCoilTemperature() +
100L * Math.max(0, coilMachine.getTier() - GTValues.MV)) +
"K")
.setStyle(Style.EMPTY.withColor(ChatFormatting.RED))));
}
})
.compassSections(GTCompassSections.TIER[LuV])
.compassNodeSelf()
.register();
Expand Down

0 comments on commit 77b8d3d

Please sign in to comment.