Skip to content

Commit

Permalink
Update to 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jwkerr committed Feb 11, 2025
1 parent 5410786 commit 2a0eaf1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 37 deletions.
29 changes: 1 addition & 28 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "fabric-loom" version "1.8-SNAPSHOT"
id "fabric-loom" version "1.9-SNAPSHOT"
id "maven-publish"
}

Expand All @@ -26,7 +26,6 @@ repositories {
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
Expand Down Expand Up @@ -55,10 +54,6 @@ processResources {

def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release.set(targetJavaVersion)
Expand All @@ -70,32 +65,10 @@ java {
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}

// configure the maven publication
publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
15 changes: 8 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.16.8
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.8
loader_version=0.16.10
# Mod Properties
mod_version=0.1.2
maven_group=au.lupine
archives_base_name=Chatty
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.97.2+1.20.4
fabric_version=0.116.1+1.21.4

# Mod Dependencies
# https://modrinth.com/mod/modmenu/versions
modmenu_version=9.2.0-beta.2
modmenu_version=13.0.1

# https://docs.isxander.dev/yet-another-config-lib/installing-yacl
yacl_version=3.5.0+1.20.4-fabric
yacl_version=3.6.2+1.21.4-fabric

# https://docs.advntr.dev/platform/fabric.html#dependency
adventure_version=5.12.0
adventure_version=6.2.0
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import au.lupine.chatty.client.config.ChattyConfig;
import net.fabricmc.fabric.api.client.message.v1.ClientReceiveMessageEvents;
import net.kyori.adventure.platform.modcommon.MinecraftClientAudiences;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
import net.minecraft.text.Text;
Expand Down Expand Up @@ -34,7 +35,7 @@ private boolean doesTextPassFilter(Text text) {
ChattyConfig config = ChattyConfig.getInstance();
if (!config.isEnabled) return true;

Component component = text.asComponent();
Component component = MinecraftClientAudiences.of().asAdventure(text);
String message = PlainTextComponentSerializer.plainText().serialize(component);

if (config.hideEmptyMessages && message.isEmpty()) return false;
Expand Down

0 comments on commit 2a0eaf1

Please sign in to comment.