aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-12-17 16:50:59 +0100
committerNassim Jahnke <[email protected]>2024-12-17 16:50:59 +0100
commit7caf863b526572460e7642dad62d2b46b5f0bfba (patch)
treeff8e14db7479f43a753d93bd32c30e77b3030906
parent183782ad2ead5f0f1a54a44eab1c8a26cd9f7bda (diff)
downloadPaper-7caf863b526572460e7642dad62d2b46b5f0bfba.tar.gz
Paper-7caf863b526572460e7642dad62d2b46b5f0bfba.zip
Small diff cleanups from patch updating
And remove a dumb log change in PacketEncoder
-rw-r--r--paper-server/patches/features/0005-Allow-Saving-of-Oversized-Chunks.patch6
-rw-r--r--paper-server/patches/sources/com/mojang/datafixers/DataFixerBuilder.java.patch2
-rw-r--r--paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch4
-rw-r--r--paper-server/patches/sources/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java.patch6
-rw-r--r--paper-server/patches/sources/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java.patch8
-rw-r--r--paper-server/patches/sources/net/minecraft/nbt/ByteArrayTag.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/nbt/IntArrayTag.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/network/PacketEncoder.java.patch10
-rw-r--r--paper-server/patches/sources/net/minecraft/network/chat/ChatDecorator.java.patch4
-rw-r--r--paper-server/patches/sources/net/minecraft/network/chat/Component.java.patch2
-rw-r--r--paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java.patch4
-rw-r--r--paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/server/commands/DifficultyCommand.java.patch7
-rw-r--r--paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch12
-rw-r--r--paper-server/patches/sources/net/minecraft/server/players/UserBanListEntry.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/world/item/DebugStickItem.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java.patch5
-rw-r--r--paper-server/patches/sources/net/minecraft/world/level/chunk/DataLayer.java.patch7
-rw-r--r--paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.java.patch5
25 files changed, 27 insertions, 110 deletions
diff --git a/paper-server/patches/features/0005-Allow-Saving-of-Oversized-Chunks.patch b/paper-server/patches/features/0005-Allow-Saving-of-Oversized-Chunks.patch
index 9c998777de..950f460736 100644
--- a/paper-server/patches/features/0005-Allow-Saving-of-Oversized-Chunks.patch
+++ b/paper-server/patches/features/0005-Allow-Saving-of-Oversized-Chunks.patch
@@ -31,10 +31,10 @@ this fix, as the data will remain in the oversized file. Once the server returns
to a jar with this fix, the data will be restored.
diff --git a/net/minecraft/world/level/chunk/storage/RegionFile.java b/net/minecraft/world/level/chunk/storage/RegionFile.java
-index 2b4fa89f15a42ddd627983fbd1377fb7c9864896..7491644233d52dc56d83de5ad3373f6a9a455378 100644
+index d0854fa02be52f560fc91adeb8495a6bd22f6f74..783a2d80f6197dd0af0dc81909f0353a8ea2ecf4 100644
--- a/net/minecraft/world/level/chunk/storage/RegionFile.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFile.java
-@@ -54,6 +54,7 @@ public class RegionFile implements AutoCloseable {
+@@ -53,6 +53,7 @@ public class RegionFile implements AutoCloseable {
this.info = info;
this.path = path;
this.version = version;
@@ -42,7 +42,7 @@ index 2b4fa89f15a42ddd627983fbd1377fb7c9864896..7491644233d52dc56d83de5ad3373f6a
if (!Files.isDirectory(externalFileDir)) {
throw new IllegalArgumentException("Expected directory, got " + externalFileDir.toAbsolutePath());
} else {
-@@ -424,4 +425,75 @@ public class RegionFile implements AutoCloseable {
+@@ -423,4 +424,75 @@ public class RegionFile implements AutoCloseable {
interface CommitOp {
void run() throws IOException;
}
diff --git a/paper-server/patches/sources/com/mojang/datafixers/DataFixerBuilder.java.patch b/paper-server/patches/sources/com/mojang/datafixers/DataFixerBuilder.java.patch
index 70f040476a..020d6ed859 100644
--- a/paper-server/patches/sources/com/mojang/datafixers/DataFixerBuilder.java.patch
+++ b/paper-server/patches/sources/com/mojang/datafixers/DataFixerBuilder.java.patch
@@ -7,7 +7,7 @@
+ private final int minDataFixPrecacheVersion; // Paper - Perf: Cache DataFixerUpper Rewrite Rules on demand
public DataFixerBuilder(final int dataVersion) {
-+ minDataFixPrecacheVersion = Integer.getInteger("Paper.minPrecachedDatafixVersion", dataVersion+1) * 10; // Paper - Perf: default to precache nothing - mojang stores versions * 10 to allow for 'sub versions'
++ this.minDataFixPrecacheVersion = Integer.getInteger("Paper.minPrecachedDatafixVersion", dataVersion + 1) * 10; // Paper - Perf: default to precache nothing - Mojang stores versions * 10 to allow for 'sub versions'
this.dataVersion = dataVersion;
}
diff --git a/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch b/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch
index a6f2415f52..d551548c54 100644
--- a/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch
+++ b/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch
@@ -32,7 +32,7 @@
player.awardStat(Stats.USE_CAULDRON);
player.awardStat(Stats.ITEM_USED.get(item));
- level.setBlockAndUpdate(pos, Blocks.WATER_CAULDRON.defaultBlockState());
-+ // world.setBlockAndUpdate(blockposition, Blocks.WATER_CAULDRON.defaultBlockState()); // CraftBukkit
++ // level.setBlockAndUpdate(pos, Blocks.WATER_CAULDRON.defaultBlockState()); // CraftBukkit
level.playSound(null, pos, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F);
level.gameEvent(null, GameEvent.FLUID_PLACE, pos);
}
@@ -66,7 +66,7 @@
player.awardStat(Stats.USE_CAULDRON);
player.awardStat(Stats.ITEM_USED.get(item));
- LayeredCauldronBlock.lowerFillLevel(state, level, pos);
-+ // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit
++ // LayeredCauldronBlock.lowerFillLevel(state, level, pos); // CraftBukkit
level.playSound(null, pos, SoundEvents.BOTTLE_FILL, SoundSource.BLOCKS, 1.0F, 1.0F);
level.gameEvent(null, GameEvent.FLUID_PICKUP, pos);
}
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java.patch
index 13ffca4845..bceaccc7b8 100644
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java.patch
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java.patch
@@ -24,9 +24,9 @@
+ shrink = false; // Paper - shrink below
+ // Chain to handler for new item
+ ItemStack eventStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getItem());
-+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(blockSource, eventStack); // Paper - Fix NPE with equippable and items without behavior
-+ if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
-+ idispensebehavior.dispense(blockSource, eventStack);
++ DispenseItemBehavior dispenseBehavior = DispenserBlock.getDispenseBehavior(blockSource, eventStack); // Paper - Fix NPE with equippable and items without behavior
++ if (dispenseBehavior != DispenseItemBehavior.NOOP && dispenseBehavior != this) {
++ dispenseBehavior.dispense(blockSource, eventStack);
+ return item;
+ }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java.patch
index ea53919bd2..3533ecd0e6 100644
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java.patch
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java.patch
@@ -1,13 +1,11 @@
--- a/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java
+++ b/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java
-@@ -8,25 +_,48 @@
- import net.minecraft.world.level.block.DispenserBlock;
-
+@@ -10,23 +_,46 @@
public class DefaultDispenseItemBehavior implements DispenseItemBehavior {
-+ private Direction direction; // Paper - cache facing direction
private static final int DEFAULT_ACCURACY = 6;
+ // CraftBukkit start
++ private Direction direction; // Paper - cache facing direction
+ private boolean dropper;
+
+ public DefaultDispenseItemBehavior(boolean dropper) {
@@ -29,7 +27,7 @@
protected ItemStack execute(BlockSource blockSource, ItemStack item) {
- Direction direction = blockSource.state().getValue(DispenserBlock.FACING);
-+ // Paper - cached enum direction
++ // Paper - cache facing direction
Position dispensePosition = DispenserBlock.getDispensePosition(blockSource);
ItemStack itemStack = item.split(1);
- spawnItem(blockSource.level(), itemStack, 6, direction, dispensePosition);
diff --git a/paper-server/patches/sources/net/minecraft/nbt/ByteArrayTag.java.patch b/paper-server/patches/sources/net/minecraft/nbt/ByteArrayTag.java.patch
index 6fd3bac562..3268ad447a 100644
--- a/paper-server/patches/sources/net/minecraft/nbt/ByteArrayTag.java.patch
+++ b/paper-server/patches/sources/net/minecraft/nbt/ByteArrayTag.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/nbt/ByteArrayTag.java
+++ b/net/minecraft/nbt/ByteArrayTag.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.nbt;
-
- import java.io.DataInput;
@@ -23,6 +_,7 @@
private static byte[] readAccounted(DataInput input, NbtAccounter accounter) throws IOException {
accounter.accountBytes(24L);
diff --git a/paper-server/patches/sources/net/minecraft/nbt/IntArrayTag.java.patch b/paper-server/patches/sources/net/minecraft/nbt/IntArrayTag.java.patch
index 16917267c6..4f18628a8b 100644
--- a/paper-server/patches/sources/net/minecraft/nbt/IntArrayTag.java.patch
+++ b/paper-server/patches/sources/net/minecraft/nbt/IntArrayTag.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/nbt/IntArrayTag.java
+++ b/net/minecraft/nbt/IntArrayTag.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.nbt;
-
- import java.io.DataInput;
@@ -23,6 +_,7 @@
private static int[] readAccounted(DataInput input, NbtAccounter accounter) throws IOException {
accounter.accountBytes(24L);
diff --git a/paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch b/paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch
index 752f9b8153..3fc90b348f 100644
--- a/paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch
+++ b/paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/nbt/NbtIo.java
+++ b/net/minecraft/nbt/NbtIo.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.nbt;
-
- import java.io.BufferedOutputStream;
@@ -118,6 +_,12 @@
}
diff --git a/paper-server/patches/sources/net/minecraft/network/PacketEncoder.java.patch b/paper-server/patches/sources/net/minecraft/network/PacketEncoder.java.patch
index 814472ca6a..7318c99f0c 100644
--- a/paper-server/patches/sources/net/minecraft/network/PacketEncoder.java.patch
+++ b/paper-server/patches/sources/net/minecraft/network/PacketEncoder.java.patch
@@ -14,15 +14,7 @@
this.protocolInfo.codec().encode(byteBuf, packet);
int i = byteBuf.readableBytes();
if (LOGGER.isDebugEnabled()) {
-@@ -32,14 +_,40 @@
-
- JvmProfiler.INSTANCE.onPacketSent(this.protocolInfo.id(), packetType, channelHandlerContext.channel().remoteAddress(), i);
- } catch (Throwable var9) {
-- LOGGER.error("Error sending packet {}", packetType, var9);
-+ LOGGER.error("Error sending packet {} (skippable? {})", packetType, packet.isSkippable(), var9);
- if (packet.isSkippable()) {
- throw new SkipPacketException(var9);
- }
+@@ -39,7 +_,33 @@
throw var9;
} finally {
diff --git a/paper-server/patches/sources/net/minecraft/network/chat/ChatDecorator.java.patch b/paper-server/patches/sources/net/minecraft/network/chat/ChatDecorator.java.patch
index 26ba981ff1..dbc8aeb60e 100644
--- a/paper-server/patches/sources/net/minecraft/network/chat/ChatDecorator.java.patch
+++ b/paper-server/patches/sources/net/minecraft/network/chat/ChatDecorator.java.patch
@@ -7,10 +7,10 @@
- ChatDecorator PLAIN = (player, message) -> message;
-
- Component decorate(@Nullable ServerPlayer player, Component message);
-+ ChatDecorator PLAIN = (sender, message) -> java.util.concurrent.CompletableFuture.completedFuture(message); // Paper - adventure; support async chat decoration events
++ ChatDecorator PLAIN = (player, message) -> java.util.concurrent.CompletableFuture.completedFuture(message); // Paper - adventure; support async chat decoration events
+
+ @io.papermc.paper.annotation.DoNotUse @Deprecated // Paper - adventure; support chat decoration events (callers should use the overload with CommandSourceStack)
-+ java.util.concurrent.CompletableFuture<Component> decorate(@Nullable ServerPlayer sender, Component message); // Paper - adventure; support async chat decoration events
++ java.util.concurrent.CompletableFuture<Component> decorate(@Nullable ServerPlayer player, Component message); // Paper - adventure; support async chat decoration events
+
+ // Paper start - adventure; support async chat decoration events
+ default java.util.concurrent.CompletableFuture<Component> decorate(@Nullable ServerPlayer sender, @Nullable net.minecraft.commands.CommandSourceStack commandSourceStack, Component message) {
diff --git a/paper-server/patches/sources/net/minecraft/network/chat/Component.java.patch b/paper-server/patches/sources/net/minecraft/network/chat/Component.java.patch
index 96b7d8debc..5df40c7c2d 100644
--- a/paper-server/patches/sources/net/minecraft/network/chat/Component.java.patch
+++ b/paper-server/patches/sources/net/minecraft/network/chat/Component.java.patch
@@ -9,7 +9,7 @@
+
+ // CraftBukkit start
+ default java.util.stream.Stream<Component> stream() {
-+ return com.google.common.collect.Streams.concat(new java.util.stream.Stream[]{java.util.stream.Stream.of(this), this.getSiblings().stream().flatMap(Component::stream)});
++ return com.google.common.collect.Streams.concat(java.util.stream.Stream.of(this), this.getSiblings().stream().flatMap(Component::stream));
+ }
+
+ @Override
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java.patch
index 131ab3783d..de1815cf3d 100644
--- a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java.patch
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java.patch
@@ -71,12 +71,12 @@
(entryBuilder, buffer) -> entryBuilder.chatSession = buffer.readNullable(RemoteChatSession.Data::read),
- (buffer, entry) -> buffer.writeNullable(entry.chatSession, RemoteChatSession.Data::write)
+ // Paper start - Prevent causing expired keys from impacting new joins
-+ (buf, entry) -> {
++ (buffer, entry) -> {
+ RemoteChatSession.Data chatSession = entry.chatSession;
+ if (chatSession != null && chatSession.profilePublicKey().hasExpired()) {
+ chatSession = null;
+ }
-+ buf.writeNullable(chatSession, RemoteChatSession.Data::write);
++ buffer.writeNullable(chatSession, RemoteChatSession.Data::write);
+ }
+ // Paper end - Prevent causing expired keys from impacting new joins
),
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java.patch
index 5d012097a1..c741092d39 100644
--- a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java.patch
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
+++ b/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.network.protocol.game;
-
- import net.minecraft.network.RegistryFriendlyByteBuf;
@@ -16,6 +_,16 @@
ClientboundSystemChatPacket::overlay,
ClientboundSystemChatPacket::new
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java.patch
index f650a0dbfb..73bc58e48b 100644
--- a/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java.patch
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java
+++ b/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.network.protocol.game;
-
- import net.minecraft.network.FriendlyByteBuf;
@@ -14,6 +_,7 @@
private final BlockHitResult blockHit;
private final InteractionHand hand;
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java.patch
index 460014a7e7..b4e853fe82 100644
--- a/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java.patch
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java
+++ b/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.network.protocol.game;
-
- import net.minecraft.network.FriendlyByteBuf;
@@ -14,6 +_,7 @@
private final int sequence;
private final float yRot;
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch
index 65ea146b9f..752d456ac2 100644
--- a/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
+++ b/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.network.protocol.handshake;
-
- import net.minecraft.network.FriendlyByteBuf;
@@ -20,7 +_,7 @@
}
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/DifficultyCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/DifficultyCommand.java.patch
index e17945d462..5206cb78a7 100644
--- a/paper-server/patches/sources/net/minecraft/server/commands/DifficultyCommand.java.patch
+++ b/paper-server/patches/sources/net/minecraft/server/commands/DifficultyCommand.java.patch
@@ -1,16 +1,15 @@
--- a/net/minecraft/server/commands/DifficultyCommand.java
+++ b/net/minecraft/server/commands/DifficultyCommand.java
-@@ -31,10 +_,11 @@
+@@ -31,10 +_,10 @@
public static int setDifficulty(CommandSourceStack source, Difficulty difficulty) throws CommandSyntaxException {
MinecraftServer server = source.getServer();
- if (server.getWorldData().getDifficulty() == difficulty) {
-+ net.minecraft.server.level.ServerLevel serverLevel = source.getLevel(); // CraftBukkit
-+ if (serverLevel.getDifficulty() == difficulty) { // CraftBukkit
++ if (source.getLevel().getDifficulty() == difficulty) { // CraftBukkit
throw ERROR_ALREADY_DIFFICULT.create(difficulty.getKey());
} else {
- server.setDifficulty(difficulty, true);
-+ server.setDifficulty(serverLevel, difficulty, true); // Paper - per level difficulty; don't skip other difficulty-changing logic (fix upstream's fix)
++ server.setDifficulty(source.getLevel(), difficulty, true); // Paper - per level difficulty; don't skip other difficulty-changing logic (fix upstream's fix)
source.sendSuccess(() -> Component.translatable("commands.difficulty.success", difficulty.getDisplayName()), true);
return 0;
}
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch
index f1221352b7..47fc313fa8 100644
--- a/paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch
+++ b/paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch
@@ -15,12 +15,12 @@
}
+
+ // CraftBukkit start
-+ public static void reload(MinecraftServer minecraftserver) {
-+ PackRepository resourcepackrepository = minecraftserver.getPackRepository();
-+ WorldData savedata = minecraftserver.getWorldData();
-+ Collection<String> collection = resourcepackrepository.getSelectedIds();
-+ Collection<String> collection1 = ReloadCommand.discoverNewPacks(resourcepackrepository, savedata, collection);
-+ minecraftserver.reloadResources(collection1, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause.PLUGIN); // Paper - Add ServerResourcesReloadedEvent
++ public static void reload(MinecraftServer server) {
++ PackRepository packRepository = server.getPackRepository();
++ WorldData worldData = server.getWorldData();
++ Collection<String> selectedIds = packRepository.getSelectedIds();
++ Collection<String> collection = discoverNewPacks(packRepository, worldData, selectedIds);
++ server.reloadResources(collection, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause.PLUGIN); // Paper - Add ServerResourcesReloadedEvent
+ }
+ // CraftBukkit end
diff --git a/paper-server/patches/sources/net/minecraft/server/players/UserBanListEntry.java.patch b/paper-server/patches/sources/net/minecraft/server/players/UserBanListEntry.java.patch
index facd6c1cb4..6e3ece9070 100644
--- a/paper-server/patches/sources/net/minecraft/server/players/UserBanListEntry.java.patch
+++ b/paper-server/patches/sources/net/minecraft/server/players/UserBanListEntry.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/server/players/UserBanListEntry.java
+++ b/net/minecraft/server/players/UserBanListEntry.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.server.players;
-
- import com.google.gson.JsonObject;
@@ -37,19 +_,29 @@
@Nullable
diff --git a/paper-server/patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch b/paper-server/patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch
index 978eabf546..5e1b12c3cb 100644
--- a/paper-server/patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch
+++ b/paper-server/patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/stats/ServerStatsCounter.java
+++ b/net/minecraft/stats/ServerStatsCounter.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.stats;
-
- import com.google.common.collect.Maps;
@@ -51,9 +_,22 @@
LOGGER.error("Couldn't parse statistics file {}", file, var5);
}
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch
index b6fa57bafe..85d0966158 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/world/entity/ai/attributes/Attributes.java
+++ b/net/minecraft/world/entity/ai/attributes/Attributes.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.world.entity.ai.attributes;
-
- import net.minecraft.core.Holder;
@@ -10,7 +_,7 @@
public static final Holder<Attribute> ARMOR_TOUGHNESS = register(
"armor_toughness", new RangedAttribute("attribute.name.armor_toughness", 0.0, 0.0, 20.0).setSyncable(true)
diff --git a/paper-server/patches/sources/net/minecraft/world/item/DebugStickItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/DebugStickItem.java.patch
index 993126f590..8b7cbe2726 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/DebugStickItem.java.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/DebugStickItem.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/world/item/DebugStickItem.java
+++ b/net/minecraft/world/item/DebugStickItem.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.world.item;
-
- import java.util.Collection;
@@ -51,7 +_,7 @@
public boolean handleInteraction(
Player player, BlockState stateClicked, LevelAccessor accessor, BlockPos pos, boolean shouldCycleState, ItemStack debugStack
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java.patch
index 0b9890be26..a10f3c36e7 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
+++ b/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.world.level.chunk;
-
- import com.google.common.base.Stopwatch;
@@ -41,22 +_,109 @@
private final Map<ConcentricRingsStructurePlacement, CompletableFuture<List<ChunkPos>>> ringPositions = new Object2ObjectArrayMap<>();
private boolean hasGeneratedPositions;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/DataLayer.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/DataLayer.java.patch
deleted file mode 100644
index f3ce378056..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/DataLayer.java.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/net/minecraft/world/level/chunk/DataLayer.java
-+++ b/net/minecraft/world/level/chunk/DataLayer.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.world.level.chunk;
-
- import java.util.Arrays;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.java.patch
index 0a25ddead5..93e36df68d 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.java.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.java.patch
@@ -1,10 +1,5 @@
--- a/net/minecraft/world/level/chunk/storage/RegionFile.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFile.java
-@@ -1,3 +_,4 @@
-+// mc-dev import
- package net.minecraft.world.level.chunk.storage;
-
- import com.google.common.annotations.VisibleForTesting;
@@ -46,7 +_,7 @@
protected final RegionBitmap usedSectors = new RegionBitmap();