Jump to content

[1.11.2]WorldSavedData issues


BeardlessBrady

Recommended Posts

[06:52:29] [Server thread/INFO]: [STDERR]: java.lang.RuntimeException: Failed to instantiate class gunn.modcurrency.mod.core.data.BankAccountSavedData


...
[06:52:29] [Server thread/INFO]: [STDERR]: Caused by: java.lang.NoSuchMethodException: gunn.modcurrency.mod.core.data.BankAccountSavedData.<init>(java.lang.String)

 

Your WorldSavedData class must have a constructor that takes a single String argument.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

In the Block Activated I would add a test account, run it, then comment it out. Then I would get the account and I could get it fine. Once I restart the world and try to get the account again it would be empty. The set Account statement I used is commented out here: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.11/src/main/java/gunn/modcurrency/mod/block/BlockATM.java#L70

Link to comment
Share on other sites

Packets.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

7 minutes ago, BeardlessBrady said:

So what is the best way to sync server WorldSavedData to client?

 

Which clients need which data and when?

 

If a client always needs to know a particular value (e.g to render it on a HUD), send a packet to any relevant players when they log in and when the value changes.

 

If a client only needs to know the value in a GUI, you can probably sync it through the Container (either using the built-in syncing packets or your own).

 

If a bank account is only ever linked to one player, consider storing a player's bank account(s) in a player Capability instead of using World Saved Data.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried to make a pastebin but it wouldnt let me so I'll send the log to anyone who wants on discord The world generation hits 100% but stays there, ive waited over 20 minutes and its still there it just keeps repeating 11:56:41] [Server thread/ERROR]: WorldGenSettings: Value -1 outside of range [0:4096]; Value -1 outside of range [0:4096] its not crashing or freezing Also when i closed the game it said Can't keep up! Is the server overloaded? Running 64466673ms or 1289333 ticks behind
    • Hello forum members! I am relatively new to Forge and I'm having issues with implementing my custom gui elements. Essentially what I'm trying to do is to add a singular rectangle shape which sits on top of every other gui element that's rendered to the player's screen in the Screen object (i.e. when the player is in their inventory or accessing some other inventory like a tile entity and so on...), so essentially i need this rectangles z-index to be the highest out of every other gui element. Later on I plan on adding functionality to this rectangle; the rectangle will serve as the background element.   The way I undertand how the GuiGraphics class works is that when you have a SubscribeEvent method which handles rendering of the gui it gets the GuiGraphics object from the event that gets created when the method triggers and then modifys that gui elements of that event. But the issue then is that if I'm targeting the RenderGuiOverlayEvent.Post event and try to add the rectangle with the fill method what ends up happening is that the rectangle gets rendered behind the Screen object.   Essentially my question is: Is there an event that gets fired when the absolute last gui element gets rendered and if not is there a WorldLastEvent in terms of gui that gets fired and how does the gui rendering pipeline work in minecraft 1.20, what is the order in which different gui elements get fired?   Any help or feedback would be grately appreciated!
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
    • Hey, so I made a modpack for my girlfriend and I and it's been crashing on launch repeatedly. I have some experience with debugging modpacks but not enough to figure out what's happening. I have both my logs in pastebins below. I'm sure it's just mod incompatibilities but it isn't really giving me enough info to figure out what the problematic mod is. Some mods are not fully up to date, however curseforge automatically installed the older versions, and when I had tried updating them prior I was having the same issue. This is all on 1.20.1. In the spoiler I wrote list of most of the mods but not all of them, if anyone recognizes an incompatibility just by looking. Many are pretty popular.   My latest.log https://pastebin.com/iZV02045 My debug.log https://pastebin.com/WbSRMSiq  
  • Topics

×
×
  • Create New...

Important Information

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