Remap CraftBukkit to Mojang+Yarn Mappings

By: Initial Source <noreply+automated@papermc.io>
This commit is contained in:
CraftBukkit/Spigot
2024-12-11 22:26:55 +01:00
parent a265d64138
commit 30e4583dbe
1780 changed files with 44628 additions and 41274 deletions

View File

@@ -0,0 +1,20 @@
--- a/net/minecraft/server/commands/GameRuleCommand.java
+++ b/net/minecraft/server/commands/GameRuleCommand.java
@@ -34,7 +34,7 @@
static <T extends GameRules.Value<T>> int setRule(CommandContext<CommandSourceStack> context, GameRules.Key<T> key) {
CommandSourceStack commandlistenerwrapper = (CommandSourceStack) context.getSource();
- T t0 = commandlistenerwrapper.getServer().getGameRules().getRule(key);
+ T t0 = commandlistenerwrapper.getLevel().getGameRules().getRule(key); // CraftBukkit
t0.setFromArgument(context, "value");
commandlistenerwrapper.sendSuccess(() -> {
@@ -44,7 +44,7 @@
}
static <T extends GameRules.Value<T>> int queryRule(CommandSourceStack source, GameRules.Key<T> key) {
- T t0 = source.getServer().getGameRules().getRule(key);
+ T t0 = source.getLevel().getGameRules().getRule(key); // CraftBukkit
source.sendSuccess(() -> {
return Component.translatable("commands.gamerule.query", key.getId(), t0.toString());