Jump to content

Recommended Posts

Posted

When storing information during, how can I uniquely identify a world? 

 

Some context:

I am rewriting my mod which previously used the world seed (I know, terrible), but obviously more than one world with the same seed can exist. I was also previously storing information in a Map<Seed, MyObjects> which is also pretty terrible. So:

  1. What can I use to uniquely identify a world?
  2. Is there a better way than using a Map?
  3. Is there any easy way to sync data between world & client?
  4. Is there any easy way to allow the data to be fully configurable?

 

Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes).

I know Java pretty well... So yeah...

Quote

This is where I'd put an inspirational and/or clever quote, but I can't think of one right now...

This is the output of the totally, 100% working compiler for my programming language, Planet9:

Beginning Compilation...
Failed compilation!
planet9.compiler.error.CompilationException: Compiler not yet implemented
	at planet9.compiler.Compiler.compile(Compiler.java:39)
	at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)

 

Posted (edited)

By "world", do you mean a World object (i.e. a dimension), the map/saved game as a whole, or something else?

Edited by Choonster

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.

Posted
Just now, Choonster said:

By "world", do you mean a World object (i.e. a dimension), the map/saved game as a whole or something else?

A single save (overworld, nether, & end)

Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes).

I know Java pretty well... So yeah...

Quote

This is where I'd put an inspirational and/or clever quote, but I can't think of one right now...

This is the output of the totally, 100% working compiler for my programming language, Planet9:

Beginning Compilation...
Failed compilation!
planet9.compiler.error.CompilationException: Compiler not yet implemented
	at planet9.compiler.Compiler.compile(Compiler.java:39)
	at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)

 

Posted
2 minutes ago, Socratic_Phoenix said:

A single save (overworld, nether, & end)

 

Is this data only used by the save it's attached to, or do you need to access the data of other saves?

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.

Posted (edited)
16 minutes ago, Choonster said:

do you need to access the data of other saves?

I shouldn't have to, no...

 

I've been doing some research, is WorldSavedData what I'm looking for? I need to be able to access the data client side, and the data needs to be synced... will I have to do that manually?

 

Edit:

Hmm... WorldSaveData doesn't appear to be what I want... Is there some unique id I can use? Such as a UUID or maybe the save dir name?

Edited by Socratic_Phoenix

Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes).

I know Java pretty well... So yeah...

Quote

This is where I'd put an inspirational and/or clever quote, but I can't think of one right now...

This is the output of the totally, 100% working compiler for my programming language, Planet9:

Beginning Compilation...
Failed compilation!
planet9.compiler.error.CompilationException: Compiler not yet implemented
	at planet9.compiler.Compiler.compile(Compiler.java:39)
	at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)

 

Posted
24 minutes ago, Socratic_Phoenix said:

I shouldn't have to, no...

 

I've been doing some research, is WorldSavedData what I'm looking for? I need to be able to access the data client side, and the data needs to be synced... will I have to do that manually?

 

Edit:

Hmm... WorldSaveData doesn't appear to be what I want... Is there some unique id I can use? Such as a UUID or maybe the save dir name?

 

World Saved Data should be what you need. It can be attached per-dimension or per-save. Each side has its own copy of the data, syncing needs to be done manually.

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.

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



×
×
  • Create New...

Important Information

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