1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-08-27 16:19:49 +02:00

Update to Minecraft 1.21.5

This commit is contained in:
Luck
2025-03-27 19:46:43 +00:00
parent 6b7283ac83
commit 7744913df2
10 changed files with 17 additions and 19 deletions

View File

@@ -13,9 +13,9 @@ repositories {
dependencies { dependencies {
// https://modmuss50.me/fabric.html // https://modmuss50.me/fabric.html
minecraft 'com.mojang:minecraft:1.21.4' minecraft 'com.mojang:minecraft:1.21.5'
mappings 'net.fabricmc:yarn:1.21.4+build.1:v2' mappings 'net.fabricmc:yarn:1.21.5+build.1:v2'
modImplementation 'net.fabricmc:fabric-loader:0.16.9' modImplementation 'net.fabricmc:fabric-loader:0.16.10'
Set<String> apiModules = [ Set<String> apiModules = [
'fabric-api-base', 'fabric-api-base',
@@ -26,7 +26,7 @@ dependencies {
] ]
apiModules.forEach { apiModules.forEach {
modImplementation(fabricApi.module(it, '0.111.0+1.21.4')) modImplementation(fabricApi.module(it, '0.119.0+1.21.5'))
} }
include(modImplementation('me.lucko:fabric-permissions-api:0.3.3')) include(modImplementation('me.lucko:fabric-permissions-api:0.3.3'))

View File

@@ -73,8 +73,7 @@ public class FabricPlayerCalculator implements ContextCalculator<ServerPlayerEnt
@Override @Override
public void calculate(@NonNull ServerPlayerEntity target, @NonNull ContextConsumer consumer) { public void calculate(@NonNull ServerPlayerEntity target, @NonNull ContextConsumer consumer) {
GameMode mode = target.interactionManager.getGameMode(); GameMode mode = target.interactionManager.getGameMode();
final int GAME_MODE_NOT_SET = -1; // GameMode.NOT_SET with ID -1 was removed in 1.17 if (this.gamemode && mode != null) {
if (this.gamemode && mode != null && mode.getId() != GAME_MODE_NOT_SET) {
consumer.accept(DefaultContextKeys.GAMEMODE_KEY, GAMEMODE_NAMER.name(mode)); consumer.accept(DefaultContextKeys.GAMEMODE_KEY, GAMEMODE_NAMER.name(mode));
} }

View File

@@ -1,2 +1,2 @@
minecraftVersion=1.21.4 minecraftVersion=1.21.5
forgeVersion=54.0.6 forgeVersion=55.0.0

View File

@@ -1,9 +1,9 @@
[versions] [versions]
shadow = "8.3.0" shadow = "8.3.0"
blossom = "1.3.1" blossom = "1.3.1"
moddevgradle = "1.0.21" moddevgradle = "2.0.78"
forgegradle = "[6.0,6.2)" forgegradle = "[6.0,6.2)"
loom = "1.7-SNAPSHOT" loom = "1.10-SNAPSHOT"
licenser = "0.6.1" licenser = "0.6.1"
[plugins] [plugins]

Binary file not shown.

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

3
gradlew vendored
View File

@@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -1,2 +1,2 @@
minecraftVersion=1.21.4 minecraftVersion=1.21.5
neoForgeVersion=21.4.10-beta neoForgeVersion=21.5.2-beta

View File

@@ -20,11 +20,11 @@ neoForge {
runs { runs {
client { client {
client() client()
mods.set(new HashSet()) // Work around classpath issues by using the production jar for dev runs //mods.set(new HashSet()) // Work around classpath issues by using the production jar for dev runs
} }
server { server {
server() server()
mods.set(new HashSet()) // Work around classpath issues by using the production jar for dev runs //mods.set(new HashSet()) // Work around classpath issues by using the production jar for dev runs
} }
} }
} }

View File

@@ -36,7 +36,7 @@ import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands; import net.minecraft.commands.Commands;
import net.minecraft.server.players.ServerOpList; import net.minecraft.server.players.ServerOpList;
import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.neoforge.event.AddReloadListenerEvent; import net.neoforged.neoforge.event.AddServerReloadListenersEvent;
import net.neoforged.neoforge.event.CommandEvent; import net.neoforged.neoforge.event.CommandEvent;
import net.neoforged.neoforge.event.server.ServerStartedEvent; import net.neoforged.neoforge.event.server.ServerStartedEvent;
@@ -71,7 +71,7 @@ public class NeoForgePlatformListener {
} }
@SubscribeEvent @SubscribeEvent
public void onAddReloadListener(AddReloadListenerEvent event) { public void onAddReloadListener(AddServerReloadListenersEvent event) {
Commands commands = event.getServerResources().getCommands(); Commands commands = event.getServerResources().getCommands();
BrigadierInjector.inject(this.plugin, commands.getDispatcher()); BrigadierInjector.inject(this.plugin, commands.getDispatcher());
} }