Skip to content

Commit 02ac9fe

Browse files
committed
Merge branch 'Architectury-1.20.4' into sb1.20
2 parents 509489b + 8a83be3 commit 02ac9fe

20 files changed

Lines changed: 143 additions & 297 deletions

File tree

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
fetch-tags: true
14+
15+
- name: Setup JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '21'
19+
distribution: 'temurin'
20+
21+
- name: Build with Gradle
22+
uses: gradle/actions/setup-gradle@v3
23+
with:
24+
arguments: build
25+
26+
- name: Upload build artifacts
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: Package
30+
path: "**/build/libs"

build.gradle

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,38 @@ subprojects {
3434
dependencies {
3535
minecraft "net.minecraft:minecraft:$rootProject.minecraft_version"
3636
mappings loom.officialMojangMappings()
37+
38+
tasks.withType(ProcessResources).configureEach {
39+
var replaceProperties = [
40+
minecraft_version : minecraft_version,
41+
architectury_api_version: architectury_api_version,
42+
mod_id : mod_id,
43+
mod_name : mod_name,
44+
mod_license : mod_license,
45+
mod_version : mod_version,
46+
mod_authors : mod_authors,
47+
mod_description : mod_description,
48+
maven_group : maven_group,
49+
mod_contact : mod_contact,
50+
mod_git : mod_git,
51+
52+
//Fabric
53+
fabric_java : fabric_java,
54+
fabric_fabricapi : fabric_fabricapi,
55+
fabric_api_version : fabric_api_version,
56+
fabric_loader_version : fabric_loader_version,
57+
58+
//NeoForge
59+
neoforge_loaderversion : neoforge_loaderversion,
60+
neoforge_loaderrange : neoforge_loaderrange,
61+
neoforge_version : neoforge_version,
62+
]
63+
inputs.properties replaceProperties
64+
65+
filesMatching(['META-INF/neoforge.mods.toml', 'fabric.mod.json'] ) {
66+
expand replaceProperties
67+
}
68+
}
3769
}
3870

3971
java {
@@ -42,12 +74,12 @@ subprojects {
4274
// If you remove this line, sources will not be generated.
4375
withSourcesJar()
4476

45-
sourceCompatibility = JavaVersion.VERSION_17
46-
targetCompatibility = JavaVersion.VERSION_17
77+
sourceCompatibility = JavaVersion.VERSION_21
78+
targetCompatibility = JavaVersion.VERSION_21
4779
}
4880

4981
tasks.withType(JavaCompile).configureEach {
50-
it.options.release = 17
82+
it.options.release = 21
5183
}
5284

5385
// Configure Maven publishing.

common/src/main/java/net/stonebound/simpleircbridge/simpleircbridge/SIBConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class SIBConstants {
99
public static final String FORMAT1_MC_LOGIN = "> %s joined the game";
1010
public static final String FORMAT1_MC_LOGOUT = "< %s left the game";
1111
public static final String FORMAT1_MC_DEATH = "RIP: %s";
12+
public static final String FORMAT1_MC_LOGOUT_STOP = ">>>%s was still online when time came to a halt<<<";
1213

1314
/* == MC FORMATS, 2 PARAMETERS == */
1415
public static final String FORMAT2_MC_EMOTE = "* %s %s";

common/src/main/java/net/stonebound/simpleircbridge/simpleircbridge/SimpleIRCBridgeCommon.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import net.stonebound.simpleircbridge.utils.MircColors;
1414
import org.slf4j.Logger;
1515

16+
import static net.stonebound.simpleircbridge.simpleircbridge.SIBConstants.FORMAT1_MC_LOGOUT_STOP;
17+
1618
import java.net.URI;
1719
import java.net.URISyntaxException;
1820
import java.util.regex.Matcher;
@@ -49,7 +51,9 @@ public void serverStarting(MinecraftServer instance) {
4951

5052
public void serverStopping(MinecraftServer instance) {
5153
if (this.mcServer != null && Config.timestop) {
52-
this.mcServer.getPlayerList().getPlayers().forEach(player -> sendToIrc(MircColors.BOLD + MircColors.LIGHT_RED + ">>>" + player.getName().getString() + " was still online when time came to a halt<<<"));
54+
this.mcServer.getPlayerList()
55+
.getPlayers()
56+
.forEach(player -> sendToIrc(MircColors.BOLD + MircColors.LIGHT_RED + String.format(FORMAT1_MC_LOGOUT_STOP, SIBUtil.mangle(player.getName().getString()))));
5357
}
5458
if (this.bot != null) {
5559
this.bot.disconnect();
File renamed without changes.

fabric/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ dependencies {
3636
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
3737
shadowBundle project(path: ':common', configuration: 'transformProductionFabric')
3838

39-
include("com.electronwill.night-config:core:$rootProject.nightconfig_version")
40-
include("com.electronwill.night-config:toml:$rootProject.nightconfig_version")
39+
shadowBundle(implementation("com.electronwill.night-config:core:$rootProject.nightconfig_version") )
40+
shadowBundle(implementation("com.electronwill.night-config:toml:$rootProject.nightconfig_version"))
4141
}
4242

4343
processResources {
@@ -51,6 +51,13 @@ processResources {
5151
shadowJar {
5252
configurations = [project.configurations.shadowBundle]
5353
archiveClassifier = 'dev-shadow'
54+
55+
relocate 'com.electronwill', 'net.stonebound.SimpleIRCBridge.shaded.com.electronwill'
56+
57+
dependencies {
58+
exclude(dependency("org.slf4j:.*:.*"))
59+
exclude(dependency("org.jetbrains:.*:.*"))
60+
}
5461
}
5562

5663
remapJar {
Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
{
22
"schemaVersion": 1,
3-
"id": "simpleircbridge",
4-
"version": "${version}",
5-
"name": "simple irc bridge",
6-
"description": "This is an example description! Tell everyone what your mod is about!",
3+
"id": "${mod_id}",
4+
"version": "${mod_version}",
5+
"name": "${mod_name}",
6+
"description": "${mod_description}",
77
"authors": [
8-
"Xnrand and contributors"
8+
"${mod_authors}"
99
],
1010
"contact": {
11-
"homepage": "https://fabricmc.net/",
12-
"sources": "https://github.com/FabricMC/fabric-example-mod"
11+
"homepage": "${mod_contact}",
12+
"sources": "${mod_git}"
1313
},
14-
"license": "BSD-2-Clause",
14+
"license": "${mod_license}",
15+
"icon": "assets/simpleircbridge/icon.png",
1516
"environment": "*",
1617
"entrypoints": {
1718
"main": [
1819
"net.stonebound.simpleircbridge.fabric.SimpleIRCBridgeFabric"
1920
]
2021
},
2122
"depends": {
22-
"fabricloader": ">=0.15.11",
23-
"minecraft": "~1.20.4",
24-
"java": ">=17",
25-
"architectury": ">=11.1.17",
26-
"fabric-api": "*"
27-
},
28-
"suggests": {
29-
"another-mod": "*"
23+
"fabricloader": ">=${fabric_loader_version}",
24+
"minecraft": "~${minecraft_version}",
25+
"java": "${fabric_java}",
26+
"architectury": ">=${architectury_api_version}",
27+
"fabric-api": "${fabric_fabricapi}"
3028
}
3129
}

forge/build.gradle

Lines changed: 0 additions & 52 deletions
This file was deleted.

forge/gradle.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

forge/src/main/java/net/stonebound/simpleircbridge/forge/SimpleIRCBridgeForge.java

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)