GTNewHorizons / GT-New-Horizons-Modpack

New Modpack with Gregtech, Thaumcraft and Witchery
https://www.gtnewhorizons.com/
Other
882 stars 275 forks source link

Update InGameInfo.xml - Fix Server/Local Discrepency #16572

Closed PlayfulPiano closed 1 day ago

PlayfulPiano commented 1 week ago

Fixes the issue of the broken {raintime} tag for users on multiplayer by giving a non-raintime variant on serverport check for -1.

Tested whether it would detect as the serverport -1 or not on a local singleplayer world (inverting behavior to see if the lines functioned correctly), and I had AnrDaemon help on the discord with finding a better tag for detection. I didn't test it on a personal server file host (as I only play through singleplayer). Might need someone to double check in case connecting to a server hosted on the same machine will still list it as -1 or not. This should work fine though for at minimum external server hostings not on the same pc/ip, so for that it'll be a lot better for users.

Compared to 2.6.1's lines (which would stay persistent for singleplayer users), new lines are as follows: It is {darkaqua}Raining{reset}. (While Raining) It is {darkaqua}Raining{reset} and {gold}Thundering{reset}. (While Raining and Thundering) It is {darkaqua}Snowing{reset}. (While Snowing) It is {darkaqua}Snowing{reset} and {gold}Thundering{reset}. (While Snowing and Thundering) There is currently no {aqua}precipitation{reset}. (When in a biome that has precipitation but no precipitation is occurring) This {darkgreen}biome{reset} does not have {aqua}precipitation{reset}. (When in a biome that does not have precipitation, unchanged)

If you do want to test it yourself, copy lines 160 through 913 and paste that in your own IGI config (or just copy the file itself and replace it).

Kortako commented 1 day ago

This issue was actually bothering me a lot since the 2.6.1 update, and I only just saw this update PR today, but just wanted to let you know I've been working on my own modifications to IGI itself to make the {nextrain} variable work on remote servers as well, as I'd prefer feature parity with both SP and MP servers. I already have a proof of concept working, but it needs a bit of cleanup and possible help from some other people (v2.8.7 of IGI broke server compat, which is needed for this to work). Let me know if you or Dream would be interested in a PR for this.

PlayfulPiano commented 1 day ago

This issue was actually bothering me a lot since the 2.6.1 update, and I only just saw this update PR today, but just wanted to let you know I've been working on my own modifications to IGI itself to make the {nextrain} variable work on remote servers as well, as I'd prefer feature parity with both SP and MP servers. I already have a proof of concept working, but it needs a bit of cleanup and possible help from some other people (v2.8.7 of IGI broke server compat, which is needed for this to work). Let me know if you or Dream would be interested in a PR for this.

if you can figure it out go for it, I'm just unsure how much I can help as I don't really have experience on the server side of the modpack.

Dream-Master commented 1 day ago

This issue was actually bothering me a lot since the 2.6.1 update, and I only just saw this update PR today, but just wanted to let you know I've been working on my own modifications to IGI itself to make the {nextrain} variable work on remote servers as well, as I'd prefer feature parity with both SP and MP servers. I already have a proof of concept working, but it needs a bit of cleanup and possible help from some other people (v2.8.7 of IGI broke server compat, which is needed for this to work). Let me know if you or Dream would be interested in a PR for this.

sure feel free to post a pr