Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: setup jdk 21
- name: setup jdk 25
uses: actions/setup-java@v4
with:
java-version: 21
java-version: 25
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: setup jdk 21
- name: setup jdk 25
uses: actions/setup-java@v4
with:
java-version: 21
java-version: 25
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
Expand Down
35 changes: 13 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.14-SNAPSHOT'
id 'net.fabricmc.fabric-loom' version "${loom_version}"
id 'maven-publish'
}

Expand Down Expand Up @@ -43,15 +43,13 @@ repositories {
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
implementation "net.fabricmc:fabric-loader:${project.loader_version}"

modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config}") {
exclude(group: "net.fabricmc.fabric-api")
}
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}")
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"

implementation "me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config}"
implementation "com.terraformersmc:modmenu:${project.modmenu_version}"
}

processResources {
Expand All @@ -67,32 +65,25 @@ processResources {
}
}

def targetJavaVersion = 21
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)
}
it.options.release = 25
}

java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
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()

sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}

jar {
inputs.property "archivesName", project.base.archivesName

from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
rename { "${it}_${inputs.properties.archivesName}"}
}
}

Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.11
yarn_mappings=1.21.11+build.1
loader_version=0.18.2
minecraft_version=26.1
loader_version=0.18.5
loom_version=1.15-SNAPSHOT
# Mod Properties
mod_version=1.0-SNAPSHOT
maven_group=com.padbro
archives_base_name=GreeterBro
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.139.4+1.21.11
cloth_config=21.11.152
modmenu_version=17.0.0-alpha.1
fabric_api_version=0.144.3+26.1
cloth_config=26.1.154
modmenu_version=18.0.0-alpha.8
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;

import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommands.literal;

public class AfkCommand {
public static void register(LiteralArgumentBuilder<FabricClientCommandSource> root) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

import static com.mojang.brigadier.arguments.StringArgumentType.getString;
import static com.mojang.brigadier.arguments.StringArgumentType.string;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.argument;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommands.argument;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommands.literal;

public class BlacklistCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
import net.minecraft.commands.CommandBuildContext;

import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommands.literal;

public class CommandManager {
private static final LiteralArgumentBuilder<FabricClientCommandSource> commandRoot =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;

import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommands.literal;

public class DisableCommand {
public static void register(LiteralArgumentBuilder<FabricClientCommandSource> root) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;

import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal;
import static net.fabricmc.fabric.api.client.command.v2.ClientCommands.literal;

public class EnableCommand {
public static void register(LiteralArgumentBuilder<FabricClientCommandSource> root) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ private static void notifyPlayer(MutableComponent message) {
}
LocalPlayer player = minecraftInstance.player;
if (player != null) {
ChatFormatting format =
afkConfig.notifyType == AfkNotifyType.Overlay ? ChatFormatting.YELLOW : ChatFormatting.GRAY;
player.displayClientMessage(message.withStyle(format), afkConfig.notifyType == AfkNotifyType.Overlay);
if (afkConfig.notifyType == AfkNotifyType.Overlay) {
player.sendOverlayMessage(message.withStyle(ChatFormatting.YELLOW));
} else {
player.sendSystemMessage(message.withStyle(ChatFormatting.GRAY));
}
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
],
"depends": {
"fabricloader": ">=${loader_version}",
"fabric": "*",
"minecraft": "${minecraft_version}"
"minecraft": "${minecraft_version}",
"java": ">=25",
"fabric-api": "*"
}
}
Loading