The Vanilla Experience (Mod) (Forge)

The Vanilla Experience (Mod) (Forge)

118k Downloads

Villager Names Show Profession option showing raw variable information, not actual profession text string

Closed this issue ยท 5 comments

commented

Information

Minecraft version: 1.21.5
Modloader: Fabric
Fabric loader version: 0.16.13
Environment: Singleplayer

Mod name: Villager Names
Mod version: 8.2

Description

Villager profession does not display correctly. Instead of showing the profession name, it shows up similar to:
Entity.villager.work_armorer, fixedRange=Optional.empty]]

Screenshot attached.

Image

Sounds similar to #2667

Crash report

N/A

commented

Looks like this may be a pretty simple fix.

In Common/src/main/java/com/natamus/villagernames/events/VillagerEvent, in the InteractionResult method on line 80:

Change String rawProfession = d.profession().value().toString();
to String rawProfession = d.profession().getRegisteredName();

Unsure if this is something that changed behind the scenes in the MC code, but this appears to fix the issue.

Image

I saw some information that PRs need some additional work, but if I can work through that, I'll send in a PR for this one.

commented

It works when I run the Fabric client through IDEA, but I cannot figure out what build process is being used to generate the jar for use normally. Using the normal Gradle build command generates jar files in each of the directories for each mod loader, but neither the Common jar nor the Fabric jar work in a stand alone MC Fabric instance, and looking at the contents of the files, I can see they are very different, so I am clearly missing something here.

commented

Figured out the problem above - because I don't have whatever tool is being used to generate the unified JAR file, I was trying to use my modloader specific JAR file with the unified dependent JAR for Collective. I forked and cloned the current branch of Collective, and using the version specific JARs for each, verified that this is working at least for Fabric and NeoForge both. Did not test Forge, but expect it should work as well.

commented

Still stumped on getting the Fabric version to work via compiled jar. Using the recompiled Collective jar worked for Neoforge, but when trying to run this via Fabric, I am getting a mixin error about the refmap for the renderLabels method not being found, but can confirm that the refmap json is being generated and included in the jar. It still works when running via the gradle task in IDEA, so I have no idea what the difference is that is causing the refmap error when I try to use the compiled jar.

commented

Thank you for opening the issue and the PR! Fixed in version 8.3 of Villager Names. I'll improve the wiki entry on PRs

https://curseforge.com/minecraft/mc-mods/villager-names/files