Add Energy Storage as dependency

This commit is contained in:
2026-02-05 22:10:07 +01:00
parent 5ed67d4e0d
commit 66fb1d619c

View File

@@ -8,16 +8,13 @@ import org.gradle.internal.os.OperatingSystem
ext { ext {
if (project.hasProperty('hytale_home')) { if (project.hasProperty('hytale_home')) {
hytaleHome = project.findProperty('hytale_home') hytaleHome = project.findProperty('hytale_home')
} } else {
else {
def os = OperatingSystem.current() def os = OperatingSystem.current()
if (os.isWindows()) { if (os.isWindows()) {
hytaleHome = "${System.getProperty("user.home")}/AppData/Roaming/Hytale" hytaleHome = "${System.getProperty("user.home")}/AppData/Roaming/Hytale"
} } else if (os.isMacOsX()) {
else if (os.isMacOsX()) {
hytaleHome = "${System.getProperty("user.home")}/Library/Application Support/Hytale" hytaleHome = "${System.getProperty("user.home")}/Library/Application Support/Hytale"
} } else if (os.isLinux()) {
else if (os.isLinux()) {
hytaleHome = "${System.getProperty("user.home")}/.var/app/com.hypixel.HytaleLauncher/data/Hytale" hytaleHome = "${System.getProperty("user.home")}/.var/app/com.hypixel.HytaleLauncher/data/Hytale"
if (!file(hytaleHome).exists()) { if (!file(hytaleHome).exists()) {
hytaleHome = "${System.getProperty("user.home")}/.local/share/Hytale" hytaleHome = "${System.getProperty("user.home")}/.local/share/Hytale"
@@ -28,8 +25,7 @@ ext {
if (!project.hasProperty('hytaleHome')) { if (!project.hasProperty('hytaleHome')) {
throw new GradleException('Your Hytale install could not be detected automatically. If you are on an unsupported platform or using a custom install location, please define the install location using the hytale_home property.'); throw new GradleException('Your Hytale install could not be detected automatically. If you are on an unsupported platform or using a custom install location, please define the install location using the hytale_home property.');
} } else if (!file(project.findProperty('hytaleHome')).exists()) {
else if (!file(project.findProperty('hytaleHome')).exists()) {
throw new GradleException("Failed to find Hytale at the expected location. Please make sure you have installed the game. The expected location can be changed using the hytale_home property. Currently looking in ${project.findProperty('hytaleHome')}") throw new GradleException("Failed to find Hytale at the expected location. Please make sure you have installed the game. The expected location can be changed using the hytale_home property. Currently looking in ${project.findProperty('hytaleHome')}")
} }
@@ -44,10 +40,17 @@ javadoc {
options.addStringOption('Xdoclint:-missing', '-quiet') options.addStringOption('Xdoclint:-missing', '-quiet')
} }
repositories {
maven {
url = uri("https://cursemaven.com")
}
}
// Adds the Hytale server as a build dependency, allowing you to reference and // Adds the Hytale server as a build dependency, allowing you to reference and
// compile against their code. This requires you to have Hytale installed using // compile against their code. This requires you to have Hytale installed using
// the official launcher for now. // the official launcher for now.
dependencies { dependencies {
implementation("curse.maven:EnergyStorage-1429355:7515395")
implementation(files("$hytaleHome/install/$patchline/package/game/latest/Server/HytaleServer.jar")) implementation(files("$hytaleHome/install/$patchline/package/game/latest/Server/HytaleServer.jar"))
} }
@@ -114,15 +117,15 @@ tasks.register('generateVSCodeLaunch') {
} }
def programParams = createServerRunArguments("\${workspaceFolder}") def programParams = createServerRunArguments("\${workspaceFolder}")
def launchConfig = [ def launchConfig = [
version: "0.2.0", version : "0.2.0",
configurations: [ configurations: [
[ [
type: "java", type : "java",
name: "HytaleServer", name : "HytaleServer",
request: "launch", request : "launch",
mainClass: "com.hypixel.hytale.Main", mainClass: "com.hypixel.hytale.Main",
args: programParams, args : programParams,
cwd: "\${workspaceFolder}/run" cwd : "\${workspaceFolder}/run"
] ]
] ]
] ]