diff --git a/patches/unapplied/api/Add-PlayerSetSpawnEvent.patch b/patches/api/Add-PlayerSetSpawnEvent.patch similarity index 100% rename from patches/unapplied/api/Add-PlayerSetSpawnEvent.patch rename to patches/api/Add-PlayerSetSpawnEvent.patch diff --git a/patches/unapplied/api/Added-EntityDamageItemEvent.patch b/patches/api/Added-EntityDamageItemEvent.patch similarity index 100% rename from patches/unapplied/api/Added-EntityDamageItemEvent.patch rename to patches/api/Added-EntityDamageItemEvent.patch diff --git a/patches/unapplied/api/Change-EnderEye-target-without-changing-other-things.patch b/patches/api/Change-EnderEye-target-without-changing-other-things.patch similarity index 100% rename from patches/unapplied/api/Change-EnderEye-target-without-changing-other-things.patch rename to patches/api/Change-EnderEye-target-without-changing-other-things.patch diff --git a/patches/unapplied/api/Make-EntityUnleashEvent-cancellable.patch b/patches/api/Make-EntityUnleashEvent-cancellable.patch similarity index 100% rename from patches/unapplied/api/Make-EntityUnleashEvent-cancellable.patch rename to patches/api/Make-EntityUnleashEvent-cancellable.patch diff --git a/patches/unapplied/api/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/api/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/unapplied/api/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/api/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/unapplied/api/Stinger-API.patch b/patches/api/Stinger-API.patch similarity index 100% rename from patches/unapplied/api/Stinger-API.patch rename to patches/api/Stinger-API.patch diff --git a/patches/unapplied/api/fix-empty-array-elements-in-command-arguments.patch b/patches/api/fix-empty-array-elements-in-command-arguments.patch similarity index 100% rename from patches/unapplied/api/fix-empty-array-elements-in-command-arguments.patch rename to patches/api/fix-empty-array-elements-in-command-arguments.patch diff --git a/patches/unapplied/server/Add-PlayerSetSpawnEvent.patch b/patches/server/Add-PlayerSetSpawnEvent.patch similarity index 92% rename from patches/unapplied/server/Add-PlayerSetSpawnEvent.patch rename to patches/server/Add-PlayerSetSpawnEvent.patch index b5eb7a0f64..3589a98d8d 100644 --- a/patches/unapplied/server/Add-PlayerSetSpawnEvent.patch +++ b/patches/server/Add-PlayerSetSpawnEvent.patch @@ -35,11 +35,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + @Deprecated // Paper - public void setRespawnPosition(ResourceKey dimension, @Nullable BlockPos pos, float angle, boolean spawnPointSet, boolean sendMessage) { + public void setRespawnPosition(ResourceKey dimension, @Nullable BlockPos pos, float angle, boolean forced, boolean sendMessage) { + // Paper start -+ this.setRespawnPosition(dimension, pos, angle, spawnPointSet, sendMessage, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause.UNKNOWN); ++ this.setRespawnPosition(dimension, pos, angle, forced, sendMessage, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause.UNKNOWN); + } -+ public void setRespawnPosition(ResourceKey dimension, @Nullable BlockPos pos, float angle, boolean spawnPointSet, boolean sendMessage, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause cause) { ++ public void setRespawnPosition(ResourceKey dimension, @Nullable BlockPos pos, float angle, boolean forced, boolean sendMessage, com.destroystokyo.paper.event.player.PlayerSetSpawnEvent.Cause cause) { + Location spawnLoc = null; + boolean willNotify = false; if (pos != null) { @@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + spawnLoc.setYaw(angle); + willNotify = sendMessage && !flag2; + } -+ com.destroystokyo.paper.event.player.PlayerSetSpawnEvent event = new com.destroystokyo.paper.event.player.PlayerSetSpawnEvent(this.getBukkitEntity(), cause, spawnLoc, spawnPointSet, willNotify, willNotify ? net.kyori.adventure.text.Component.translatable("block.minecraft.set_spawn") : null); ++ com.destroystokyo.paper.event.player.PlayerSetSpawnEvent event = new com.destroystokyo.paper.event.player.PlayerSetSpawnEvent(this.getBukkitEntity(), cause, spawnLoc, forced, willNotify, willNotify ? net.kyori.adventure.text.Component.translatable("block.minecraft.set_spawn") : null); + if (!event.callEvent()) { + return; + } @@ -56,7 +56,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + dimension = event.getLocation().getWorld() != null ? ((CraftWorld) event.getLocation().getWorld()).getHandle().dimension() : dimension; + pos = net.minecraft.server.MCUtil.toBlockPosition(event.getLocation()); + angle = (float) event.getLocation().getYaw(); -+ spawnPointSet = event.isForced(); ++ forced = event.isForced(); + // Paper end - if (sendMessage && !flag2) { diff --git a/patches/unapplied/server/Add-System.out-err-catcher.patch b/patches/server/Add-System.out-err-catcher.patch similarity index 100% rename from patches/unapplied/server/Add-System.out-err-catcher.patch rename to patches/server/Add-System.out-err-catcher.patch diff --git a/patches/unapplied/server/Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch similarity index 100% rename from patches/unapplied/server/Add-a-bunch-of-missing-forceDrop-toggles.patch rename to patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch diff --git a/patches/unapplied/server/Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/Add-config-for-mobs-immune-to-default-effects.patch similarity index 100% rename from patches/unapplied/server/Add-config-for-mobs-immune-to-default-effects.patch rename to patches/server/Add-config-for-mobs-immune-to-default-effects.patch diff --git a/patches/unapplied/server/Added-EntityDamageItemEvent.patch b/patches/server/Added-EntityDamageItemEvent.patch similarity index 100% rename from patches/unapplied/server/Added-EntityDamageItemEvent.patch rename to patches/server/Added-EntityDamageItemEvent.patch diff --git a/patches/unapplied/server/Allow-skipping-writing-of-comments-to-server.propert.patch b/patches/server/Allow-skipping-writing-of-comments-to-server.propert.patch similarity index 100% rename from patches/unapplied/server/Allow-skipping-writing-of-comments-to-server.propert.patch rename to patches/server/Allow-skipping-writing-of-comments-to-server.propert.patch diff --git a/patches/unapplied/server/Change-EnderEye-target-without-changing-other-things.patch b/patches/server/Change-EnderEye-target-without-changing-other-things.patch similarity index 100% rename from patches/unapplied/server/Change-EnderEye-target-without-changing-other-things.patch rename to patches/server/Change-EnderEye-target-without-changing-other-things.patch diff --git a/patches/unapplied/server/Clear-bucket-NBT-after-dispense.patch b/patches/server/Clear-bucket-NBT-after-dispense.patch similarity index 100% rename from patches/unapplied/server/Clear-bucket-NBT-after-dispense.patch rename to patches/server/Clear-bucket-NBT-after-dispense.patch diff --git a/patches/unapplied/server/Config-option-for-Piglins-guarding-chests.patch b/patches/server/Config-option-for-Piglins-guarding-chests.patch similarity index 91% rename from patches/unapplied/server/Config-option-for-Piglins-guarding-chests.patch rename to patches/server/Config-option-for-Piglins-guarding-chests.patch index b280529b7e..bdfb15d22a 100644 --- a/patches/unapplied/server/Config-option-for-Piglins-guarding-chests.patch +++ b/patches/server/Config-option-for-Piglins-guarding-chests.patch @@ -29,6 +29,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public static void angerNearbyPiglins(Player player, boolean blockOpen) { + if (!player.level.paperConfig.piglinsGuardChests) return; // Paper - List list = (List) player.level.getEntitiesOfClass(Piglin.class, player.getBoundingBox().inflate(16.0D)); // CraftBukkit - decompile error + List list = player.level.getEntitiesOfClass(Piglin.class, player.getBoundingBox().inflate(16.0D)); list.stream().filter(PiglinAi::isIdle).filter((entitypiglin) -> { diff --git a/patches/unapplied/server/Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/Configurable-item-frame-map-cursor-update-interval.patch similarity index 98% rename from patches/unapplied/server/Configurable-item-frame-map-cursor-update-interval.patch rename to patches/server/Configurable-item-frame-map-cursor-update-interval.patch index 01997871eb..e9563f46a6 100644 --- a/patches/unapplied/server/Configurable-item-frame-map-cursor-update-interval.patch +++ b/patches/server/Configurable-item-frame-map-cursor-update-interval.patch @@ -31,5 +31,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - if (this.tickCount % 10 == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks + if (this.level.paperConfig.mapItemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig.mapItemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable Integer integer = MapItem.getMapId(itemstack); - MapItemSavedData worldmap = MapItem.getSavedData(integer, (Level) this.level); + MapItemSavedData worldmap = MapItem.getSavedData(integer, this.level); diff --git a/patches/unapplied/server/Don-t-apply-cramming-damage-to-players.patch b/patches/server/Don-t-apply-cramming-damage-to-players.patch similarity index 99% rename from patches/unapplied/server/Don-t-apply-cramming-damage-to-players.patch rename to patches/server/Don-t-apply-cramming-damage-to-players.patch index 154aa68eeb..f85eedcc51 100644 --- a/patches/unapplied/server/Don-t-apply-cramming-damage-to-players.patch +++ b/patches/server/Don-t-apply-cramming-damage-to-players.patch @@ -24,7 +24,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + allowPlayerCrammingDamage = getBoolean("allow-player-cramming-damage", allowPlayerCrammingDamage); + } } - diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/patches/unapplied/server/Fix-MerchantOffer-BuyB-Only-AssertionError.patch b/patches/server/Fix-MerchantOffer-BuyB-Only-AssertionError.patch similarity index 100% rename from patches/unapplied/server/Fix-MerchantOffer-BuyB-Only-AssertionError.patch rename to patches/server/Fix-MerchantOffer-BuyB-Only-AssertionError.patch diff --git a/patches/unapplied/server/Fix-block-drops-position-losing-precision-millions-o.patch b/patches/server/Fix-block-drops-position-losing-precision-millions-o.patch similarity index 100% rename from patches/unapplied/server/Fix-block-drops-position-losing-precision-millions-o.patch rename to patches/server/Fix-block-drops-position-losing-precision-millions-o.patch diff --git a/patches/unapplied/server/Fix-incorrect-message-for-outdated-client.patch b/patches/server/Fix-incorrect-message-for-outdated-client.patch similarity index 100% rename from patches/unapplied/server/Fix-incorrect-message-for-outdated-client.patch rename to patches/server/Fix-incorrect-message-for-outdated-client.patch diff --git a/patches/unapplied/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch similarity index 100% rename from patches/unapplied/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch rename to patches/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch diff --git a/patches/unapplied/server/Fix-test-not-bootstrapping.patch b/patches/server/Fix-test-not-bootstrapping.patch similarity index 100% rename from patches/unapplied/server/Fix-test-not-bootstrapping.patch rename to patches/server/Fix-test-not-bootstrapping.patch diff --git a/patches/unapplied/server/Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/Fixes-kick-event-leave-message-not-being-sent.patch similarity index 82% rename from patches/unapplied/server/Fixes-kick-event-leave-message-not-being-sent.patch rename to patches/server/Fixes-kick-event-leave-message-not-being-sent.patch index 20e6e9ed40..54567f9b52 100644 --- a/patches/unapplied/server/Fixes-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/Fixes-kick-event-leave-message-not-being-sent.patch @@ -33,8 +33,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.player.disconnect(); // Paper start - Adventure -- net.kyori.adventure.text.Component quitMessage = this.server.getPlayerList().disconnect(this.player); -+ quitMessage = quitMessage == null ? this.server.getPlayerList().disconnect(this.player) : this.server.getPlayerList().disconnect(this.player, quitMessage); // Paper - pass in quitMessage to fix kick message not being used +- net.kyori.adventure.text.Component quitMessage = this.server.getPlayerList().remove(this.player); ++ quitMessage = quitMessage == null ? this.server.getPlayerList().remove(this.player) : this.server.getPlayerList().remove(this.player, quitMessage); // Paper - pass in quitMessage to fix kick message not being used if ((quitMessage != null) && !quitMessage.equals(net.kyori.adventure.text.Component.empty())) { this.server.getPlayerList().broadcastMessage(PaperAdventure.asVanilla(quitMessage), ChatType.SYSTEM, Util.NIL_UUID); // Paper end @@ -45,11 +45,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class PlayerList { } - public net.kyori.adventure.text.Component disconnect(ServerPlayer entityplayer) { // Paper - return Component + public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // Paper - return Component + // Paper start -+ return this.disconnect(entityplayer, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName()))); ++ return this.remove(entityplayer, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName()))); + } -+ public net.kyori.adventure.text.Component disconnect(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) { ++ public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) { + // Paper end ServerLevel worldserver = entityplayer.getLevel(); diff --git a/patches/unapplied/server/Improve-boat-collision-performance.patch b/patches/server/Improve-boat-collision-performance.patch similarity index 80% rename from patches/unapplied/server/Improve-boat-collision-performance.patch rename to patches/server/Improve-boat-collision-performance.patch index 62ff133abf..7057f3bc42 100644 --- a/patches/unapplied/server/Improve-boat-collision-performance.patch +++ b/patches/server/Improve-boat-collision-performance.patch @@ -13,9 +13,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return new IllegalStateException("No jar file system provider found"); }); + public static final double COLLISION_EPSILON = 1.0E-7; // Paper - static final Logger LOGGER = LogManager.getLogger(); + private static Consumer thePauser = (string) -> { + }; - public static Collector, ?, Map> toMap() { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -68,16 +68,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.lastYd = 0.0D; this.status = Boat.Status.IN_WATER; } else { -diff --git a/src/main/java/net/minecraft/world/item/BoatItem.java b/src/main/java/net/minecraft/world/item/BoatItem.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/item/BoatItem.java -+++ b/src/main/java/net/minecraft/world/item/BoatItem.java -@@ -0,0 +0,0 @@ public class BoatItem extends Item { - - entityboat.setType(this.type); - entityboat.setYRot(user.getYRot()); -- if (!world.noCollision(entityboat, entityboat.getBoundingBox().inflate(-0.1D))) { -+ if (!world.noCollision(entityboat, entityboat.getBoundingBox())) { // Paper - return InteractionResultHolder.fail(itemstack); - } else { - if (!world.isClientSide) { diff --git a/patches/unapplied/server/Make-EntityUnleashEvent-cancellable.patch b/patches/server/Make-EntityUnleashEvent-cancellable.patch similarity index 100% rename from patches/unapplied/server/Make-EntityUnleashEvent-cancellable.patch rename to patches/server/Make-EntityUnleashEvent-cancellable.patch diff --git a/patches/unapplied/server/Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/Make-hoppers-respect-inventory-max-stack-size.patch similarity index 100% rename from patches/unapplied/server/Make-hoppers-respect-inventory-max-stack-size.patch rename to patches/server/Make-hoppers-respect-inventory-max-stack-size.patch diff --git a/patches/unapplied/server/Move-BlockPistonRetractEvent-to-fix-duplication.patch b/patches/server/Move-BlockPistonRetractEvent-to-fix-duplication.patch similarity index 100% rename from patches/unapplied/server/Move-BlockPistonRetractEvent-to-fix-duplication.patch rename to patches/server/Move-BlockPistonRetractEvent-to-fix-duplication.patch diff --git a/patches/unapplied/server/Optimize-entity-tracker-passenger-checks.patch b/patches/server/Optimize-entity-tracker-passenger-checks.patch similarity index 100% rename from patches/unapplied/server/Optimize-entity-tracker-passenger-checks.patch rename to patches/server/Optimize-entity-tracker-passenger-checks.patch diff --git a/patches/unapplied/server/Optimize-indirect-passenger-iteration.patch b/patches/server/Optimize-indirect-passenger-iteration.patch similarity index 98% rename from patches/unapplied/server/Optimize-indirect-passenger-iteration.patch rename to patches/server/Optimize-indirect-passenger-iteration.patch index 4ba2c34830..a435a4cefe 100644 --- a/patches/unapplied/server/Optimize-indirect-passenger-iteration.patch +++ b/patches/server/Optimize-indirect-passenger-iteration.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } private Stream getIndirectPassengersStream() { diff --git a/patches/unapplied/server/Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/Prevent-AFK-kick-while-watching-end-credits.patch similarity index 100% rename from patches/unapplied/server/Prevent-AFK-kick-while-watching-end-credits.patch rename to patches/server/Prevent-AFK-kick-while-watching-end-credits.patch diff --git a/patches/unapplied/server/Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/Rate-options-and-timings-for-sensors-and-behaviors.patch similarity index 98% rename from patches/unapplied/server/Rate-options-and-timings-for-sensors-and-behaviors.patch rename to patches/server/Rate-options-and-timings-for-sensors-and-behaviors.patch index 2b4817c52e..48555bdc14 100644 --- a/patches/unapplied/server/Rate-options-and-timings-for-sensors-and-behaviors.patch +++ b/patches/server/Rate-options-and-timings-for-sensors-and-behaviors.patch @@ -37,15 +37,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import java.util.HashMap; +import java.util.Locale; import java.util.Map; - import java.util.stream.Collectors; + +import com.google.common.collect.HashBasedTable; +import com.google.common.collect.Table; import net.minecraft.world.Difficulty; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.monster.Vindicator; -@@ -0,0 +0,0 @@ import net.minecraft.world.entity.monster.Zombie; - import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode; + import net.minecraft.world.entity.monster.Zombie; import net.minecraft.world.level.NaturalSpawner; import org.bukkit.Bukkit; +import org.bukkit.configuration.ConfigurationSection; @@ -110,7 +108,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return rate != null && rate > -1 ? rate : def; + } } - diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java diff --git a/patches/unapplied/server/Respect-despawn-rate-in-item-merge-check.patch b/patches/server/Respect-despawn-rate-in-item-merge-check.patch similarity index 100% rename from patches/unapplied/server/Respect-despawn-rate-in-item-merge-check.patch rename to patches/server/Respect-despawn-rate-in-item-merge-check.patch diff --git a/patches/unapplied/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/unapplied/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/unapplied/server/Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch b/patches/server/Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch similarity index 100% rename from patches/unapplied/server/Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch rename to patches/server/Set-AsyncAppender-dispatch-thread-to-be-a-daemon-thr.patch diff --git a/patches/unapplied/server/Stinger-API.patch b/patches/server/Stinger-API.patch similarity index 100% rename from patches/unapplied/server/Stinger-API.patch rename to patches/server/Stinger-API.patch