Skip to content

Clear the enchantment name cache when resource packs reload - #6634

Open
dekrom wants to merge 1 commit into
MeteorDevelopment:masterfrom
dekrom:fix/enchantment-name-cache
Open

Clear the enchantment name cache when resource packs reload#6634
dekrom wants to merge 1 commit into
MeteorDevelopment:masterfrom
dekrom:fix/enchantment-name-cache

Conversation

@dekrom

@dekrom dekrom commented Aug 30, 2026

Copy link
Copy Markdown

Type of change

  • Bug fix
  • New feature

Description

Names#onResourcePacksReloaded clears seven of the eight caches. enchantmentKeyNames is the
one it misses, so enchantment names stay in the old language after a language change or a
resource pack reload. It is a WeakHashMap, but the registry holds the ResourceKeys, so the
entries are not going anywhere on their own.

Related issues

None that I found.

How Has This Been Tested?

Not reproduced in game yet, it is just the one cache missing from the reload handler that clears
the other seven. Builds clean against current master.

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants