Ninjabrain1 / Ninjabrain-Bot

Accurate stronghold calculator for Minecraft speedrunning.
312 stars 43 forks source link

F3+C works on default servers (world, world_nether) now #68

Closed Fabo0814 closed 1 year ago

Fabo0814 commented 1 year ago

If F3+C returns, that the player is on a server with default worlds (world, world_nether), it will function like in Singleplayer.

Fabo0814 commented 1 year ago

Maybe a Nether could be detected by checking if the world contains "_nether", else Ninjabrain will act like the player is in an overworld.

Ninjabrain1 commented 1 year ago

There shouldnt be hard coded world names in the code, even if "world" is the most common name.

Change F3CData.tryParseF3CString() instead, string.startsWith("/execute in minecraft:") should be enough to check that it is an F3+C command. Then after the string is split in tryParseF3CString(), check if the third substring ends with _nether or _end to determine dimension. I think that will work. Preferably add some tests too but not mandatory.