diff --git a/src/main/java/com/enderio/core/client/handlers/EnchantTooltipHandler.java b/src/main/java/com/enderio/core/client/handlers/EnchantTooltipHandler.java index f8165960..dce9872b 100644 --- a/src/main/java/com/enderio/core/client/handlers/EnchantTooltipHandler.java +++ b/src/main/java/com/enderio/core/client/handlers/EnchantTooltipHandler.java @@ -6,6 +6,7 @@ import com.enderio.core.api.common.enchant.IAdvancedEnchant; import com.enderio.core.common.Handlers.Handler; +import com.enderio.core.common.config.ConfigHandler; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.util.text.TextFormatting; @@ -17,6 +18,10 @@ public class EnchantTooltipHandler { @SubscribeEvent public static void handleTooltip(ItemTooltipEvent event) { + if (!ConfigHandler.showEnchantmentTooltips) { + return; + } + if (event.getItemStack().hasTagCompound()) { Map enchantments = EnchantmentHelper.getEnchantments(event.getItemStack()); diff --git a/src/main/java/com/enderio/core/common/config/ConfigHandler.java b/src/main/java/com/enderio/core/common/config/ConfigHandler.java index beee79f3..c06dfb47 100644 --- a/src/main/java/com/enderio/core/common/config/ConfigHandler.java +++ b/src/main/java/com/enderio/core/common/config/ConfigHandler.java @@ -66,6 +66,11 @@ public class ConfigHandler extends AbstractConfigHandler implements ITweakConfig @NoSync public static int showDurabilityTooltips = 1; + @Config + @Comment("Show description for enchantments in tooltips.") + @NoSync + public static boolean showEnchantmentTooltips = true; + @Config @Comment("The way the game should have been made (Yes this is the fireworks thing).") public static boolean betterAchievements = false;