Ruins (Structure Spawning System)

Ruins (Structure Spawning System)

24M Downloads

[Server] Ruins can fail to properly use level-name from server.properties

MrSmite opened this issue ยท 2 comments

commented

MC: 1.7.10
Ruins: 1.7.10

Issue:

When loading a server, Ruins can fail to properly parse 'level-name' in 'server.properties' if 'level-name' includes a path. This results in Ruins not being able to locate 'RuinsPositionsFile.txt' and not generate any ruins in game.

Details:

Minecraft allows server admins are to specify a path for 'level-name' in server.properties if they want to keep all their multiplayer worlds in a single folder (similar to how single-player does):

level-name=/Worlds/MyFunWorld

The above would create a subfolder called 'Worlds' in the server root and then place the level folder 'MyFunWorld' inside it. The problem is, Ruins is expecting a simple world name without a path:

level-name=MyFunWorld

as a result, when including a path in 'level-name', Ruins generates an error and fails to function:

Ruins attempted to load invalid worldname /Worlds/MyFunWorld posfile

NOTE:

I originally posted this on someone else's fork by accident...

I'm not sure if you're supporting 1.7.10 however the reason I have not moved from that version is because I also have the LotR mod which has not updated beyond that. It would certainly be appreciated if you had the time to fix this one issue for 1.7.10,

Thanks!

commented

I actually had tried the double backslash after I got the initial error message. I must've missed one somewhere in my path because if it had worked for me earlier, you wouldn't have heard from me ๐Ÿ˜

At any rate, using \\ has my world up and running. Thanks!

commented

Ruins actually is using level-name, even if it's a path. The problem is it does some validation of the position data file path, refusing to read the file if the path doesn't contain the level name specified in server.properties . I'm guessing you're running on Windows, so the trouble you're running into is the path (e.g., "C:\Minecraft\Worlds\MyFunWorld\RuinsPositionsFile.txt") does not contain the level string ("/Worlds/MyFunWorld") due to a difference in path element separators, and thus fails.

I submitted a pull request to remove this path validation entirely; there's no value in it, given how the path to the file is generated. This fixes the issue in 1.12.2...but if the change doesn't make it to 1.7.10, you've got a simple workaround: simply specify a Windows-style level-name value.

level-name=\\Worlds\\MyFunWorld

Note backslashes must be escaped in server.properties , which is why they appear here in pairs. This string will be found in the Windows path, and everybody's happy. At least until you migrate to a Linux box.