Jump to content

Player's village reputation resets?


AstroTibs

Recommended Posts

I'm updating my mod that deals with villages and villagers, and adding a feature that requires the player's reputation in that village.

Things are going well for 1.7.10 and 1.8.9, but I noticed that for versions 1.9.4, 1.10.2, and 1.11.2, your player's reputation in the village resets whenever the server is closed.

 

This was immediately apparent in Eclipse, as a reputation query I put into my mod returned 0 for my player's name.

I've been using NBTExplorer to look at the villages.dat file, and indeed for those three versions, the player reputation entry blanks when the server is reset (more specifically, when it's reset and the player logs back in). It's not a matter of username vs UUID, because 1.8.9 saves reputation under UUID, yet it remains between server runs.

To be more sure, I ran a server on my machine and local-connected to it. I also used ZeroXCorbin's Village Info mod, and reputation resets to 0 when the server is closed and restarted.

To be extra extra sure, I launched local vanilla-only servers and connected to them, using NBTExplorer to track reputation. Sure enough, it resets. To be clear, by "resets" I don't simply mean the reputation value goes to zero for the given UUID: I mean the village's list of players just blank completely, as though no player had earned or lost reputation in that village.

Lastly, I even created a local vanilla world in 1.11.2. Same issue.

 

It does not seem to matter whether I'm in creative mode or survival mode. It does not seem to matter whether I stop the server with /stop or with just X-ing out of the server window. It does not matter if I go a few hundred meters away from the village, sign out, sign back in, and return to the village. Upon returning, my reputation gets blanked.

 

Am I missing something subtle in my diagnosis? Or is this a bug in 1.9 and later that's just so circumstantial to spot that it's not been caught yet?

Edited by AstroTibs
Added additional info
Link to comment
Share on other sites

Ya, looks like nobody really cares about reputation. The vanilla code would never of worked.

As it checks the world is not null before it looks up the player name from the UUID {as it needs to because the server olds that lookup} 

It's not a simple fix as all the public API for that class use the players name as a string, instead of the UUID or profile or anything.

 

Edit:

I've pushed a fix to Forge for this: https://github.com/MinecraftForge/MinecraftForge/commit/72937c90be8a337190964e43281d3da85c43319b

 

  • Like 1

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Good deal LexManos, thanks. My mod development has been a real random walk. I'll need to find a creative way to work around this one.

So, just to confirm—this is an issue with vanilla Minecraft itself, ca 1.9?

Edit: I want to emphasize that this bug does not occur on 1.8.9, even though according to NBTExplorer, reputation is saved under UUID and not user display name.

Edited by AstroTibs
Link to comment
Share on other sites

That is because in 1.8.9 MinecraftServer was a singleton and it didn't have to go through the world, which isn't set at the time read is called. It's a order of operations thing, Mojang needs to fix.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Seemingly fixed, I had to delete the advancements json file for every player in the server as this seemed to be the error. After deleting the files and reloading the server, we were able to join back in.
    • Incompatible mods found! net.fabricmc.loader.impl.FormattedException: Some of your mods are incompatible with the game or each other! A potential solution has been determined, this may resolve your problem:      - Replace mod 'Moonlight Lib' (moonlight) 1.21-2.16.0 with version 1.21-2.17.0 or later. More details:      - Mod 'Supplementaries' (supplementaries) 1.21-3.0.14-alpha requires version 1.21-2.17.0 or later of mod 'Moonlight Lib' (moonlight), but only the wrong version is present: 1.21-2.16.0!     at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:51)     at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:196)     at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:146)     at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68)     at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) this si my error code, and yes i have the latest version of moonlight lib
    • Turning the Tables: My Journey to Reclaim Stolen Bitcoins with Expert Help. When my Bitcoin wallet was hacked and my entire cryptocurrency portfolio was stolen, I felt utterly devastated and hopeless. Having worked hard to build up my digital assets, the sudden loss was gut-wrenching. It felt like my financial future had been ripped away in an instant, leaving me overwhelmed by a sense of betrayal and despair. In my search for help, I discovered TECH CYBER FORCE Recovery, a renowned cybersecurity firm specializing in cryptocurrency recovery. I was met with professionalism and empathy from my first contact with them. The team demonstrated a steadfast commitment to helping me retrieve my stolen Bitcoins. They understood the emotional toll of my situation and approached my case with genuine concern. TECH CYBER FORCE Recovery swung into action immediately, leveraging its extensive expertise in blockchain forensics and hacker tracking techniques. Their process was meticulous. They analyzed my transaction history, followed the digital trail left by the hackers, and worked diligently to pinpoint the location of the stolen funds. I was impressed by their technical prowess; they employed advanced cryptographic methods and strategic negotiations with the perpetrators, all while keeping me informed about their progress. The recovery process was complex and fraught with challenges. However, the tenacity displayed by the team was truly awe-inspiring. They navigated cryptocurrency crime's murky and ever-evolving landscape with skill and determination. After a series of strategic moves, they managed to recover the majority of my Bitcoins successfully.  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.