Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

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

 

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

  • Author

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

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

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.