diff --git a/patches/api/add-hand-to-BlockMultiPlaceEvent.patch b/patches/api/add-hand-to-BlockMultiPlaceEvent.patch index 8526102131..f460fc7f6a 100644 --- a/patches/api/add-hand-to-BlockMultiPlaceEvent.patch +++ b/patches/api/add-hand-to-BlockMultiPlaceEvent.patch @@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Deprecated // Paper public BlockMultiPlaceEvent(@NotNull List states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) { - super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild); -+ //Paper start - add hand to BlockMultiPlaceEvent ++ // Paper start - add hand to BlockMultiPlaceEvent + this(states, clicked, itemInHand, thePlayer, canBuild, org.bukkit.inventory.EquipmentSlot.HAND); + } + @@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public BlockMultiPlaceEvent(@NotNull List states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull org.bukkit.inventory.EquipmentSlot hand) { + super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild, hand); this.states = ImmutableList.copyOf(states); -+ //Paper end ++ // Paper end } /** diff --git a/patches/server/Do-not-allow-ticket-level-changes-while-unloading-pl.patch b/patches/server/Do-not-allow-ticket-level-changes-while-unloading-pl.patch index b0b624f0e2..6d9604b554 100644 --- a/patches/server/Do-not-allow-ticket-level-changes-while-unloading-pl.patch +++ b/patches/server/Do-not-allow-ticket-level-changes-while-unloading-pl.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } - // Tuiniy end + // Paper end + boolean unloadingPlayerChunk = false; // Paper - do not allow ticket level changes while unloading chunks public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory, int viewDistance, boolean dsync) { diff --git a/patches/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index f4a642f321..35a62c6cf2 100644 --- a/patches/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch @@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - h.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper + ((org.bukkit.craftbukkit.entity.CraftHumanEntity)h).getHandle().closeUnloadedInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper } -+ // Tuiniy end ++ // Paper end } } // Spigot End diff --git a/patches/server/Expose-Arrow-getItemStack.patch b/patches/server/Expose-Arrow-getItemStack.patch index 0c7af0da2c..49aa5a294a 100644 --- a/patches/server/Expose-Arrow-getItemStack.patch +++ b/patches/server/Expose-Arrow-getItemStack.patch @@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public org.bukkit.craftbukkit.inventory.CraftItemStack getItemStack() { + return org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(getHandle().getPickupItem()); + } -+ //Paper end ++ // Paper end + @Override public void setTicksLived(int value) { diff --git a/patches/server/Handle-Large-Packets-disconnecting-client.patch b/patches/server/Handle-Large-Packets-disconnecting-client.patch index 82f0df3bb8..7d631e757c 100644 --- a/patches/server/Handle-Large-Packets-disconnecting-client.patch +++ b/patches/server/Handle-Large-Packets-disconnecting-client.patch @@ -87,7 +87,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.carriedItem = buf.readItem(); } -+ //Paper start ++ // Paper start + @Override + public boolean packetTooLarge(net.minecraft.network.Connection manager) { + for (int i = 0 ; i < this.items.size() ; i++) { diff --git a/patches/server/MC-Utils.patch b/patches/server/MC-Utils.patch index 41d730c620..b336984029 100644 --- a/patches/server/MC-Utils.patch +++ b/patches/server/MC-Utils.patch @@ -5271,7 +5271,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public final ChunkHolder getUnloadingChunkHolder(int chunkX, int chunkZ) { + return this.pendingUnloads.get(io.papermc.paper.util.CoordinateUtils.getChunkKey(chunkX, chunkZ)); + } -+ // Tuiniy end ++ // Paper end + public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory, int viewDistance, boolean dsync) { super(new File(session.getDimensionPath(world.dimension()), "region"), dataFixer, dsync); diff --git a/patches/server/No-Tick-view-distance-implementation.patch b/patches/server/No-Tick-view-distance-implementation.patch index 26b1df6f5b..a8b7fed532 100644 --- a/patches/server/No-Tick-view-distance-implementation.patch +++ b/patches/server/No-Tick-view-distance-implementation.patch @@ -302,7 +302,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.viewDistance = j; - this.distanceManager.updatePlayerTickets(this.viewDistance); - ObjectIterator objectiterator = this.updatingChunkMap.values().iterator(); -+ this.setNoTickViewDistance(this.getRawNoTickViewDistance()); //Paper - no-tick view distance - propagate changes to no-tick, which does the actual chunk loading/sending ++ this.setNoTickViewDistance(this.getRawNoTickViewDistance()); // Paper - no-tick view distance - propagate changes to no-tick, which does the actual chunk loading/sending + } - while (objectiterator.hasNext()) { diff --git a/patches/server/Optimize-brigadier-child-sorting-performance.patch b/patches/server/Optimize-brigadier-child-sorting-performance.patch index db3004f4a1..c10e9000fd 100644 --- a/patches/server/Optimize-brigadier-child-sorting-performance.patch +++ b/patches/server/Optimize-brigadier-child-sorting-performance.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public abstract class CommandNode implements Comparable> { - private Map> children = Maps.newLinkedHashMap(); -+ private Map> children = Maps.newTreeMap(); //Paper - Switch to tree map for automatic sorting ++ private Map> children = Maps.newTreeMap(); // Paper - Switch to tree map for automatic sorting private Map> literals = Maps.newLinkedHashMap(); private Map> arguments = Maps.newLinkedHashMap(); public Predicate requirement; diff --git a/patches/server/Optimize-isOutsideRange-to-use-distance-maps.patch b/patches/server/Optimize-isOutsideRange-to-use-distance-maps.patch index 3ebd2242ae..a5829a290c 100644 --- a/patches/server/Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/patches/server/Optimize-isOutsideRange-to-use-distance-maps.patch @@ -336,7 +336,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 List list = Lists.newArrayList(this.chunkMap.getChunks()); Collections.shuffle(list); -- //Paper start - call player naturally spawn event +- // Paper start - call player naturally spawn event - int chunkRange = level.spigotConfig.mobSpawnRange; - chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; - chunkRange = Math.min(chunkRange, 8); diff --git a/patches/server/PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/PlayerNaturallySpawnCreaturesEvent.patch index 2d51e0fbf2..01d7bbb7dd 100644 --- a/patches/server/PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/PlayerNaturallySpawnCreaturesEvent.patch @@ -43,7 +43,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 List list = Lists.newArrayList(this.chunkMap.getChunks()); Collections.shuffle(list); -+ //Paper start - call player naturally spawn event ++ // Paper start - call player naturally spawn event + int chunkRange = level.spigotConfig.mobSpawnRange; + chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; + chunkRange = Math.min(chunkRange, 8); diff --git a/patches/server/Replace-player-chunk-loader-system.patch b/patches/server/Replace-player-chunk-loader-system.patch index 1e62bacc18..05bfeffcb5 100644 --- a/patches/server/Replace-player-chunk-loader-system.patch +++ b/patches/server/Replace-player-chunk-loader-system.patch @@ -1375,7 +1375,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 int k = this.viewDistance; this.viewDistance = j; -- this.setNoTickViewDistance(this.getRawNoTickViewDistance()); //Paper - no-tick view distance - propagate changes to no-tick, which does the actual chunk loading/sending +- this.setNoTickViewDistance(this.getRawNoTickViewDistance()); // Paper - no-tick view distance - propagate changes to no-tick, which does the actual chunk loading/sending + this.playerChunkManager.setTickDistance(Mth.clamp(viewDistance, 2, 32)); // Paper - replace player loader system } diff --git a/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 4b4291ae88..c201ad146d 100644 --- a/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -27,7 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @DontObfuscate public String getServerModName() { - return "Spigot"; // Spigot - Spigot > // CraftBukkit - cb > vanilla! -+ return "Paper"; //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! ++ return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! } public SystemReport fillSystemReport(SystemReport details) { diff --git a/patches/server/add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/add-hand-to-BlockMultiPlaceEvent.patch index 030a9527aa..c8ade42964 100644 --- a/patches/server/add-hand-to-BlockMultiPlaceEvent.patch +++ b/patches/server/add-hand-to-BlockMultiPlaceEvent.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } org.bukkit.inventory.ItemStack item; -+ //Paper start - add hand to BlockMultiPlaceEvent ++ // Paper start - add hand to BlockMultiPlaceEvent + EquipmentSlot equipmentSlot; if (hand == InteractionHand.MAIN_HAND) { item = player.getInventory().getItemInMainHand(); @@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild); + BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild, equipmentSlot); -+ //Paper end ++ // Paper end craftServer.getPluginManager().callEvent(event); return event;