Сервер кладёт файл хитбоксов рядом с миром
This commit is contained in:
@@ -25,6 +25,7 @@ target/
|
||||
/rsx-server-core/world/
|
||||
/rsx-server-core/accounts*.txt
|
||||
/rsx-server-core/*.txt
|
||||
/world/
|
||||
|
||||
# jars are build products; the third-party ones we redistribute are un-ignored
|
||||
*.jar
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"models": {
|
||||
"player": [
|
||||
{ "name": "head", "part": "head", "min": [-0.3, 1.4, -0.3], "max": [0.3, 1.8, 0.3] },
|
||||
{ "name": "body", "part": "body", "min": [-0.3, 0.4, -0.3], "max": [0.3, 1.4, 0.3] },
|
||||
{ "name": "legs", "part": "legs", "min": [-0.3, 0.0, -0.3], "max": [0.3, 0.4, 0.3] }
|
||||
],
|
||||
"ore_stone": [
|
||||
{ "name": "ore", "min": [-0.45, 0.0, -0.45], "max": [0.45, 0.6, 0.45] }
|
||||
],
|
||||
"ore_metal": [
|
||||
{ "name": "ore", "min": [-0.45, 0.0, -0.45], "max": [0.45, 0.6, 0.45] }
|
||||
],
|
||||
"ore_sulfur": [
|
||||
{ "name": "ore", "min": [-0.45, 0.0, -0.45], "max": [0.45, 0.6, 0.45] }
|
||||
],
|
||||
"barrel_blue": [
|
||||
{ "name": "barrel", "min": [-0.35, 0.0, -0.35], "max": [0.35, 0.95, 0.35] }
|
||||
],
|
||||
"barrel_red": [
|
||||
{ "name": "barrel", "min": [-0.35, 0.0, -0.35], "max": [0.35, 0.95, 0.35] }
|
||||
],
|
||||
"barrel_white": [
|
||||
{ "name": "barrel", "min": [-0.35, 0.0, -0.35], "max": [0.35, 0.95, 0.35] }
|
||||
],
|
||||
"crate": [
|
||||
{ "name": "crate", "min": [-0.45, 0.0, -0.45], "max": [0.45, 0.5, 0.45] }
|
||||
],
|
||||
"food_crate": [
|
||||
{ "name": "crate", "min": [-0.45, 0.0, -0.45], "max": [0.45, 0.5, 0.45] }
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user