#How to check which world the player is in?

38 messages · Page 1 of 1 (latest)

glossy sphinx
#

I'm making a client side waypoint mod and I need a way to figure out which world the player is connected to so I can render the proper waypoints. Is there some sort of id attached to ClientWorld or another way to do this?

tidal yarrow
#

a 100% accurate and error-less way is only possible in singleplayer

glossy sphinx
#

well shoot

#

i guess for servers i can use the ip

glossy sphinx
tidal yarrow
glossy sphinx
tidal yarrow
#

you can't guarantee that the server the player is on has a static ip

#

there are isps which change your ip every day

tidal yarrow
glossy sphinx
#

but you dont change the ip in the add server thing

tidal yarrow
#

if the servers public ip changes you have to

glossy sphinx
#

well yess but like the chances are very low. ive never had to do that

tidal yarrow
#

and if you use the domain (provided they use one to connect), there may be multiple variations and you have no way of telling which are related

lament remnant
#

You can take a look at what journeymap and xaeros do for their data storage

glossy sphinx
#

this is for a personal client that i dont plan on distrubuting

tidal yarrow
glossy sphinx
#

so like its ok if its not 100% perfect

#

the sevrers i play on dont change

tidal yarrow
#

why does everyone want to make a client

lament remnant
tidal yarrow
#

clients were a mistake, should have never been a thing

glossy sphinx
tidal yarrow
#

all in one will never be better (and more compatible) than multiple seperate mods

lament remnant
#

Anyways I would store it based on the saved server name

tidal yarrow
lament remnant
#

I think JM also includes some sort of hashing, but im not sure

glossy sphinx
tidal yarrow
#

modpack

lament remnant
glossy sphinx
#

lol

glossy sphinx
#

alright ill look into world/server names ig.

lament remnant
#

You could also implement some sort of world recognition, although that would be very jank

#

But you said this was just a personal project

glossy sphinx
#

yeah id rather keep it simple. its already tailored specifically to me so its fine.

lament remnant
#

As I said, something based on the saved name of the server and maybe the domain, if not a combination of the both