Update to 26.1

This commit is contained in:
skippyall
2026-05-16 23:04:15 +02:00
parent 8423d9c7cd
commit 7db92ffa33
14 changed files with 113 additions and 74 deletions
+5 -10
View File
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.16-SNAPSHOT' apply true
id 'net.fabricmc.fabric-loom' version "1.16-SNAPSHOT" apply true
id 'maven-publish'
id 'com.gradleup.shadow' version '9.4.1'
}
@@ -29,12 +29,11 @@ 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}"
implementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation include("net.kyori:adventure-platform-fabric:${project.adventure_platform_fabric_version}")
implementation include("net.kyori:adventure-platform-fabric:${project.adventure_platform_fabric_version}")
implementation project(":common")
shadowBundle(project(":common"))
@@ -53,7 +52,7 @@ processResources {
}
}
def targetJavaVersion = 21
def targetJavaVersion = 25
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
@@ -88,10 +87,6 @@ shadowJar {
relocate("de.themoep.minedown.adventure", "io.github.skippyall.minedown")
}
remapJar {
input.set shadowJar.archiveFile
}
// configure the maven publication
publishing {
publications {
+5 -5
View File
@@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.8
yarn_mappings=1.21.8+build.1
minecraft_version=26.1.2
loader_version=0.17.2
loom_version=1.16-SNAPSHOT
# Mod Properties
mod_version = 1.0-SNAPSHOT
mod_version = 1.0.0
maven_group = io.github.skippyall
archives_base_name = ruler-fabric
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.133.4+1.21.8
fabric_version=0.149.0+26.1.2
adventure_platform_fabric_version=6.6.0
adventure_platform_fabric_version=6.9.0
@@ -2,11 +2,11 @@ package io.github.skippyall.ruler.fabric;
import io.github.skippyall.ruler.command.CommandHelper;
import net.kyori.adventure.audience.Audience;
import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.commands.CommandSourceStack;
public class FabricCommandHelper implements CommandHelper<ServerCommandSource> {
public class FabricCommandHelper implements CommandHelper<CommandSourceStack> {
@Override
public Audience toAudience(ServerCommandSource source) {
public Audience toAudience(CommandSourceStack source) {
return source.audience();
}
}
@@ -28,6 +28,6 @@ public class FabricPlatform implements Platform {
@Override
public <T> CompletableFuture<T> runAsync(Supplier<T> supplier) {
return CompletableFuture.supplyAsync(supplier, Util.getMainWorkerExecutor());
return CompletableFuture.supplyAsync(supplier, Util.backgroundExecutor());
}
}
@@ -5,20 +5,20 @@ import io.github.skippyall.ruler.Ruler;
import io.github.skippyall.ruler.command.Commands;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.commands.CommandSourceStack;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class RulerFabric implements ModInitializer {
public static final String MOD_ID = "ruler";
public static final Commands<ServerCommandSource> COMMANDS = new Commands<>(new FabricCommandHelper());
public static final Commands<CommandSourceStack> COMMANDS = new Commands<>(new FabricCommandHelper());
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
@Override
public void onInitialize() {
Ruler.init(new FabricPlatform());
CommandRegistrationCallback.EVENT.register((dispatcher, access,environment) -> {
for(LiteralArgumentBuilder<ServerCommandSource> node : COMMANDS.getCommands()) {
for(LiteralArgumentBuilder<CommandSourceStack> node : COMMANDS.getCommands()) {
dispatcher.register(node);
}
});
+2 -2
View File
@@ -20,7 +20,7 @@
},
"depends": {
"fabricloader": ">=${loader_version}",
"fabric": "*",
"minecraft": "${minecraft_version}"
"fabric-api": "*",
"minecraft": "~26.1"
}
}