Сервер кладёт файл хитбоксов рядом с миром
This commit is contained in:
@@ -45,7 +45,7 @@ public final class ServerMain {
|
||||
String gameMode = "survival";
|
||||
String register = null;
|
||||
String password = null;
|
||||
Path hitboxes = worldDir.resolve("hitboxes.json");
|
||||
Path hitboxes = null;
|
||||
|
||||
for (int i = 0; i < args.length - 1; i++) {
|
||||
String flag = args[i];
|
||||
@@ -81,7 +81,10 @@ public final class ServerMain {
|
||||
|
||||
World world = new World(seed, new ChunkStorage(worldDir));
|
||||
Server server = new Server(name, motd, capacity, port, world);
|
||||
server.hitboxes(new net.rustnotmc.server.hitbox.HitboxRegistry(hitboxes));
|
||||
// the boxes of the models live beside the world, unless the file is
|
||||
// named outright
|
||||
Path boxFile = hitboxes != null ? hitboxes : worldDir.resolve("hitboxes.json");
|
||||
server.hitboxes(new net.rustnotmc.server.hitbox.HitboxRegistry(boxFile));
|
||||
if (!server.hitboxes().lastError().isEmpty()) {
|
||||
System.out.println("[rsx] hitboxes: " + server.hitboxes().lastError());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user