fix: boot ProjectCapture on Hytale 0.5.9
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
# Local Hytale runtime and proprietary game data
|
# Local Hytale runtime and proprietary game data
|
||||||
.hytale/
|
.hytale/
|
||||||
dev-runtime/
|
dev-runtime/
|
||||||
|
ProjectCapture-devserver/
|
||||||
local.properties
|
local.properties
|
||||||
gradle-local.properties
|
gradle-local.properties
|
||||||
**/HytaleServer.jar
|
**/HytaleServer.jar
|
||||||
|
|||||||
@@ -23,4 +23,21 @@ Requirements are Java 25 and the checked-in Gradle wrapper. The build downloads
|
|||||||
./gradlew fanBuild
|
./gradlew fanBuild
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Isolierter Multiplayer-Testserver
|
||||||
|
|
||||||
|
Nach einer lokalen Hytale-0.5.9-Installation kann eine getrennte, nur lokal
|
||||||
|
gebundene Test-Runtime angelegt werden. Sie kopiert Server und Assets neben das
|
||||||
|
Repository, lässt Launcher-Daten unverändert und wird nie eingecheckt.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
scripts/setup-isolated-dev-server.sh
|
||||||
|
scripts/install-mod-in-dev-server.sh
|
||||||
|
scripts/start-isolated-dev-server.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Der Testserver lauscht ausschließlich auf `127.0.0.1:5521` und nutzt dafür den
|
||||||
|
unsicheren lokalen Auth-Modus. Er ist weder für ein LAN noch für das Internet
|
||||||
|
geeignet. Zwei lokale Clients können damit den gemeinsamen, serverautoritativen
|
||||||
|
Mod-Status prüfen.
|
||||||
|
|
||||||
Public releases require a documented policy/rights review; the repository never bundles Hytale server JARs, `Assets.zip`, extracted base assets or secrets. See the [fan-project policy](docs/UNOFFICIAL_FAN_PROJECT_POLICY.md), [third-party notice](THIRD_PARTY_NOTICE.md) and [implementation plan](docs/IMPLEMENTATION_PLAN.md).
|
Public releases require a documented policy/rights review; the repository never bundles Hytale server JARs, `Assets.zip`, extracted base assets or secrets. See the [fan-project policy](docs/UNOFFICIAL_FAN_PROJECT_POLICY.md), [third-party notice](THIRD_PARTY_NOTICE.md) and [implementation plan](docs/IMPLEMENTATION_PLAN.md).
|
||||||
|
|||||||
@@ -30,10 +30,14 @@ public final class ProjectCapturePlugin extends JavaPlugin {
|
|||||||
stateStore.initialize();
|
stateStore.initialize();
|
||||||
contentCatalog = RuntimeContentCatalog.load(getClass().getClassLoader());
|
contentCatalog = RuntimeContentCatalog.load(getClass().getClassLoader());
|
||||||
multiplayerService = new MultiplayerCreatureService(stateStore, contentCatalog);
|
multiplayerService = new MultiplayerCreatureService(stateStore, contentCatalog);
|
||||||
ProjectCaptureCommands.register(this, multiplayerService);
|
|
||||||
return CompletableFuture.completedFuture(null);
|
return CompletableFuture.completedFuture(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setup() {
|
||||||
|
ProjectCaptureCommands.register(this, multiplayerService);
|
||||||
|
}
|
||||||
|
|
||||||
JsonStateStore stateStore() {
|
JsonStateStore stateStore() {
|
||||||
return stateStore;
|
return stateStore;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"Name": "Christian Schindler"
|
"Name": "Christian Schindler"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"ServerVersion": "0.5.9",
|
"ServerVersion": "=0.5.9",
|
||||||
"Dependencies": {},
|
"Dependencies": {},
|
||||||
"OptionalDependencies": {},
|
"OptionalDependencies": {},
|
||||||
"DisabledByDefault": false,
|
"DisabledByDefault": false,
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package dev.projectcapture.hytale;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
class HytaleManifestTest {
|
||||||
|
@Test
|
||||||
|
void pinsTheExactSupportedServerVersionWithValidSemverRangeSyntax() throws Exception {
|
||||||
|
try (InputStream resource = getClass().getClassLoader().getResourceAsStream("manifest.json")) {
|
||||||
|
assertThat(resource).as("plugin manifest resource").isNotNull();
|
||||||
|
JsonNode manifest = new ObjectMapper().readTree(resource);
|
||||||
|
|
||||||
|
assertThat(manifest.path("ServerVersion").asText()).isEqualTo("=0.5.9");
|
||||||
|
assertThat(manifest.path("IncludesAssetPack").asBoolean()).isTrue();
|
||||||
|
assertThat(manifest.path("Main").asText()).isEqualTo("dev.projectcapture.hytale.ProjectCapturePlugin");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
project_root="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||||
|
runtime_root="${PROJECT_CAPTURE_DEV_SERVER:-$(CDPATH= cd -- "${project_root}/.." && pwd -P)/ProjectCapture-devserver}"
|
||||||
|
mods_directory="${runtime_root}/mods"
|
||||||
|
|
||||||
|
[[ -d "${mods_directory}" && ! -L "${mods_directory}" ]] || {
|
||||||
|
printf 'Isolierte Runtime fehlt; zuerst setup-isolated-dev-server.sh ausführen.\n' >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
"${project_root}/gradlew" -p "${project_root}" :hytale-adapter:installToDevMods \
|
||||||
|
-PprojectCapture.devModsDir="${mods_directory}"
|
||||||
Executable
+28
@@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Creates a disposable, local Hytale 0.5.9 server beside the repository. It
|
||||||
|
# never writes to the launcher installation or the project's tracked files.
|
||||||
|
project_root="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||||
|
runtime_root="${PROJECT_CAPTURE_DEV_SERVER:-$(CDPATH= cd -- "${project_root}/.." && pwd -P)/ProjectCapture-devserver}"
|
||||||
|
launcher_root="/Users/christianschindler/Library/Application Support/Hytale/install/release/package/game/latest"
|
||||||
|
server_source="${launcher_root}/Server/HytaleServer.jar"
|
||||||
|
assets_source="${launcher_root}/Assets.zip"
|
||||||
|
|
||||||
|
for source_path in "${server_source}" "${assets_source}"; do
|
||||||
|
[[ -f "${source_path}" && ! -L "${source_path}" ]] || {
|
||||||
|
printf 'Fehlende oder unsichere Hytale-Quelldatei: %s\n' "${source_path}" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
done
|
||||||
|
|
||||||
|
[[ ! -e "${runtime_root}" && ! -L "${runtime_root}" ]] || {
|
||||||
|
printf 'Ziel existiert bereits; nichts wurde überschrieben: %s\n' "${runtime_root}" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir -p "${runtime_root}/Server" "${runtime_root}/mods" "${runtime_root}/universe"
|
||||||
|
cp -- "${server_source}" "${runtime_root}/Server/HytaleServer.jar"
|
||||||
|
cp -- "${assets_source}" "${runtime_root}/Assets.zip"
|
||||||
|
|
||||||
|
printf 'Isolierte Hytale-0.5.9-Runtime angelegt: %s\n' "${runtime_root}"
|
||||||
Executable
+23
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Local-only multiplayer test runtime. Insecure authentication is deliberately
|
||||||
|
# restricted to loopback so two local clients can exercise shared state.
|
||||||
|
project_root="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||||
|
runtime_root="${PROJECT_CAPTURE_DEV_SERVER:-$(CDPATH= cd -- "${project_root}/.." && pwd -P)/ProjectCapture-devserver}"
|
||||||
|
server_directory="${runtime_root}/Server"
|
||||||
|
|
||||||
|
[[ -f "${server_directory}/HytaleServer.jar" && -f "${runtime_root}/Assets.zip" ]] || {
|
||||||
|
printf 'Isolierte Runtime fehlt; zuerst setup-isolated-dev-server.sh ausführen.\n' >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
cd "${server_directory}"
|
||||||
|
export HYTALE_DISABLE_UPDATES=true
|
||||||
|
exec java -Xmx4G -jar HytaleServer.jar \
|
||||||
|
--assets "${runtime_root}/Assets.zip" \
|
||||||
|
--mods "${runtime_root}/mods" \
|
||||||
|
--universe "${runtime_root}/universe" \
|
||||||
|
--auth-mode insecure \
|
||||||
|
--bind 127.0.0.1:5521 \
|
||||||
|
--disable-sentry
|
||||||
Reference in New Issue
Block a user