Fix VanillaGoals when in reobfuscated environment (#6580)
This commit is contained in:
parent
c3d50184eb
commit
1b383d7e9b
285 changed files with 108 additions and 211 deletions
28
patches/server/0603-Make-schedule-command-per-world.patch
Normal file
28
patches/server/0603-Make-schedule-command-per-world.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Mon, 4 Jan 2021 19:52:44 -0800
|
||||
Subject: [PATCH] Make schedule command per-world
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/ScheduleCommand.java b/src/main/java/net/minecraft/server/commands/ScheduleCommand.java
|
||||
index 3f2a4e2399759cdd5aebe0b87c9d72f50cf6a72d..fb1f94acb3e848fa2a21a258145f3b4cb42fe562 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/ScheduleCommand.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/ScheduleCommand.java
|
||||
@@ -32,7 +32,7 @@ public class ScheduleCommand {
|
||||
return new TranslatableComponent("commands.schedule.cleared.failure", new Object[]{object});
|
||||
});
|
||||
private static final SuggestionProvider<CommandSourceStack> SUGGEST_SCHEDULE = (commandcontext, suggestionsbuilder) -> {
|
||||
- return SharedSuggestionProvider.suggest((Iterable) ((CommandSourceStack) commandcontext.getSource()).getServer().getWorldData().overworldData().getScheduledEvents().getEventsIds(), suggestionsbuilder);
|
||||
+ return SharedSuggestionProvider.suggest((Iterable) ((net.minecraft.commands.CommandSourceStack) commandcontext.getSource()).getLevel().serverLevelData.getScheduledEvents().getEventsIds(), suggestionsbuilder); // Paper
|
||||
};
|
||||
|
||||
public ScheduleCommand() {}
|
||||
@@ -83,7 +83,7 @@ public class ScheduleCommand {
|
||||
}
|
||||
|
||||
private static int remove(CommandSourceStack source, String eventName) throws CommandSyntaxException {
|
||||
- int i = source.getServer().getWorldData().overworldData().getScheduledEvents().remove(eventName);
|
||||
+ int i = source.getLevel().serverLevelData.getScheduledEvents().remove(eventName); // Paper
|
||||
|
||||
if (i == 0) {
|
||||
throw ScheduleCommand.ERROR_CANT_REMOVE.create(eventName);
|
Loading…
Add table
Add a link
Reference in a new issue