Skip to content

Commit 08652f3

Browse files
committed
Update to 1.19.4
1 parent ad74567 commit 08652f3

38 files changed

+388
-634
lines changed

.github/workflows/build.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,23 @@ on: [pull_request, push]
88

99
jobs:
1010
build:
11-
strategy:
12-
fail-fast: false
13-
matrix:
14-
minecraft: [ 1.19.2 ]
1511
runs-on: ubuntu-latest
1612
steps:
1713
- name: Checkout repository
18-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1915
- name: Validate gradle wrapper
20-
uses: gradle/wrapper-validation-action@v1
16+
uses: gradle/actions/wrapper-validation@v3
2117
- name: Setup JDK 17
22-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
2319
with:
2420
distribution: 'temurin'
2521
java-version: '17'
2622
- name: Make gradle wrapper executable
2723
run: chmod +x ./gradlew
2824
- name: Build
29-
run: ./gradlew build -PbuildVersion="${{ matrix.minecraft }}"
25+
run: ./gradlew build
3026
- name: Capture release artifacts
31-
uses: actions/upload-artifact@v3
27+
uses: actions/upload-artifact@v4
3228
with:
3329
name: Artifacts
3430
path: build/libs/

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 LX86
3+
Copyright (c) 2024 LX86
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

build.gradle

+12-117
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
1-
import groovy.json.JsonSlurper
21
plugins {
3-
id 'fabric-loom' version '1.1-SNAPSHOT'
4-
id 'maven-publish'
2+
id 'fabric-loom' version '1.8-SNAPSHOT'
53
id "de.undercouch.download" version "4.1.2"
64
}
75

8-
sourceCompatibility = JavaVersion.VERSION_16
9-
targetCompatibility = JavaVersion.VERSION_16
6+
sourceCompatibility = JavaVersion.VERSION_17
7+
targetCompatibility = JavaVersion.VERSION_17
108

119
version = project.mod_version
1210
group = project.maven_group
1311

14-
def default_minecraft_version = "1.19.2"
15-
def minecraft_version = project.properties.containsKey("buildVersion") ? project.getProperties().get("buildVersion") : default_minecraft_version
16-
def minecraft_major_version = minecraft_version.split("\\.")[0] as int // Always return 1, unless mojang goes haywire :P
17-
def minecraft_main_version = minecraft_version.split("\\.")[1] as int
18-
def mc_requirement = "${minecraft_major_version}.${minecraft_main_version}.x"
19-
def minecraft_minor_version = minecraft_version.split("\\.").size() > 2 ? minecraft_version.split("\\.")[2] as int : 0
20-
def minecraft_version_str = (minecraft_major_version as String) + (minecraft_main_version as String).padLeft(2, '0') + (minecraft_minor_version as String).padLeft(2, '0')
21-
def yarn_mappings = new JsonSlurper().parse(("https://meta.fabricmc.net/v2/versions/yarn/" + minecraft_version).toURL())[0]["version"]
22-
def loader_version = project.loader_version
23-
def fapi_version = getModrinthVersion("fabric", minecraft_version, "fabric-api")
24-
25-
version = minecraft_version + "-" + project.mod_version
12+
version = project.mod_version + "+" + project.minecraft_version
2613

2714
repositories {
2815
// Add repositories to retrieve artifacts from in here.
@@ -51,72 +38,34 @@ task setupLibrary() {
5138
}
5239
}
5340

54-
task downloadOptimizedMod() {
55-
doLast {
56-
def outputPath = "run/mods/"
57-
58-
download {
59-
src getModrinthDLURL("fabric", minecraft_version, "lazydfu")
60-
dest outputPath + "dfu.jar"
61-
overwrite true
62-
}
63-
download {
64-
src getModrinthDLURL("fabric", minecraft_version, "ferrite-core")
65-
dest outputPath + "ferrite-core.jar"
66-
overwrite true
67-
}
68-
download {
69-
src getModrinthDLURL("fabric", minecraft_version, "smoothboot-fabric")
70-
dest outputPath + "smooth-boot.jar"
71-
overwrite true
72-
}
73-
download {
74-
src getModrinthDLURL("fabric", minecraft_version, "ksyxis")
75-
dest outputPath + "ksyxis.jar"
76-
overwrite true
77-
}
78-
}
79-
}
80-
8141
dependencies {
82-
// To change the versions see the gradle.properties file
83-
annotationProcessor "systems.manifold:manifold-preprocessor:${project.manifold_version}"
84-
minecraft "com.mojang:minecraft:${minecraft_version}"
85-
mappings "net.fabricmc:yarn:${yarn_mappings}:v2"
86-
modImplementation "net.fabricmc:fabric-loader:${loader_version}"
42+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
43+
mappings loom.officialMojangMappings()
44+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
8745

88-
// Fabric API. This is technically optional, but you probably want it anyway.
89-
modImplementation "net.fabricmc.fabric-api:fabric-api:${fapi_version}"
46+
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
9047
modImplementation files("lib/mtr-fabric.jar")
91-
92-
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
93-
// You may need to force-disable transitiveness on them.
9448
}
9549

9650
processResources {
9751
inputs.property "version", project.version
9852

9953
filesMatching("fabric.mod.json") {
10054
expand (
101-
"version": project.version,
102-
"mc_version": mc_requirement
55+
"version": project.version,
56+
"mc_version": ">=${project.minecraft_version}"
10357
)
10458
}
10559
}
10660

10761
tasks.withType(JavaCompile).configureEach {
108-
// ensure that the encoding is set to UTF-8, no matter what the system default is
109-
// this fixes some edge cases with special characters not displaying correctly
110-
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
111-
// If Javadoc is generated, this must be specified in that task too.
11262
it.options.encoding = "UTF-8"
11363

114-
// Minecraft 1.17 (21w19a) upwards uses Java 16.
115-
def targetVersion = 16
64+
// Minecraft 1.19 upwards uses Java 17.
65+
def targetVersion = 17
11666
if (JavaVersion.current().isJava9Compatible()) {
11767
it.options.release = targetVersion
11868
}
119-
options.compilerArgs += ['-Xplugin:Manifold', '-AMC_VERSION=' + minecraft_version_str]
12069
}
12170

12271
java {
@@ -130,58 +79,4 @@ jar {
13079
from("LICENSE") {
13180
rename { "${it}_${project.archivesBaseName}"}
13281
}
133-
}
134-
135-
// configure the maven publication
136-
publishing {
137-
publications {
138-
mavenJava(MavenPublication) {
139-
// add all the jars that should be included when publishing to maven
140-
artifact(remapJar) {
141-
builtBy remapJar
142-
}
143-
artifact(sourcesJar) {
144-
builtBy remapSourcesJar
145-
}
146-
}
147-
}
148-
149-
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
150-
allprojects {
151-
repositories {
152-
maven {
153-
url = "https://minecraft.guntram.de/maven/"
154-
}
155-
maven { url 'https://www.jitpack.io' }
156-
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
157-
}
158-
159-
afterEvaluate {
160-
for (def task in it.tasks) {
161-
if (!project.file("lib/mtr-fabric.jar").exists()) {
162-
task.dependsOn rootProject.tasks.setupLibrary
163-
}
164-
}
165-
}
166-
}
167-
}
168-
169-
static def getModrinthVersion(loader, minecraftVersion, projectId) {
170-
def versionsArray = new JsonSlurper().parse(("https://api.modrinth.com/v2/project/" + projectId + "/version").toURL())
171-
for (def versionElement : versionsArray) {
172-
if (versionElement["loaders"].contains(loader) && versionElement["version_type"] == "release" && versionElement["game_versions"].contains(minecraftVersion)) {
173-
return versionElement["version_number"]
174-
}
175-
}
176-
return ""
177-
}
178-
179-
static def getModrinthDLURL(loader, minecraftVersion, projectId) {
180-
def versionsArray = new JsonSlurper().parse(("https://api.modrinth.com/v2/project/" + projectId + "/version").toURL())
181-
for (def versionElement : versionsArray) {
182-
if (versionElement["loaders"].contains(loader) && versionElement["game_versions"].contains(minecraftVersion)) {
183-
return versionElement["files"][0]["url"].toURL()
184-
}
185-
}
186-
return ""
18782
}

gradle.properties

+11-9
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
org.gradle.jvmargs=-Xmx1G
33

44
# Fabric Properties
5-
# check these on https://fabricmc.net/use
6-
loader_version=0.14.17
5+
# check these on https://fabricmc.net/develop
6+
minecraft_version=1.19.4
7+
yarn_mappings=1.19.4+build.2
8+
loader_version=0.16.9
79

810
# Mod Properties
9-
mod_version = 1.0.0
10-
# Change version below to build for another MC version, don't expect to compile right away!
11-
target_mc_version = 1.17.1
12-
maven_group = com.lx.joban
13-
archives_base_name = joban-server-mod
11+
mod_version = 1.1.0
12+
maven_group = com.lx862
13+
archives_base_name = logregator
1414

1515
# Dependencies
16-
manifold_version=2023.1.8
17-
mtr_version=latest
16+
mtr_version=latest
17+
18+
# Fabric API
19+
fabric_version=0.87.2+1.19.4
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/com/lx/logregator/CommandHandler.java

-11
This file was deleted.

src/main/java/com/lx/logregator/Logregator.java

-27
This file was deleted.

src/main/java/com/lx/logregator/Mappings.java

-18
This file was deleted.

src/main/java/com/lx/logregator/commands/logregator.java

-25
This file was deleted.

src/main/java/com/lx/logregator/data/event/Event.java

-22
This file was deleted.

0 commit comments

Comments
 (0)