Remap CraftBukkit to Mojang+Yarn Mappings
By: Initial Source <noreply+automated@papermc.io>
This commit is contained in:
parent
a265d64138
commit
30e4583dbe
1780 changed files with 44628 additions and 41274 deletions
|
@ -0,0 +1,17 @@
|
|||
--- a/net/minecraft/server/commands/DifficultyCommand.java
|
||||
+++ b/net/minecraft/server/commands/DifficultyCommand.java
|
||||
@@ -44,11 +44,12 @@
|
||||
|
||||
public static int setDifficulty(CommandSourceStack source, Difficulty difficulty) throws CommandSyntaxException {
|
||||
MinecraftServer minecraftserver = source.getServer();
|
||||
+ net.minecraft.server.level.ServerLevel worldServer = source.getLevel(); // CraftBukkit
|
||||
|
||||
- if (minecraftserver.getWorldData().getDifficulty() == difficulty) {
|
||||
+ if (worldServer.getDifficulty() == difficulty) { // CraftBukkit
|
||||
throw DifficultyCommand.ERROR_ALREADY_DIFFICULT.create(difficulty.getKey());
|
||||
} else {
|
||||
- minecraftserver.setDifficulty(difficulty, true);
|
||||
+ worldServer.serverLevelData.setDifficulty(difficulty); // CraftBukkit
|
||||
source.sendSuccess(() -> {
|
||||
return Component.translatable("commands.difficulty.success", difficulty.getDisplayName());
|
||||
}, true);
|
Loading…
Add table
Add a link
Reference in a new issue