Skip to content

Commit 3d1bc4f

Browse files
committed
Update to Minecraft 1.21.11
1 parent d8791aa commit 3d1bc4f

File tree

10 files changed

+38
-21
lines changed

10 files changed

+38
-21
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Java CI
33
on:
44
push:
55
pull_request:
6+
workflow_dispatch:
67

78
jobs:
89
build:

common/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'net.kyori.blossom' version '2.2.0'
3-
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.3'
3+
// id 'org.jetbrains.gradle.plugin.idea-ext' version '1.3'
44
}
55

66
repositories {

fabric/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id 'fabric-loom' version '1.11-SNAPSHOT'
3-
id 'com.gradleup.shadow' version '8.3.5'
2+
id 'fabric-loom' version '1.14-SNAPSHOT'
3+
id 'com.gradleup.shadow' version '9.3.1'
44
}
55

66
java {
@@ -9,10 +9,10 @@ java {
99
}
1010

1111
ext {
12-
minecraft_version = '1.21.8'
13-
yarn_mappings = '1.21.8+build.1'
14-
loader_version = '0.17.2'
15-
fabric_version = '0.132.0+1.21.8'
12+
minecraft_version = '1.21.11'
13+
yarn_mappings = '1.21.11+build.4'
14+
loader_version = '0.18.4'
15+
fabric_version = '0.141.1+1.21.11'
1616
}
1717

1818
dependencies {
@@ -54,6 +54,6 @@ remapJar {
5454
archiveFileName = "AzLink-Fabric-${project.version}-${project.ext.minecraft_version}.jar"
5555
}
5656

57-
artifacts {
58-
archives remapJar
57+
build {
58+
dependsOn remapJar
5959
}

fabric/src/main/java/com/azuriom/azlink/fabric/AzLinkFabricMod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public Stream<CommandSender> getOnlinePlayers() {
133133
@Override
134134
public void dispatchConsoleCommand(String command) {
135135
ServerCommandSource source = getServer().getCommandSource();
136-
getServer().getCommandManager().executeWithPrefix(source, command);
136+
getServer().getCommandManager().parseAndExecute(source, command);
137137
}
138138

139139
@Override

fabric/src/main/java/com/azuriom/azlink/fabric/command/FabricCommandSource.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
package com.azuriom.azlink.fabric.command;
22

33
import com.azuriom.azlink.common.command.CommandSender;
4+
import net.minecraft.command.permission.Permission;
5+
import net.minecraft.command.permission.PermissionLevel;
46
import net.minecraft.entity.Entity;
57
import net.minecraft.server.command.ServerCommandSource;
68

79
import java.util.UUID;
810

911
public class FabricCommandSource implements CommandSender {
1012

13+
private static final Permission PERMISSION_LEVEL_OWNERS = new Permission.Level(PermissionLevel.OWNERS);
14+
1115
private final ServerCommandSource source;
1216

1317
public FabricCommandSource(ServerCommandSource source) {
@@ -35,6 +39,6 @@ public void sendMessage(String message) {
3539

3640
@Override
3741
public boolean hasPermission(String permission) {
38-
return this.source.hasPermissionLevel(3);
42+
return this.source.getPermissions().hasPermission(PERMISSION_LEVEL_OWNERS);
3943
}
4044
}

fabric/src/main/java/com/azuriom/azlink/fabric/command/FabricPlayer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
package com.azuriom.azlink.fabric.command;
22

33
import com.azuriom.azlink.common.command.CommandSender;
4+
import net.minecraft.command.permission.Permission;
5+
import net.minecraft.command.permission.PermissionLevel;
46
import net.minecraft.server.network.ServerPlayerEntity;
57

68
import java.util.UUID;
79

810
public class FabricPlayer implements CommandSender {
911

12+
private static final Permission PERMISSION_LEVEL_OWNERS = new Permission.Level(PermissionLevel.OWNERS);
13+
1014
private final ServerPlayerEntity player;
1115

1216
public FabricPlayer(ServerPlayerEntity player) {
@@ -30,6 +34,6 @@ public void sendMessage(String message) {
3034

3135
@Override
3236
public boolean hasPermission(String permission) {
33-
return this.player.hasPermissionLevel(3);
37+
return this.player.getPermissions().hasPermission(PERMISSION_LEVEL_OWNERS);
3438
}
3539
}

neoforge/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id 'net.neoforged.moddev' version '2.0.82'
3-
id 'com.gradleup.shadow' version '8.3.5'
2+
id 'net.neoforged.moddev' version '2.0.139'
3+
id 'com.gradleup.shadow' version '9.3.1'
44
}
55

66
java {
@@ -9,8 +9,8 @@ java {
99
}
1010

1111
ext {
12-
minecraft_version = '1.21.8'
13-
neo_version = '21.8.4-beta'
12+
minecraft_version = '1.21.11'
13+
neo_version = '21.11.35-beta'
1414
}
1515

1616
neoForge {
@@ -60,6 +60,6 @@ shadowJar {
6060
relocate 'net.kyori', 'com.azuriom.azlink.libs'
6161
}
6262

63-
artifacts {
64-
archives shadowJar
63+
build {
64+
dependsOn shadowJar
6565
}

neoforge/src/main/java/com/azuriom/azlink/neoforge/AzLinkNeoForgeMod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public PlatformInfo getPlatformInfo() {
116116
.map(IModInfo::getDisplayName)
117117
.orElse("unknown");
118118

119-
return new PlatformInfo(name, FMLLoader.versionInfo().neoForgeVersion());
119+
return new PlatformInfo(name, FMLLoader.getCurrent().getVersionInfo().neoForgeVersion());
120120
}
121121

122122
@Override

neoforge/src/main/java/com/azuriom/azlink/neoforge/command/NeoForgeCommandSource.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
import com.azuriom.azlink.common.command.CommandSender;
44
import net.minecraft.commands.CommandSourceStack;
5+
import net.minecraft.server.permissions.Permission;
6+
import net.minecraft.server.permissions.PermissionLevel;
57
import net.minecraft.world.entity.Entity;
68

79
import java.util.UUID;
810

911
public class NeoForgeCommandSource implements CommandSender {
1012

13+
private static final Permission PERMISSION_LEVEL_OWNERS = new Permission.HasCommandLevel(PermissionLevel.OWNERS);
14+
1115
private final CommandSourceStack source;
1216

1317
public NeoForgeCommandSource(CommandSourceStack source) {
@@ -35,6 +39,6 @@ public void sendMessage(String message) {
3539

3640
@Override
3741
public boolean hasPermission(String permission) {
38-
return this.source.hasPermission(3);
42+
return this.source.permissions().hasPermission(PERMISSION_LEVEL_OWNERS);
3943
}
4044
}

neoforge/src/main/java/com/azuriom/azlink/neoforge/command/NeoForgePlayer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
import com.azuriom.azlink.common.command.CommandSender;
44
import net.minecraft.server.level.ServerPlayer;
5+
import net.minecraft.server.permissions.Permission;
6+
import net.minecraft.server.permissions.PermissionLevel;
57

68
import java.util.UUID;
79

810
public class NeoForgePlayer implements CommandSender {
911

12+
private static final Permission PERMISSION_LEVEL_OWNERS = new Permission.HasCommandLevel(PermissionLevel.OWNERS);
13+
1014
private final ServerPlayer player;
1115

1216
public NeoForgePlayer(ServerPlayer player) {
@@ -30,6 +34,6 @@ public void sendMessage(String message) {
3034

3135
@Override
3236
public boolean hasPermission(String permission) {
33-
return this.player.hasPermissions(3);
37+
return this.player.permissions().hasPermission(PERMISSION_LEVEL_OWNERS);
3438
}
3539
}

0 commit comments

Comments
 (0)