Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit caf0b1b

Browse files
committed
1.19.3 update
1 parent 20c12d8 commit caf0b1b

File tree

7 files changed

+80
-100
lines changed

7 files changed

+80
-100
lines changed

.github/workflows/beta.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- main
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@main
11+
- name: Set up JDK 17
12+
uses: actions/setup-java@v1
13+
with:
14+
java-version: 17
15+
- name: Change wrapper permissions
16+
run: chmod +x ./gradlew
17+
- name: Upload to Discord
18+
run: ./gradlew discord --stacktrace
19+
if: |
20+
!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.pull_request.title, '[ci skip]')
21+
env:
22+
discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}
23+
action_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
24+
- name: Capture build artifacts
25+
uses: actions/upload-artifact@v2
26+
with:
27+
name: Artifacts
28+
path: build/libs/
Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
on:
2-
push:
3-
branches:
4-
- main
2+
workflow_dispatch:
3+
inputs:
4+
previousVersion:
5+
description: 'Previous Version (Do not include v prefix, must be same as the last version tag! Example: 1.4.1)'
6+
required: true
7+
version:
8+
description: 'Version (Do not include v prefix! Example: 1.4.2)'
9+
required: true
510
jobs:
611
build:
712
runs-on: ubuntu-latest
813
steps:
914
- uses: actions/checkout@main
15+
- name: Fetch tags
16+
run: git fetch --tags
1017
- name: Set up JDK 17
1118
uses: actions/setup-java@v1
1219
with:
1320
java-version: 17
14-
- name: Upload to Discord
15-
run: ./gradlew discord --stacktrace
21+
- name: Upload to websites
22+
run: ./gradlew publishThirdParty --stacktrace -PlastTag="v${{ github.event.inputs.previousVersion }}" -PcurrentTag="v${{ github.event.inputs.version }}"
1623
if: |
1724
!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.pull_request.title, '[ci skip]')
1825
env:
19-
discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}
26+
modrinth_token: ${{ secrets.MODRINTH_TOKEN }}
27+
curseforge_token: ${{ secrets.CURSEFORGE_TOKEN }}
28+
github_token: ${{ secrets.GH_API_KEY }}
29+
discord_release_webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
30+
- name: Capture build artifacts
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: Artifacts
34+
path: build/libs/

build.gradle

Lines changed: 3 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import javax.net.ssl.HttpsURLConnection
2-
import java.nio.file.Files
3-
41
plugins {
5-
id 'fabric-loom' version '0.12-SNAPSHOT'
2+
id 'fabric-loom' version '1.0-SNAPSHOT'
63
id 'maven-publish'
74
id "io.freefair.lombok" version "6.0.0-m2"
8-
id "com.diffplug.spotless" version "5.17.1"
95
}
106

117
sourceCompatibility = JavaVersion.VERSION_16
@@ -15,10 +11,7 @@ archivesBaseName = project.archives_base_name
1511
version = "${project.minecraft_version}-${project.mod_version}"
1612
group = project.maven_group
1713

18-
Properties additionalProperties = new Properties()
19-
if (file("extra.properties").exists()) {
20-
additionalProperties.load(file("extra.properties").newReader())
21-
}
14+
apply from: 'https://raw.githubusercontent.com/DarkKronicle/GradleScripts/main/gradle/publish.gradle'
2215

2316
repositories {
2417
mavenCentral()
@@ -31,7 +24,7 @@ dependencies {
3124
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
3225
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
3326
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
34-
modImplementation "fi.dy.masa.malilib:malilib-fabric-1.19.0:${project.malilib_version}"
27+
modImplementation "fi.dy.masa.malilib:malilib-fabric-1.19.3:${project.malilib_version}"
3528
modImplementation "com.github.DarkKronicle:AdvancedChatCore:${project.advancedchat_version}"
3629

3730
implementation 'org.openjdk.nashorn:nashorn-core:15.3'
@@ -65,30 +58,6 @@ jar {
6558
from "LICENSE.txt"
6659
}
6760

68-
spotless {
69-
ratchetFrom 'origin/main'
70-
format 'misc', {
71-
// define the files to apply `misc` to
72-
target '*.gradle', '*.md', '.gitignore'
73-
74-
// define the steps to apply to those files
75-
trimTrailingWhitespace()
76-
indentWithTabs() // or spaces. Takes an integer argument if you don't like 4
77-
endWithNewline()
78-
}
79-
java {
80-
target 'src/*/java/**/*.java'
81-
licenseHeaderFile "HEADER.txt"
82-
}
83-
format 'examples', {
84-
target 'example_filters/**/*.js'
85-
trimTrailingWhitespace()
86-
indentWithTabs()
87-
endWithNewline()
88-
licenseHeaderFile "HEADER.txt", "function setup\\("
89-
}
90-
}
91-
9261
// configure the maven publication
9362
publishing {
9463
publications {
@@ -109,52 +78,3 @@ publishing {
10978
// mavenLocal()
11079
}
11180
}
112-
113-
task discord {
114-
dependsOn build
115-
116-
doLast {
117-
String webhook
118-
if (additionalProperties["discord_webhook"] != null) {
119-
webhook = additionalProperties["discord_webhook"]
120-
} else if (System.getenv("discord_webhook") != null) {
121-
webhook = System.getenv("discord_webhook")
122-
} else {
123-
System.out.println("No webhook found...")
124-
return
125-
}
126-
127-
File file = remapJar.archiveFile.get().asFile
128-
String commitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim()
129-
String fileName = "$project.archives_base_name}-${project.mod_version}-${commitHash}.jar"
130-
String text = "<:Kronos:799707832399691867> **${project.archives_base_name} v${project.mod_version}-${commitHash} for ${project.minecraft_version}**"
131-
URL url = new URL(webhook)
132-
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection()
133-
134-
def cmdLine = "git log --format=%B -n 1"
135-
def procCommit = cmdLine.execute()
136-
String changeLog = procCommit.in.getText()
137-
text = text + "\n" + changeLog
138-
139-
String boundary = UUID.randomUUID().toString()
140-
connection.setRequestMethod("POST")
141-
connection.setDoOutput(true)
142-
connection.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + boundary)
143-
DataOutputStream stream = new DataOutputStream(connection.getOutputStream());
144-
145-
stream.writeBytes("--" + boundary + "\r\n")
146-
stream.writeBytes("Content-Disposition: form-data; name=\"file\"; filename=\"" + fileName + "\"\r\n\r\n")
147-
stream.write(Files.readAllBytes(file.toPath()))
148-
stream.writeBytes("\r\n")
149-
stream.writeBytes("--" + boundary + "\r\n");
150-
stream.writeBytes('Content-Disposition: form-data; name="content"\r\n\r\n' + text + '\r\n')
151-
stream.writeBytes("--" + boundary + "--\r\n")
152-
153-
stream.flush()
154-
stream.close()
155-
156-
connection.getInputStream().close()
157-
connection.disconnect()
158-
}
159-
160-
}

gradle.properties

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
1-
minecraft_version=1.19
2-
yarn_mappings=1.19+build.4
3-
loader_version=0.14.8
4-
fabric_api_version=0.57.0+1.19
1+
minecraft_version=1.19.3
2+
yarn_mappings=1.19.3+build.2
3+
loader_version=0.14.11
4+
fabric_api_version=0.68.1+1.19.3
55

6-
mod_version=1.2.6
6+
mod_version=1.2.7
77
maven_group=io.github.darkkronicle
88
archives_base_name=AdvancedChatFilters
99

10-
malilib_version = 0.13.0
10+
malilib_version = 0.14.0
1111
org.gradle.jvmargs=-Xmx1G
12-
advancedchat_version=1.5.3-build1
13-
owo_version=2.0.0
12+
advancedchat_version=v1.5.9
13+
owo_version=2.0.0
14+
15+
# publishing
16+
curseforge_slug=advancedchatfilters
17+
curseforge_id=539122
18+
19+
modrinth_slug=advancedchatfilters
20+
modrinth_id=c6fx2vMe
21+
22+
# default_release_type can be stable, beta, or alpha
23+
default_release_type=stable
24+
project_name=AdvancedChatFilters
25+
project_url=https://modrinth.com/mod/advancedchatfilters
26+
project_logo=https://raw.githubusercontent.com/DarkKronicle/AdvancedChatFilters/main/src/main/resources/assets/advancedchatfilters/icon.png
27+
project_color=0x134bff
28+
changelog_hide_unimportant_commits=true
29+
changelog_max_commit_search=200
30+
discord_webhook_changelog_line_limit=10

src/main/java/io/github/darkkronicle/advancedchatfilters/config/Filter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public enum NotifySound implements IConfigOptionListEntry {
255255
ENDERMAN_TELEPORT("enderman_teleport", SoundEvents.ENTITY_ENDERMAN_TELEPORT),
256256
WOLOLO("wololo", SoundEvents.ENTITY_EVOKER_PREPARE_WOLOLO),
257257
BELL("bell_use", SoundEvents.BLOCK_BELL_USE),
258-
CLICK("button_click", SoundEvents.UI_BUTTON_CLICK),
258+
CLICK("button_click", SoundEvents.UI_BUTTON_CLICK.value()),
259259
HUSK_TO_ZOMBIE("husk_to_zombie", SoundEvents.ENTITY_HUSK_CONVERTED_TO_ZOMBIE),
260260
GLASS_BREAK("glass_break", SoundEvents.BLOCK_GLASS_BREAK);
261261

src/main/java/io/github/darkkronicle/advancedchatfilters/filters/processors/SoundProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public IntRange getArgumentCount() {
9494
}
9595

9696
public static SoundEvent getEvent(String name) {
97-
return new SoundEvent(new Identifier(name));
97+
return SoundEvent.of(new Identifier(name));
9898
}
9999

100100
/* How the filter notifies the client of a found string.

src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"depends": {
2323
"fabricloader": ">=0.13.0",
2424
"fabric": "*",
25-
"minecraft": ">=1.19",
25+
"minecraft": ">=1.19.3",
2626
"malilib": ">=0.13.0",
2727
"advancedchatcore": ">=1.4.0-1.18"
2828
},

0 commit comments

Comments
 (0)