Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In LAN server, players other than the host cannot use blueprints. #1724

Open
ninthseason opened this issue Mar 3, 2025 · 0 comments
Open
Labels
status: needs testing Issue needs testing type: bug Issue where something isn't working

Comments

@ninthseason
Copy link

Description

The problem is here:

if (FabricLoader.getInstance().getEnvironmentType() == EnvType.SERVER) {
dir = Paths.get("schematics", "uploaded").toAbsolutePath();
file = Paths.get(owner, schematic);
} else {
dir = Paths.get("schematics").toAbsolutePath();
file = Paths.get(schematic);
}

The return of FabricLoader.getInstance().getEnvironmentType() depends on whether the running program is server.jar or client.jar. In other words, when using LAN server, FabricLoader.getInstance().getEnvironmentType() on the internal server still returns EnvType.CLIENT.

That is, in a LAN server, this code will always attempt to retrieve schematic files from "schematics" rather than "schematics/uploaded".So it can only ever read schematics created by the host in the "schematics" folder and cannot access schematics uploaded by other players to "schematics/uploads".

Game Log

The root cause of the bug has been explained above, so in my opinion, the log file is not needed.

Debug Information

Same as above.

@ninthseason ninthseason added status: needs testing Issue needs testing type: bug Issue where something isn't working labels Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs testing Issue needs testing type: bug Issue where something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant