Lightman's Currency

Lightman's Currency

2M Downloads

BUG: Unable to get custom data when connected to a server

ajh123 opened this issue ยท 7 comments

commented

Minecraft Version

1.21/1.21.1

Forge/NeoForge Version

NeoForge 21.1.98

Lightman's Currency Version

1.21-2.2.4.2b

Environment Type

Minecraft Client (Bug/crash happened in a single-player world or while the game was booting)

Other relevant Mods

NeoForge client / server mods:

  • AdvancedPeripherals-1.21.1-0.7.47a.jar
  • appleskin-neoforge-mc1.21-3.0.5.jar
  • architectury-13.0.8-neoforge.jar
  • badpackets-neo-0.8.2.jar
  • BetterAdvancements-NeoForge-1.21.1-0.4.3.21.jar
  • BetterF3-11.0.3-NeoForge-1.21.1.jar
  • car-neoforge-1.21.1-1.0.34.jar
  • cc-tweaked-1.21.1-forge-1.114.3.jar
  • cloth-config-15.0.140-neoforge.jar
  • CreativeCore_NEOFORGE_v2.12.31_mc1.21.1.jar
  • entityculling-neoforge-1.7.2-mc1.21.jar
  • ferritecore-7.0.2-neoforge.jar
  • Forgematica-0.1.14-mc1.21.1.jar
  • ImmediatelyFast-NeoForge-1.3.3+1.21.1.jar
  • ImmersiveEngineering-1.21.1-12.0.0-182.jar
  • immersive_aircraft-1.1.6+1.21.1-neoforge.jar
  • iris-neoforge-1.8.6+mc1.21.1.jar
  • lctech-1.21-0.2.1.14.jar
  • lightmanscurrency-1.21-2.2.4.2b.jar
  • lithium-neoforge-0.14.7+mc1.21.1.jar
  • MaFgLib-0.2.2-mc1.21.1.jar
  • Mekanism-1.21.1-10.7.8.70.jar
  • MekanismGenerators-1.21.1-10.7.8.70.jar
  • modernfix-neoforge-5.20.0+mc1.21.1.jar
  • neoforwarding-1.3.0-1.21.X-NeoForge.jar
  • open-parties-and-claims-neoforge-1.21.1-0.23.7.jar
  • reeses-sodium-options-neoforge-1.8.3+mc1.21.4.jar
  • RoughlyEnoughItems-16.0.788-neoforge.jar
  • sodium-extra-neoforge-0.6.0+mc1.21.1.jar
  • sodium-neoforge-0.6.5+mc1.21.1.jar
  • trafficcraft-neoforge-1.21.1-1.1.3.jar
  • voicechat-neoforge-1.21.1-2.5.27.jar
  • waterframes-NEOFORGE-mc1.21.1-v2.1.11.jar
  • watermedia-2.1.16.jar
  • worldedit-mod-7.3.8.jar
  • XaerosWorldMap_1.39.2_NeoForge_1.21.jar
  • Xaeros_Minimap_25.0.0_NeoForge_1.21.jar

I have tested these mods in a singleplayer world and everything works as expected

Velocity details:

Version: Velocity 3.4.0-SNAPSHOT (git-371e6860-b463)

Plugins:

  • HUB-1.0.1-667f6ca.jar
  • SignedVelocity-Proxy-1.3.0.jar
  • LuckPerms-Velocity-5.4.150.jar
  • voicechat-velocity-2.5.24.jar

Describe the bug

When attempting to use something (like an ATM) that requires access to custom data the error like "Attempted to get custom data 'lightmanscurrency:bank_accounts' before the server started!" in the client console, resulting in the thing (like an ATM) completely inoperable.

To Reproduce

  1. Create a Velocity Proxy
  2. Create a NeoForge server (make sure to setup NeoForwarding correctly)
  3. Join the velocity proxy, it will connect you to the NeoForge server
  4. Place an ATM
  5. Go to a page like the "Withdraw or Deposit" page,
  • see in the GUI "ERROR FINDING ACCOUNT" and
  • see "Attempted to get custom data 'lightmanscurrency:bank_accounts' before the server started!" spammed in the client logs

Screenshots/Logs/Crash Reports (FILES ONLY)

latest.log

commented

After making a new world and disabling the remaing mods (only Lightman's Currency and Lightman's Currency Tech) the same error occurs.

commented

Have you tested on a normal NeoForge server?

On a regular NeoForge server I do get the same error, So it is not Velocity then.

commented

And server logs:

latest.log

commented

I have disabled a bunch of mods resulting in only:

  • cc-tweaked-1.21.1-forge-1.114.3.jar
  • lctech-1.21-0.2.1.14.jar
  • lightmanscurrency-1.21-2.2.4.2b.jar
  • trafficcraft-neoforge-1.21.1-1.1.3.jar

and I stil get the error, on a regular NeoForge sever.

commented

I believe I found the issue. Long story short, the "BankReference" classes used to more easily access bank accounts from different sources (by default the two sources are from players and from teams) weren't being properly flagged as existing on the logical client when loaded/handled by the client copy of the bank data, which resulted in the client attempting to get the servers copy of the data on the client. In a single-player world this appears to work as normal because the servers copy of the data is available, but on a dedicated server said data doesn't exist on the client which means it can't find any bank accounts for the various screens.

Either way, this should now be fixed in v2.2.4.2c, and I've also included the stack-trace on the "Attempted to get data before the server started" error message to make it easier to track when & where we're attempting to get server data from the logical client in case of future issues.

commented

@Lightman314 Can confirm everything works as expected, even when using Velocity.

commented

Have you tested on a normal NeoForge server? If my mod works as intended on NeoForge, but Velocity messes things up then I'm afraid that there is nothing I can do and that you need to take this issue up with the Velocity Developers.