Skip to content

Commit

Permalink
add fluid tooltips to cells and vials
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungOnionMC committed Dec 31, 2024
1 parent 4f4cb8b commit 60df949
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.gregtechceu.gtceu.api.misc.forge.ThermalFluidHandlerItemStack;
import com.gregtechceu.gtceu.client.TooltipsHandler;
import com.gregtechceu.gtceu.utils.FormattingUtil;
import com.gregtechceu.gtceu.utils.GTUtil;

import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;
Expand Down Expand Up @@ -81,5 +82,16 @@ public void appendHoverText(ItemStack stack, @Nullable Level level, List<Compone
tooltipComponents.add(Component.translatable("gtceu.universal.tooltip.fluid_storage_capacity",
FormattingUtil.formatNumbers(capacity)));
}
if (GTUtil.isShiftDown()) {
tooltipComponents.add(Component.translatable("gtceu.fluid_pipe.max_temperature",
FormattingUtil.formatNumbers(maxFluidTemperature)));
if (gasProof) tooltipComponents.add(Component.translatable("gtceu.fluid_pipe.gas_proof"));
else tooltipComponents.add(Component.translatable("gtceu.fluid_pipe.not_gas_proof"));
if (plasmaProof) tooltipComponents.add(Component.translatable("gtceu.fluid_pipe.plasma_proof"));
if (cryoProof) tooltipComponents.add(Component.translatable("gtceu.fluid_pipe.cryo_proof"));
if (acidProof) tooltipComponents.add(Component.translatable("gtceu.fluid_pipe.acid_proof"));
} else if (gasProof || cryoProof || plasmaProof || acidProof) {
tooltipComponents.add(Component.translatable("gtceu.tooltip.fluid_pipe_hold_shift"));
}
}
}

0 comments on commit 60df949

Please sign in to comment.