Skip to content

Commit 00a592b

Browse files
authored
26.1 support (#123)
* feat: initial 26.1 support * chore: change fabric-loom to quiet-fabric-loom * chore: remove cloud-minecraft-modded-common-fabric-repack
1 parent 3702bd5 commit 00a592b

File tree

14 files changed

+40
-96
lines changed

14 files changed

+40
-96
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/setup-java@v5
1818
with:
1919
distribution: 'temurin'
20-
java-version: 21
20+
java-version: 25
2121
- uses: gradle/actions/setup-gradle@v5
2222
# gradle-build-action doesn't support caching files in the project dir
2323
- uses: actions/cache@v5

cloud-fabric/build.gradle.kts

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import net.fabricmc.loom.task.AbstractRunTask
33
plugins {
44
id("conventions.base")
55
id("conventions.publishing")
6-
id("quiet-fabric-loom")
6+
id("xyz.jpenilla.quiet-fabric-loom")
77
}
88

99
configurations {
@@ -17,25 +17,12 @@ configurations {
1717

1818
exclude("org.checkerframework")
1919
exclude("org.apiguardian")
20-
exclude("org.incendo", "cloud-minecraft-modded-common-fabric-repack")
21-
}
22-
runtimeClasspath {
23-
exclude("org.incendo", "cloud-minecraft-modded-common-fabric-repack")
24-
}
25-
compileClasspath {
26-
exclude("org.incendo", "cloud-minecraft-modded-common-fabric-repack")
2720
}
2821
}
2922

3023
dependencies {
3124
minecraft(libs.minecraft)
32-
mappings(
33-
loom.layered {
34-
officialMojangMappings()
35-
parchment(property("neoForge.parchment.parchmentArtifact")!!)
36-
}
37-
)
38-
modImplementation(libs.fabricLoader)
25+
implementation(libs.fabricLoader)
3926

4027
api(platform(libs.cloud.bom))
4128
api(libs.cloud.core)
@@ -45,18 +32,16 @@ dependencies {
4532
compileOnly(libs.cloud.minecraft.signed.arguments)
4633

4734
offlineLinkedJavadoc(project(":cloud-minecraft-modded-common"))
48-
localRuntime(project(":cloud-minecraft-modded-common"))
49-
compileOnly(project(":cloud-minecraft-modded-common"))
50-
api(project(":cloud-minecraft-modded-common-fabric-repack", configuration = "namedElements"))
51-
include(project(":cloud-minecraft-modded-common-fabric-repack"))
52-
53-
modImplementation(platform(fabricApiLibs.bom))
54-
modImplementation(fabricApiLibs.command.api.v2)
55-
modImplementation(fabricApiLibs.networking.api.v1)
56-
modImplementation(fabricApiLibs.lifecycle.events.v1)
57-
58-
modCompileOnly(libs.fabricPermissionsApi)
59-
modLocalRuntime(libs.fabricPermissionsApi)
35+
api(project(":cloud-minecraft-modded-common"))
36+
include(project(":cloud-minecraft-modded-common"))
37+
38+
implementation(platform(fabricApiLibs.bom))
39+
implementation(fabricApiLibs.command.api.v2)
40+
implementation(fabricApiLibs.networking.api.v1)
41+
implementation(fabricApiLibs.lifecycle.events.v1)
42+
43+
compileOnly(libs.fabricPermissionsApi)
44+
localRuntime(libs.fabricPermissionsApi)
6045
}
6146

6247
tasks {
@@ -97,14 +82,10 @@ val testmod: SourceSet by sourceSets.creating {
9782
dependencies.add(implementationConfigurationName, main.output)
9883
}
9984

100-
loom {
101-
createRemapConfigurations(testmod)
102-
}
103-
10485
dependencies {
10586
localRuntime(libs.cloud.minecraft.signed.arguments)
106-
modLocalRuntime(libs.adventureFabric)
107-
"modTestmodImplementation"(libs.adventureFabric)
87+
localRuntime(libs.adventureFabric)
88+
"testmodImplementation"(libs.adventureFabric)
10889
"testmodImplementation"(libs.cloud.minecraft.extras)
10990
localRuntime(libs.cloud.minecraft.extras)
11091
}

cloud-fabric/common-repack/build.gradle.kts

Lines changed: 0 additions & 35 deletions
This file was deleted.

cloud-fabric/src/main/java/org/incendo/cloud/fabric/FabricCommandRegistrationHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import com.mojang.brigadier.tree.RootCommandNode;
2929
import java.util.Set;
3030
import java.util.concurrent.ConcurrentHashMap;
31-
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
3231
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
32+
import net.fabricmc.fabric.api.client.command.v2.ClientCommands;
3333
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
3434
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents;
3535
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
@@ -90,7 +90,7 @@ public boolean registerCommand(final @NonNull Command<C> command) {
9090
if (connection == null) {
9191
throw new IllegalStateException("Expected connection to be present but it wasn't!");
9292
}
93-
final CommandDispatcher<FabricClientCommandSource> dispatcher = ClientCommandManager.getActiveDispatcher();
93+
final CommandDispatcher<FabricClientCommandSource> dispatcher = ClientCommands.getActiveDispatcher();
9494
if (dispatcher == null) {
9595
throw new IllegalStateException("Expected an active dispatcher!");
9696
}

cloud-fabric/src/main/resources/fabric.mod.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
],
2626

2727
"depends": {
28-
"fabricloader": ">=0.18.2",
28+
"fabricloader": ">=0.18.5",
2929
"fabric-command-api-v2": "*",
3030
"fabric-networking-api-v1": "*",
3131
"fabric-lifecycle-events-v1": "*",
32-
"minecraft": ">=1.21.11"
32+
"minecraft": ">=26.1"
3333
}
3434
}

cloud-fabric/src/testmod/java/org/incendo/cloud/fabric/testmod/FabricClientExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void onInitializeClient() {
121121
.handler(ctx -> {
122122
try {
123123
ctx.sender().sendFeedback(
124-
ctx.<ItemInput>get("item").createItemStack(1, false).getDisplayName()
124+
ctx.<ItemInput>get("item").createItemStack(1).getDisplayName()
125125
);
126126
} catch (final CommandSyntaxException ex) {
127127
ctx.sender().sendError(ComponentUtils.fromMessage(ex.getRawMessage()));

cloud-minecraft-modded-common/src/main/java/org/incendo/cloud/minecraft/modded/internal/ModdedParserMappings.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ private static <C, S> void registerRegistryEntryMappings(
234234
}
235235

236236
final Type generic = field.getGenericType(); /* RegistryKey<? extends Registry<?>> */
237-
if (!(generic instanceof ParameterizedType)) {
237+
if (!(generic instanceof ParameterizedType parameterizedType)) {
238238
continue;
239239
}
240240

241-
Type registryType = ((ParameterizedType) generic).getActualTypeArguments()[0];
241+
Type registryType = parameterizedType.getActualTypeArguments()[0];
242242
while (registryType instanceof WildcardType) {
243243
registryType = ((WildcardType) registryType).getUpperBounds()[0];
244244
}

cloud-minecraft-modded-common/src/main/java/org/incendo/cloud/minecraft/modded/parser/VanillaArgumentParsers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ private interface CommandSyntaxExceptionThrowingParseResultSupplier<O> {
321321
final @NonNull Function<CommandSourceStack, CompletableFuture<ArgumentParseResult<O>>> resultFunction
322322
) {
323323
final SharedSuggestionProvider nativeSource = context.get(ModdedCommandContextKeys.SHARED_SUGGESTION_PROVIDER);
324-
if (!(nativeSource instanceof CommandSourceStack) || isClientSource(nativeSource)) {
324+
if (!(nativeSource instanceof CommandSourceStack commandSourceStack) || isClientSource(nativeSource)) {
325325
return ArgumentParseResult.failureFuture(serverOnly());
326326
}
327-
return resultFunction.apply((CommandSourceStack) nativeSource);
327+
return resultFunction.apply(commandSourceStack);
328328
}
329329

330330
/**

cloud-neoforge/src/main/resources/META-INF/neoforge.mods.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ displayTest = "IGNORE_ALL_VERSION"
1616
[[dependencies.cloud]]
1717
modId = "neoforge"
1818
type = "required"
19-
versionRange = "[21.9,)"
19+
versionRange = "[26.1,)"
2020
ordering = "NONE"
2121
side = "BOTH"
2222

2323
[[dependencies.cloud]]
2424
modId = "minecraft"
2525
type = "required"
26-
versionRange = "[1.21.11,)"
26+
versionRange = "[26.1,)"
2727
ordering = "NONE"
2828
side = "BOTH"
2929

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ group=org.incendo
22
version=2.0.0-SNAPSHOT
33
description=Cloud implementations for modded Minecraft
44

5-
neoForge.parchment.parchmentArtifact=io.papermc.parchment.data:parchment:1.21.11+build.2
5+
neoForge.parchment.parchmentArtifact=io.papermc.parchment.data:parchment:1.21.11+build.9
66

77
org.gradle.caching=true
88
org.gradle.configuration-cache=true

0 commit comments

Comments
 (0)