fix some build issues

add option for server port
This commit is contained in:
iceBear67 committed 2026-01-14 20:14:37 +08:00
1 parent 034e58d9f5
commit 5a51b350ad
3 files changed
+4 -9

No files matched your search

+2 -8
View File
@@ -1,7 +1,7 @@
plugins {
id 'maven-publish'
id("io.freefair.lombok") version "8.6"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.gradleup.shadow") version "9.3.1"
id 'fabric-loom' version '1.10.1'
}
@@ -50,7 +50,7 @@ remapJar {
dependsOn(shadowJar)
mustRunAfter(shadowJar)
// Set the input jar for the task. Here use the shadow Jar that include the .class of the transitive dependency
inputFile = file(shadowJar.archivePath)
inputFile = shadowJar.archiveFile
}
processResources {
@@ -93,12 +93,6 @@ loom {
accessWidenerPath = file("src/main/resources/sfcraft.accesswidener")
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}
// configure the maven publication
publishing {
publications {
@@ -10,6 +10,7 @@ import java.util.concurrent.ThreadLocalRandom;
public class SFConfig {
public boolean enableOfflineExempt = true;
public String domain = "localhost";
public int port = 25565;
public String webApiBase = "localhost";
public String serverSecret = RandomStringUtils.random(32);
public int httpPort = 8080;
@@ -57,7 +57,7 @@ public class RoomTeleporter {
)
);
networkHandler.send(new StoreCookieS2CPacket(ROOM_COOKIE, cookie), PacketCallbacks.always(() -> {
networkHandler.sendPacket(new ServerTransferS2CPacket(config.domain, serverSupplier.get().getServerPort()));
networkHandler.sendPacket(new ServerTransferS2CPacket(config.domain, config.port));
}));
}
}