From 58b1fc5ac8355baaaa1cb70d345b324584fe68c5 Mon Sep 17 00:00:00 2001 From: trinsdar <30245301+Trinsdar@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:49:17 -0500 Subject: [PATCH] changed lang of added by tooltip, made it only appear on material items added by the material system --- .../datagen/providers/AntimatterLanguageProvider.java | 2 +- .../main/java/muramasa/antimatter/material/MaterialItem.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterLanguageProvider.java b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterLanguageProvider.java index 17f786341..4117d92b1 100644 --- a/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterLanguageProvider.java +++ b/common/src/main/java/muramasa/antimatter/datagen/providers/AntimatterLanguageProvider.java @@ -384,7 +384,7 @@ protected void customTranslations() { add("antimatter.tooltip.energy", "Energy"); add("antimatter.tooltip.heat_capacity", "Heat capacity"); add("antimatter.tooltip.heat_capacity_total", "Heat capacity (total)"); - add("antimatter.tooltip.material_modid", "Added by: %s"); + add("antimatter.tooltip.material_modid", "Material added by: %s"); add("antimatter.tooltip.occurrence", "Indicates occurrence of %s"); add("antimatter.tooltip.behaviour.aoe_enabled", "%s Enabled"); add("antimatter.tooltip.behaviour.aoe_disabled", "%s Disabled"); diff --git a/common/src/main/java/muramasa/antimatter/material/MaterialItem.java b/common/src/main/java/muramasa/antimatter/material/MaterialItem.java index 0e2d40987..26c673b2d 100644 --- a/common/src/main/java/muramasa/antimatter/material/MaterialItem.java +++ b/common/src/main/java/muramasa/antimatter/material/MaterialItem.java @@ -108,7 +108,9 @@ public static void addTooltipsForMaterialItems(ItemStack stack, Material mat, Ma if (mat.getElement() != null){ tooltip.add(Utils.literal("Is Element")); } - tooltip.add(Utils.translatable("antimatter.tooltip.material_modid", AntimatterPlatformUtils.INSTANCE.getModName(mat.materialDomain()))); + if (stack.getItem() instanceof MaterialItem) { + tooltip.add(Utils.translatable("antimatter.tooltip.material_modid", AntimatterPlatformUtils.INSTANCE.getModName(mat.materialDomain()))); + } } @Override