Skip to content

Commit

Permalink
1.20.4 - 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Satxm committed May 7, 2024
1 parent 498de87 commit 20cff51
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
cache-read-only: false
gradle-home-cache-cleanup: true
Expand All @@ -31,7 +31,7 @@ jobs:
run: ./gradlew build

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mcwifipnp-artifacts
path: '**/build/libs/*.jar'
2 changes: 2 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17

println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"

version = project.mod_version + "-" + project.minecraft_version + "-fabric"
group = project.mod_group_id

Expand Down
2 changes: 2 additions & 0 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {

java.toolchain.languageVersion = JavaLanguageVersion.of(17)

println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"

version = project.mod_version + "-" + project.minecraft_version + "-forge"
group = project.mod_group_id

Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ org.gradle.debug=false

# Mod Properties
mod_id=mcwifipnp
mod_version=1.6.9
mod_version=1.7.0
mod_group_id=io.github.satxm.mcwifipnp

# Minecraft Properties
minecraft_version = 1.20.4

# Fabric Properties on https://fabricmc.net/develop/
fabric_loader_version = 0.15.9
fabric_loader_version = 0.15.11
fabric_version = 0.97.0+1.20.4

# Forge Properties on https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json
forge_version = 49.0.39
forge_version = 49.0.49

# NeoForge Properties on https://maven.neoforged.net/api/maven/versions/releases/net/neoforged/neoforge
neo_version = 20.4.227
neo_version = 20.4.234

# Quilt Properties on https://lambdaurora.dev/tools/import_quilt.html
quilt_loader_version = 0.25.0-beta.1
qsl_version = 8.0.0-alpha.12
qfapi_version = 9.0.0-alpha.7+0.96.11
quilt_loader_version = 0.26.0-beta.1
# qsl_version = 8.0.0-alpha.12
qfapi_version = 9.0.0-alpha.8+0.97.0-1.20.4

# Mod Config
# Fabric
Expand Down
3 changes: 3 additions & 0 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ plugins {

java.toolchain.languageVersion = JavaLanguageVersion.of(17)

println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"

version = project.mod_version + "-" + project.minecraft_version + "-neoforge"
group = project.mod_group_id

Expand Down Expand Up @@ -38,6 +40,7 @@ minecraft {
}
}
}

dependencies {
implementation "net.neoforged:neoforge:${project.neo_version}"
}
Expand Down
14 changes: 10 additions & 4 deletions neoforge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
modLoader="javafml"
loaderVersion="${neo_loader_version_range}"
license="Apache License 2.0"
issueTrackerURL="https://github.com/Satxm/mcwifipnp/issues"
issueTrackerURL="https://github.com/satxm/mcwifipnp/issues"

[[mods]]
modId="mcwifipnp"
version="${mod_version}"
displayName="LAN World Plug-n-Play"
updateJSONURL=""
#updateJSONURL=""
displayURL="https://github.com/satxm/mcwifipnp"
logoFile="mcwifipnp.png"
authors="Satxm"
description="A Minecraft LAN World Tool With WLAN UPnP."

#[[mixins]]
#config="mcwifipnp.mixins.json"

[[accessTransformers]]
file="META-INF/accesstransformer.cfg"

[[dependencies.mcwifipnp]]
modId="neoforge"
mandatory=true
type="required"
versionRange="${neo_version_range}"
ordering="NONE"
side="CLIENT"

[[dependencies.mcwifipnp]]
modId="minecraft"
mandatory=true
type="required"
versionRange="${minecraft_version_range}"
ordering="NONE"
side="CLIENT"
10 changes: 6 additions & 4 deletions quilt/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
plugins {
id 'org.quiltmc.loom' version '1.4+'
id 'org.quiltmc.loom' version '1.6+'
}

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17

println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"

version = project.mod_version + "-" + project.minecraft_version + "-quilt"
group = project.mod_group_id

Expand All @@ -25,7 +27,7 @@ dependencies {
officialMojangMappings()
}
modImplementation "org.quiltmc:quilt-loader:${project.quilt_loader_version}"
modImplementation "org.quiltmc:qsl:${project.qsl_version}+${project.minecraft_version}"
modImplementation "org.quiltmc.quilted-fabric-api:quilted-fabric-api:${project.qfapi_version}"
}

sourceSets {
Expand Down Expand Up @@ -55,13 +57,13 @@ tasks.withType(ProcessResources).configureEach {
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.encoding = 'UTF-8'
it.options.release = 17
}

java.withSourcesJar()

jar {
from("../LICENSE") {
from('../LICENSE') {
}
}
2 changes: 1 addition & 1 deletion quilt/src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "LAN World Plug-n-Play",
"description": "A Minecraft LAN World Tool With WLAN UPnP.",
"contributors": {
"Me!": "Satxm"
"Satxm": "Owner"
},
"contact": {
"homepage": "https://github.com/satxm/mcwifipnp",
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/github/satxm/mcwifipnp/MCWiFiPnPUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static void ReadingConfig(MinecraftServer server) {
Path location = server.getWorldPath(LevelResource.ROOT).resolve("mcwifipnp.json");
MCWiFiPnPUnit.Config cfg;
try {
cfg = gson.fromJson(new String(Files.readAllBytes(location)), MCWiFiPnPUnit.Config.class);
cfg = gson.fromJson(new String(Files.readAllBytes(location),"utf-8"), MCWiFiPnPUnit.Config.class);
cfg.location = location;
} catch (IOException | JsonParseException e) {
try {
Expand All @@ -178,7 +178,7 @@ public static void CloseUPnPPort(MinecraftServer server) {
static void saveConfig(Config cfg) {
if (!cfg.needsDefaults) {
try {
Files.write(cfg.location, toPrettyFormat(cfg).getBytes(), StandardOpenOption.TRUNCATE_EXISTING,
Files.write(cfg.location, toPrettyFormat(cfg).getBytes("utf-8"), StandardOpenOption.TRUNCATE_EXISTING,
StandardOpenOption.CREATE);
} catch (IOException e) {
LOGGER.warn("Unable to write config file!", e);
Expand All @@ -188,9 +188,9 @@ static void saveConfig(Config cfg) {

public static class Config {
public int port = 25565;
public int maxPlayers = 10;
public int maxPlayers = 8;
public String GameMode = "survival";
public String motd = "A Minecraft LAN World";
public String motd = Component.translatable("lanServer.title").getString();
public boolean AllPlayersCheats = false;
public boolean Whitelist = false;
public boolean UseUPnP = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ protected void init() {
}

public void render(GuiGraphics guiGraphics, int i, int j, float f) {
super.render(guiGraphics, i, j, f);
guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 16, 16777215);
guiGraphics.drawString(this.font, Component.translatable("mcwifipnp.gui.port"), this.width / 2 - 149, 58,
16777215);
Expand All @@ -199,7 +200,5 @@ public void render(GuiGraphics guiGraphics, int i, int j, float f) {
EditPort.render(guiGraphics, i, j, f);
EditPlayers.render(guiGraphics, i, j, f);
EditMotd.render(guiGraphics, i, j, f);
super.render(guiGraphics, i, j, f);
}

}

0 comments on commit 20cff51

Please sign in to comment.