Updated Upstream (CraftBukkit) (#6260)

This commit is contained in:
Jake Potrebic 2021-07-23 19:33:05 -07:00
parent eaaca77f42
commit 7b87553d96
5 changed files with 11 additions and 28 deletions

View file

@ -141,6 +141,7 @@ public net.minecraft.world.entity.Entity isInBubbleColumn()Z
# Allow delegation to vanilla chunk gen
public org.bukkit.craftbukkit.generator.CustomChunkGenerator delegate
private-f org.bukkit.craftbukkit.generator.CraftChunkData sections
# Optimize redstone algorithm
public net.minecraft.world.level.block.RedStoneWireBlock shouldSignal

View file

@ -45,15 +45,6 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
@@ -0,0 +0,0 @@ import org.bukkit.material.MaterialData;
public final class CraftChunkData implements ChunkGenerator.ChunkData {
private final int minHeight;
private final int maxHeight;
- private final LevelChunkSection[] sections;
+ private LevelChunkSection[] sections; // Paper - remove final
private Set<BlockPos> tiles;
private World world; // Paper - Anti-Xray - Add parameters
@@ -0,0 +0,0 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
return this.sections;
}

View file

@ -1431,9 +1431,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
@@ -0,0 +0,0 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
private final int maxHeight;
private final LevelChunkSection[] sections;
private LevelChunkSection[] sections;
private Set<BlockPos> tiles;
private final Set<BlockPos> lights = new HashSet<>();
+ private World world; // Paper - Anti-Xray - Add parameters
public CraftChunkData(World world) {

View file

@ -9,29 +9,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/commands/ScheduleCommand.java
+++ b/src/main/java/net/minecraft/server/commands/ScheduleCommand.java
@@ -0,0 +0,0 @@ public class ScheduleCommand {
return new TranslatableComponent("commands.schedule.cleared.failure", eventName);
return new TranslatableComponent("commands.schedule.cleared.failure", new Object[]{object});
});
private static final SuggestionProvider<CommandSourceStack> SUGGEST_SCHEDULE = (context, builder) -> {
- return SharedSuggestionProvider.suggest(context.getSource().getServer().getWorldData().overworldData().getScheduledEvents().getEventsIds(), builder);
+ return SharedSuggestionProvider.suggest(context.getSource().getLevel().serverLevelData.overworldData().getScheduledEvents().getEventsIds(), builder); // Paper
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 static void register(CommandDispatcher<CommandSourceStack> dispatcher) {
@@ -0,0 +0,0 @@ public class ScheduleCommand {
} else {
long l = source.getLevel().getGameTime() + (long)time;
ResourceLocation resourceLocation = function.getFirst();
- TimerQueue<MinecraftServer> timerQueue = source.getServer().getWorldData().overworldData().getScheduledEvents();
+ TimerQueue<MinecraftServer> timerQueue = source.getLevel().serverLevelData.getScheduledEvents(); // Paper
function.getSecond().ifLeft((functionx) -> {
String string = resourceLocation.toString();
if (replace) {
public ScheduleCommand() {}
@@ -0,0 +0,0 @@ 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 ERROR_CANT_REMOVE.create(eventName);
} else {
throw ScheduleCommand.ERROR_CANT_REMOVE.create(eventName);

@ -1 +1 @@
Subproject commit 0abf420c4b7f12a0c5a3c2116a73c78643711a05
Subproject commit 64d149a5a9dfae226b8fb968b67238d819baaeb6