Skip to content

Commit

Permalink
Hazardous materiasl tooltip fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JuiceyBeans committed Dec 8, 2024
1 parent 762e439 commit d9e8988
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/main/java/com/gregtechceu/gtceu/common/data/GTItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -2643,8 +2643,7 @@ public Component getItemName(ItemStack stack) {
.tag(Tags.Items.ARMORS_HELMETS)
.tag(CustomTags.PPE_ARMOR)
.onRegister(attach(new TooltipBehavior(tooltips -> {
tooltips.add(Component.translatable("gtceu.hazard_trigger.protection.description"));
tooltips.add(Component.translatable("gtceu.hazard_trigger.inhalation"));
tooltips.add(Component.translatable("gtceu.hazard_trigger.protection.description").append(Component.translatable("gtceu.hazard_trigger.inhalation")));
})))
.register();
public static ItemEntry<ArmorComponentItem> RUBBER_GLOVES = REGISTRATE
Expand All @@ -2655,8 +2654,7 @@ public Component getItemName(ItemStack stack) {
.tag(Tags.Items.ARMORS_CHESTPLATES)
.tag(CustomTags.PPE_ARMOR)
.onRegister(attach(new TooltipBehavior(tooltips -> {
tooltips.add(Component.translatable("gtceu.hazard_trigger.protection.description"));
tooltips.add(Component.translatable("gtceu.hazard_trigger.skin_contact"));
tooltips.add(Component.translatable("gtceu.hazard_trigger.protection.description").append(Component.translatable("gtceu.hazard_trigger.skin_contact")));
})))
.register();
public static ItemEntry<ArmorComponentItem> HAZMAT_CHESTPLATE = REGISTRATE
Expand Down
8 changes: 2 additions & 6 deletions src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,8 @@ public static void appendHazardTooltips(Material material, List<Component> toolt
if (!ConfigHolder.INSTANCE.gameplay.hazardsEnabled || !material.hasProperty(HAZARD)) return;

if (GTUtil.isShiftDown()) {
tooltipComponents.add(Component.translatable("gtceu.medical_condition.description_shift"));
tooltipComponents.add(Component
.translatable("gtceu.medical_condition." + material.getProperty(HAZARD).condition.name));
tooltipComponents.add(Component.translatable("gtceu.hazard_trigger.description"));
tooltipComponents.add(Component
.translatable("gtceu.hazard_trigger." + material.getProperty(HAZARD).hazardTrigger.name()));
tooltipComponents.add(Component.translatable("gtceu.medical_condition.description_shift").append(Component.translatable("gtceu.medical_condition." + material.getProperty(HAZARD).condition.name)));
tooltipComponents.add(Component.translatable("gtceu.hazard_trigger.description").append(Component.translatable("gtceu.hazard_trigger." + material.getProperty(HAZARD).hazardTrigger.name())));
return;
}
tooltipComponents.add(Component.translatable("gtceu.medical_condition.description"));
Expand Down

0 comments on commit d9e8988

Please sign in to comment.