Skip to content

Commit

Permalink
fix hazmat-protection tooltip hard code to help localize (#3734)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0d087ff)
  • Loading branch information
miaowwwwww authored and Dream-Master committed Dec 30, 2024
1 parent 6b0fe33 commit 4996fa3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/gregtech/common/GTProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings.GameType;
Expand Down Expand Up @@ -2789,7 +2790,9 @@ public void onItemTooltip(ItemTooltipEvent event) {
ItemStack aStackTemp = event.itemStack;
GTItemStack aStack = new GTItemStack(aStackTemp);
if (providesProtection(aStackTemp)) {
event.toolTip.add(EnumChatFormatting.LIGHT_PURPLE + "Provides full hazmat protection.");
event.toolTip.add(
EnumChatFormatting.LIGHT_PURPLE
+ StatCollector.translateToLocal("GT5U.providesfullhazmatprotection"));
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/gregtech/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ item.gt.advancedsensorcard.name=GregTech Advanced Sensor Card
GT5U.autoplace.error.no_hatch=§cSuggested to place hatch §4%s§c but none was found
GT5U.autoplace.error.no_mte.id=§cSuggested to place machine with meta ID §4%s§c but none was found
GT5U.autoplace.error.no_mte.class_name=§cSuggested to place machine with class name §4%d§c but none was found
GT5U.providesfullhazmatprotection=Provides full hazmat protection.

# Multiblock Tooltip Builder Keywords
# Context can be found in the class gregtech.api.util.MultiblockTooltipBuilder
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/gregtech/lang/zh_CN.lang
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ itemGroup.GregTech.Ores=矿石
GT5U.autoplace.error.no_hatch=§c建议放置仓室 §4%s§c ,但未在库存中找到
GT5U.autoplace.error.no_mte.id=§c建议放置meta-ID为 §4%s§c 的方块,但未在库存中找到
GT5U.autoplace.error.no_mte.class_name=§c建议放置class名为 §4%d§c 的方块,但未在库存中找到
GT5U.providesfullhazmatprotection=防化效果与单件防化服一致

# Multiblock Tooltip Builder Keywords
# Context can be found in the class gregtech.api.util.GT_Multiblock_Tooltip_Builder
Expand Down

0 comments on commit 4996fa3

Please sign in to comment.