Jump to content

[SOLVED] Getting a dimension ID from a World object [1.16.2]


Recommended Posts

Posted (edited)

I simply need to know one thing. How does one get the dimension ID from a World object/instance.

 

(Yes, I looked for this on google/the forums, but I could only find what seemed to be outdated methods of doing so)

Edited by BlueMond
Posted (edited)

Hmm, I thought that was clear. I need a way to compare world objects, to check if the two world objects being referenced are the same world. I tried to compare them directly, but it seems that they diverge at some point.  I thought comparing their dimension IDs would allow for more sound comparison. I'm doing this to create a World Tick Scheduler of sorts. The WorldTickEvent gives a world, but I'm assuming it has the potential to be any of the loaded dimensions, so I need to make sure it is the world that my timed process is executing in.

 

EDIT: When I say world object, I'm referring to an instance of the ServerWorld class.

Also, I'm from Spigot, so sorry if I'm confusing the functionality differences between Spigot and MCForge.

Edited by BlueMond
Posted

I'm not sure what you're saying in that second part. Is it maybe the case that there is only one centralized ServerWorld object, and that the WorldTickEvent is NOT individually called by each dimension? I'm not sure if I'm misunderstanding what the ServerWorld object is.

Posted (edited)

Oh okay, then I'm still wondering how it is that I determine what dimension the in question ServerWorld object is for. By that I don't mean the dimension type, but the exact identifier specific to just one dimension, considering there can be multiple instance of the same dimension type in some cases.

Edited by BlueMond
Posted
29 minutes ago, BlueMond said:

EDIT: Is there a way to mark this thread as solved?

If you want to, you can put "solved" in the thread title, but otherwise no, because this is a forum, not Stack Overflow.

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.

  • 2 weeks later...
Posted
On 9/13/2020 at 2:06 PM, Draco18s said:

If you want to, you can put "solved" in the thread title, but otherwise no, because this is a forum, not Stack Overflow.

I've been on a few forums where they've had tags for titles, including "solved".

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.