Darkhax-Minecraft / Enchantment-Descriptions

Displays descriptions about an enchantment on the tooltip.
100 stars 52 forks source link

Allow Overwriting Vanilla Descriptions #111

Closed pawbap closed 2 years ago

pawbap commented 2 years ago

Would this be something possible, overriding the descriptions added by the mod to vanilla enchantments? I tried adding a resource pack and adding my own localisation file in the same format as the source, but that doesn't work.

Darkhax commented 2 years ago

Using a resource pack that overrides the languages as you said should work. Make sure the resource pack has a higher priority than the mod resource pack. The mod also caches descriptions during each load which may require the user to restart the game if the resource pack was not enabled when the game launched.

pawbap commented 2 years ago

Still no good. :c I was able to change descriptions from other mods regardless if they had description support already or not, but trying to change the descriptions from this mod has no effect.

Just for clarity, here's what I'm doing:

{
  "enchantment.minecraft.infinity.desc": "This description is changed.",
  "enchantment.cenchants.lifesteal.desc": "This is an edit lol.",
  "enchantment.magna.gigantism_curse.desc": "Slows mining speed and enlarges mining radius."
}

Infinity stays the same while the other two actually change.

Darkhax commented 2 years ago

I put together a test resource pack and it works just fine. You can download and test it out yourself here. resourcepack-1.0.0.zip

image

pawbap commented 2 years ago

This is a really weird problem... I can confirm the pack you attached does work! I'm on 1.18.2 Fabric. Tested on a completely clean instance with only the mod and its dependencies.

The issue arises when I add it to my modpack I'm building, though. I don't know if it's the number of mods I have installed or something else, but I've been enabling/disabling mods and seeing if the issue arises again for the past hour. Just purely trial and error.

My findings? I can't even tell. Sometimes the descriptions actually change to what's in the resource pack and sometimes they default back to the original descriptions. It certainly doesn't seem to be a specific mod causing it. I guess I'll keep trying later because this is really tedious and I don't know what else to look for.

MattB70 commented 2 years ago

Did you ever find a solution to this? I need to change the description of mending as I have the nerf enabled. Resource pack doesn't seem to work. No worries if not.

Darkhax commented 2 years ago

@MattB70 Ultimately this issue seems to be related to user configuration. You must ensure the custom resource pack is loaded after this mod. This mod does nothing weird when it comes to localization and you would have similar issues trying to override language entries from other mods.

MattB70 commented 2 years ago

You know what, I didn't even bother restarting my game. No wonder it didn't work! Thanks for the reminder lol