From f6bef3efe8a07138953932f790f96d7c3d30f791 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:12:48 -0700 Subject: [PATCH] some patches --- ...-get-a-BlockState-without-a-snapshot.patch | 0 .../Ability-to-apply-mending-to-XP-API.patch | 0 ...e-PlayerProfile-in-AsyncPreLoginEven.patch | 0 ...ile-Entities-from-a-chunk-without-sn.patch | 0 .../server/Add-ArmorStand-Item-Meta.patch | 0 ...ies-option-to-debug-dupe-uuid-issues.patch | 2 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 4 +- .../server/Add-More-Creeper-API.patch | 0 .../server/Add-PhantomPreSpawnEvent.patch | 0 ...PlayerAdvancementCriterionGrantEvent.patch | 0 .../server/Add-PlayerArmorChangeEvent.patch | 0 .../server/Add-PlayerJumpEvent.patch | 0 .../server/Add-TNTPrimeEvent.patch | 0 ...to-disable-ender-dragon-legacy-check.patch | 0 .../Add-openSign-method-to-HumanEntity.patch | 0 ...-ray-tracing-methods-to-LivingEntity.patch | 0 .../Add-setPlayerProfile-API-for-Skulls.patch | 0 ...ow-chests-to-be-placed-with-NBT-data.patch | 0 ...Allow-disabling-armour-stand-ticking.patch | 0 ...Item-entities-with-World.spawnEntity.patch | 0 ...-a-custom-authentication-servers-dow.patch | 0 .../server/AnvilDamageEvent.patch | 0 .../server/AsyncTabCompleteEvent.patch | 0 .../Block-Enderpearl-Travel-Exploit.patch | 0 ...player-logins-during-server-shutdown.patch | 0 ...nd-make-tab-spam-limits-configurable.patch | 0 ...ServerListPingEvent-for-legacy-pings.patch | 0 ...le-Alternative-LootPool-Luck-Formula.patch | 0 ...le-speed-for-water-flowing-over-lava.patch | 0 ...urable-sprint-interruption-on-attack.patch | 0 ...le-Explicit-Network-Manager-Flushing.patch | 0 ...on-t-call-getItemMeta-on-hasItemMeta.patch | 0 .../server/EnderDragon-Events.patch | 0 .../server/Enderman.teleportRandomly.patch | 0 .../server/EndermanAttackPlayerEvent.patch | 0 .../server/EndermanEscapeEvent.patch | 0 .../server/Entity-fromMobSpawner.patch | 10 ++--- .../server/Expand-Explosions-API.patch | 0 ...ld.spawnParticle-API-and-add-Builder.patch | 0 ...e-attack-cooldown-methods-for-Player.patch | 0 ...nt-protocol-version-and-virtual-host.patch | 0 .../Extend-Player-Interact-cancellation.patch | 0 .../server/Fill-Profile-Property-Events.patch | 12 +++--- .../server/Fix-CraftEntity-hashCode.patch | 0 .../Fix-MC-117075-TE-Unload-Lag-Spike.patch | 6 +-- .../server/Fix-NBT-type-issues.patch | 0 ...-allowed-colored-signs-to-be-created.patch | 0 .../server/Fix-this-stupid-bullshit.patch | 2 +- .../Flag-to-disable-the-channel-limit.patch | 0 ...n-prefixes-using-Log4J-configuration.patch | 0 ...KnockbackByEntityEvent-and-EntityPus.patch | 2 +- ...lement-EntityTeleportEndGatewayEvent.patch | 0 .../Implement-Expanded-ArmorStand-API.patch | 0 .../Implement-World.getEntity-UUID-API.patch | 0 ...mplement-ensureServerConversions-API.patch | 0 ...nt-extended-PaperServerListPingEvent.patch | 0 .../server/Implement-getI18NDisplayName.patch | 0 .../Improve-BlockPosition-inlining.patch | 0 .../server/Improve-EntityShootBowEvent.patch | 0 ...e-Log4J-Configuration-Plugin-Loggers.patch | 0 .../server/Improve-death-events.patch | 0 .../Improve-the-Saddle-API-for-Horses.patch | 0 .../Improved-Async-Task-Scheduler.patch | 0 .../server/Inventory-removeItemAnySlot.patch | 0 .../InventoryCloseEvent-Reason-API.patch | 0 .../ItemStack-getMaxItemUseDuration.patch | 0 ...ivingEntity-Hand-Raised-Item-Use-API.patch | 0 .../server/LivingEntity-setKiller.patch | 0 ...loadChunk-int-int-false-load-unconve.patch | 0 ...ke-legacy-ping-handler-more-reliable.patch | 0 ...e-shield-blocking-delay-configurable.patch | 0 .../server/Mob-Pathfinding-API.patch | 0 ...awns-should-honor-nametags-and-leash.patch | 0 ...ptimize-BlockPosition-helper-methods.patch | 0 .../Optimize-CraftBlockData-Creation.patch | 0 .../server/Optimize-MappedRegistry.patch | 10 ++--- ...t-armor-stands-from-doing-entity-loo.patch | 0 .../server/Player.setPlayerProfile-API.patch | 0 .../server/PlayerElytraBoostEvent.patch | 0 .../server/PlayerLaunchProjectileEvent.patch | 4 +- .../PlayerNaturallySpawnCreaturesEvent.patch | 37 ++++++++----------- .../server/PlayerPickupExperienceEvent.patch | 0 .../server/PlayerReadyArrowEvent.patch | 0 .../server/PreCreatureSpawnEvent.patch | 0 ...sted-Ice-from-loading-holding-chunks.patch | 0 ...rom-being-processed-when-the-player-.patch | 0 ...ils-when-failing-to-save-player-data.patch | 2 +- .../server/Profile-Lookup-Events.patch | 0 .../server/ProfileWhitelistVerifyEvent.patch | 0 .../server/RangedEntity-API.patch | 0 ...nventory-when-cancelling-PlayerInter.patch | 0 ...Remove-unnecessary-itemmeta-handling.patch | 0 ...imer-when-spawner-event-is-cancelled.patch | 0 ...default-mob-spawn-range-and-water-an.patch | 0 ...dEffects-only-to-players-who-can-see.patch | 0 .../server/SkeletonHorse-Additions.patch | 0 .../server/Slime-Pathfinder-Events.patch | 0 .../Tameable-getOwnerUniqueId-API.patch | 0 ...r-crits-helps-mitigate-hacked-client.patch | 0 ...ed-flag-on-cancel-of-Explosion-Event.patch | 0 ...r-to-keep-logging-IO-off-main-thread.patch | 0 .../Use-ConcurrentHashMap-in-JsonList.patch | 0 .../Use-a-Queue-for-Queueing-Commands.patch | 0 .../Vanished-players-don-t-have-rights.patch | 0 .../server/Vex-get-setSummoner-API.patch | 0 .../server/WitchConsumePotionEvent.patch | 0 .../server/WitchReadyPotionEvent.patch | 0 .../server/WitchThrowPotionEvent.patch | 0 ...-more-information-to-Entity.toString.patch | 2 +- .../server/getPlayerUniqueId-API.patch | 0 ...dle-ServerboundKeepAlivePacket-async.patch | 0 ...rt-serverside-behavior-of-keepalives.patch | 0 ...e-implementations-for-captured-block.patch | 0 113 files changed, 43 insertions(+), 50 deletions(-) rename patches/{unapplied => }/server/API-to-get-a-BlockState-without-a-snapshot.patch (100%) rename patches/{unapplied => }/server/Ability-to-apply-mending-to-XP-API.patch (100%) rename patches/{unapplied => }/server/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch (100%) rename patches/{unapplied => }/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch (100%) rename patches/{unapplied => }/server/Add-ArmorStand-Item-Meta.patch (100%) rename patches/{unapplied => }/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch (99%) rename patches/{unapplied => }/server/Add-Early-Warning-Feature-to-WatchDog.patch (98%) rename patches/{unapplied => }/server/Add-More-Creeper-API.patch (100%) rename patches/{unapplied => }/server/Add-PhantomPreSpawnEvent.patch (100%) rename patches/{unapplied => }/server/Add-PlayerAdvancementCriterionGrantEvent.patch (100%) rename patches/{unapplied => }/server/Add-PlayerArmorChangeEvent.patch (100%) rename patches/{unapplied => }/server/Add-PlayerJumpEvent.patch (100%) rename patches/{unapplied => }/server/Add-TNTPrimeEvent.patch (100%) rename patches/{unapplied => }/server/Add-config-to-disable-ender-dragon-legacy-check.patch (100%) rename patches/{unapplied => }/server/Add-openSign-method-to-HumanEntity.patch (100%) rename patches/{unapplied => }/server/Add-ray-tracing-methods-to-LivingEntity.patch (100%) rename patches/{unapplied => }/server/Add-setPlayerProfile-API-for-Skulls.patch (100%) rename patches/{unapplied => }/server/Allow-chests-to-be-placed-with-NBT-data.patch (100%) rename patches/{unapplied => }/server/Allow-disabling-armour-stand-ticking.patch (100%) rename patches/{unapplied => }/server/Allow-spawning-Item-entities-with-World.spawnEntity.patch (100%) rename patches/{unapplied => }/server/Allow-specifying-a-custom-authentication-servers-dow.patch (100%) rename patches/{unapplied => }/server/AnvilDamageEvent.patch (100%) rename patches/{unapplied => }/server/AsyncTabCompleteEvent.patch (100%) rename patches/{unapplied => }/server/Block-Enderpearl-Travel-Exploit.patch (100%) rename patches/{unapplied => }/server/Block-player-logins-during-server-shutdown.patch (100%) rename patches/{unapplied => }/server/Break-up-and-make-tab-spam-limits-configurable.patch (100%) rename patches/{unapplied => }/server/Call-PaperServerListPingEvent-for-legacy-pings.patch (100%) rename patches/{unapplied => }/server/Configurable-Alternative-LootPool-Luck-Formula.patch (100%) rename patches/{unapplied => }/server/Configurable-speed-for-water-flowing-over-lava.patch (100%) rename patches/{unapplied => }/server/Configurable-sprint-interruption-on-attack.patch (100%) rename patches/{unapplied => }/server/Disable-Explicit-Network-Manager-Flushing.patch (100%) rename patches/{unapplied => }/server/Don-t-call-getItemMeta-on-hasItemMeta.patch (100%) rename patches/{unapplied => }/server/EnderDragon-Events.patch (100%) rename patches/{unapplied => }/server/Enderman.teleportRandomly.patch (100%) rename patches/{unapplied => }/server/EndermanAttackPlayerEvent.patch (100%) rename patches/{unapplied => }/server/EndermanEscapeEvent.patch (100%) rename patches/{unapplied => }/server/Entity-fromMobSpawner.patch (92%) rename patches/{unapplied => }/server/Expand-Explosions-API.patch (100%) rename patches/{unapplied => }/server/Expand-World.spawnParticle-API-and-add-Builder.patch (100%) rename patches/{unapplied => }/server/Expose-attack-cooldown-methods-for-Player.patch (100%) rename patches/{unapplied => }/server/Expose-client-protocol-version-and-virtual-host.patch (100%) rename patches/{unapplied => }/server/Extend-Player-Interact-cancellation.patch (100%) rename patches/{unapplied => }/server/Fill-Profile-Property-Events.patch (77%) rename patches/{unapplied => }/server/Fix-CraftEntity-hashCode.patch (100%) rename patches/{unapplied => }/server/Fix-MC-117075-TE-Unload-Lag-Spike.patch (92%) rename patches/{unapplied => }/server/Fix-NBT-type-issues.patch (100%) rename patches/{unapplied => }/server/Fix-exploit-that-allowed-colored-signs-to-be-created.patch (100%) rename patches/{unapplied => }/server/Fix-this-stupid-bullshit.patch (97%) rename patches/{unapplied => }/server/Flag-to-disable-the-channel-limit.patch (100%) rename patches/{unapplied => }/server/Handle-plugin-prefixes-using-Log4J-configuration.patch (100%) rename patches/{unapplied => }/server/Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch (99%) rename patches/{unapplied => }/server/Implement-EntityTeleportEndGatewayEvent.patch (100%) rename patches/{unapplied => }/server/Implement-Expanded-ArmorStand-API.patch (100%) rename patches/{unapplied => }/server/Implement-World.getEntity-UUID-API.patch (100%) rename patches/{unapplied => }/server/Implement-ensureServerConversions-API.patch (100%) rename patches/{unapplied => }/server/Implement-extended-PaperServerListPingEvent.patch (100%) rename patches/{unapplied => }/server/Implement-getI18NDisplayName.patch (100%) rename patches/{unapplied => }/server/Improve-BlockPosition-inlining.patch (100%) rename patches/{unapplied => }/server/Improve-EntityShootBowEvent.patch (100%) rename patches/{unapplied => }/server/Improve-Log4J-Configuration-Plugin-Loggers.patch (100%) rename patches/{unapplied => }/server/Improve-death-events.patch (100%) rename patches/{unapplied => }/server/Improve-the-Saddle-API-for-Horses.patch (100%) rename patches/{unapplied => }/server/Improved-Async-Task-Scheduler.patch (100%) rename patches/{unapplied => }/server/Inventory-removeItemAnySlot.patch (100%) rename patches/{unapplied => }/server/InventoryCloseEvent-Reason-API.patch (100%) rename patches/{unapplied => }/server/ItemStack-getMaxItemUseDuration.patch (100%) rename patches/{unapplied => }/server/LivingEntity-Hand-Raised-Item-Use-API.patch (100%) rename patches/{unapplied => }/server/LivingEntity-setKiller.patch (100%) rename patches/{unapplied => }/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch (100%) rename patches/{unapplied => }/server/Make-legacy-ping-handler-more-reliable.patch (100%) rename patches/{unapplied => }/server/Make-shield-blocking-delay-configurable.patch (100%) rename patches/{unapplied => }/server/Mob-Pathfinding-API.patch (100%) rename patches/{unapplied => }/server/Ocelot-despawns-should-honor-nametags-and-leash.patch (100%) rename patches/{unapplied => }/server/Optimize-BlockPosition-helper-methods.patch (100%) rename patches/{unapplied => }/server/Optimize-CraftBlockData-Creation.patch (100%) rename patches/{unapplied => }/server/Optimize-MappedRegistry.patch (82%) rename patches/{unapplied => }/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch (100%) rename patches/{unapplied => }/server/Player.setPlayerProfile-API.patch (100%) rename patches/{unapplied => }/server/PlayerElytraBoostEvent.patch (100%) rename patches/{unapplied => }/server/PlayerLaunchProjectileEvent.patch (99%) rename patches/{unapplied => }/server/PlayerNaturallySpawnCreaturesEvent.patch (72%) rename patches/{unapplied => }/server/PlayerPickupExperienceEvent.patch (100%) rename patches/{unapplied => }/server/PlayerReadyArrowEvent.patch (100%) rename patches/{unapplied => }/server/PreCreatureSpawnEvent.patch (100%) rename patches/{unapplied => }/server/Prevent-Frosted-Ice-from-loading-holding-chunks.patch (100%) rename patches/{unapplied => }/server/Prevent-logins-from-being-processed-when-the-player-.patch (100%) rename patches/{unapplied => }/server/Print-Error-details-when-failing-to-save-player-data.patch (94%) rename patches/{unapplied => }/server/Profile-Lookup-Events.patch (100%) rename patches/{unapplied => }/server/ProfileWhitelistVerifyEvent.patch (100%) rename patches/{unapplied => }/server/RangedEntity-API.patch (100%) rename patches/{unapplied => }/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch (100%) rename patches/{unapplied => }/server/Remove-unnecessary-itemmeta-handling.patch (100%) rename patches/{unapplied => }/server/Reset-spawner-timer-when-spawner-event-is-cancelled.patch (100%) rename patches/{unapplied => }/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch (100%) rename patches/{unapplied => }/server/Send-attack-SoundEffects-only-to-players-who-can-see.patch (100%) rename patches/{unapplied => }/server/SkeletonHorse-Additions.patch (100%) rename patches/{unapplied => }/server/Slime-Pathfinder-Events.patch (100%) rename patches/{unapplied => }/server/Tameable-getOwnerUniqueId-API.patch (100%) rename patches/{unapplied => }/server/Toggleable-player-crits-helps-mitigate-hacked-client.patch (100%) rename patches/{unapplied => }/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch (100%) rename patches/{unapplied => }/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch (100%) rename patches/{unapplied => }/server/Use-ConcurrentHashMap-in-JsonList.patch (100%) rename patches/{unapplied => }/server/Use-a-Queue-for-Queueing-Commands.patch (100%) rename patches/{unapplied => }/server/Vanished-players-don-t-have-rights.patch (100%) rename patches/{unapplied => }/server/Vex-get-setSummoner-API.patch (100%) rename patches/{unapplied => }/server/WitchConsumePotionEvent.patch (100%) rename patches/{unapplied => }/server/WitchReadyPotionEvent.patch (100%) rename patches/{unapplied => }/server/WitchThrowPotionEvent.patch (100%) rename patches/{unapplied => }/server/add-more-information-to-Entity.toString.patch (98%) rename patches/{unapplied => }/server/getPlayerUniqueId-API.patch (100%) rename patches/{unapplied => }/server/handle-ServerboundKeepAlivePacket-async.patch (100%) rename patches/{unapplied => }/server/revert-serverside-behavior-of-keepalives.patch (100%) rename patches/{unapplied => }/server/use-CB-BlockState-implementations-for-captured-block.patch (100%) diff --git a/patches/unapplied/server/API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/API-to-get-a-BlockState-without-a-snapshot.patch similarity index 100% rename from patches/unapplied/server/API-to-get-a-BlockState-without-a-snapshot.patch rename to patches/server/API-to-get-a-BlockState-without-a-snapshot.patch diff --git a/patches/unapplied/server/Ability-to-apply-mending-to-XP-API.patch b/patches/server/Ability-to-apply-mending-to-XP-API.patch similarity index 100% rename from patches/unapplied/server/Ability-to-apply-mending-to-XP-API.patch rename to patches/server/Ability-to-apply-mending-to-XP-API.patch diff --git a/patches/unapplied/server/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/patches/server/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch similarity index 100% rename from patches/unapplied/server/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch rename to patches/server/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch diff --git a/patches/unapplied/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/patches/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 100% rename from patches/unapplied/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to patches/server/Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch diff --git a/patches/unapplied/server/Add-ArmorStand-Item-Meta.patch b/patches/server/Add-ArmorStand-Item-Meta.patch similarity index 100% rename from patches/unapplied/server/Add-ArmorStand-Item-Meta.patch rename to patches/server/Add-ArmorStand-Item-Meta.patch diff --git a/patches/unapplied/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 99% rename from patches/unapplied/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to patches/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index ed45833d1c..02013805e5 100644 --- a/patches/unapplied/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -75,7 +75,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 { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; diff --git a/patches/unapplied/server/Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/Add-Early-Warning-Feature-to-WatchDog.patch similarity index 98% rename from patches/unapplied/server/Add-Early-Warning-Feature-to-WatchDog.patch rename to patches/server/Add-Early-Warning-Feature-to-WatchDog.patch index 80a20277f5..4319a5f4c6 100644 --- a/patches/unapplied/server/Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/Add-Early-Warning-Feature-to-WatchDog.patch @@ -18,8 +18,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // Spigot start + org.spigotmc.WatchdogThread.hasStarted = true; // Paper Arrays.fill( this.recentTps, 20 ); - long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop - lastTick = start - TICK_TIME; // Paper + long tickSection = Util.getNanos(), curTime, tickCount = 1; // Paper + while (this.running) { diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/patches/unapplied/server/Add-More-Creeper-API.patch b/patches/server/Add-More-Creeper-API.patch similarity index 100% rename from patches/unapplied/server/Add-More-Creeper-API.patch rename to patches/server/Add-More-Creeper-API.patch diff --git a/patches/unapplied/server/Add-PhantomPreSpawnEvent.patch b/patches/server/Add-PhantomPreSpawnEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PhantomPreSpawnEvent.patch rename to patches/server/Add-PhantomPreSpawnEvent.patch diff --git a/patches/unapplied/server/Add-PlayerAdvancementCriterionGrantEvent.patch b/patches/server/Add-PlayerAdvancementCriterionGrantEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerAdvancementCriterionGrantEvent.patch rename to patches/server/Add-PlayerAdvancementCriterionGrantEvent.patch diff --git a/patches/unapplied/server/Add-PlayerArmorChangeEvent.patch b/patches/server/Add-PlayerArmorChangeEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerArmorChangeEvent.patch rename to patches/server/Add-PlayerArmorChangeEvent.patch diff --git a/patches/unapplied/server/Add-PlayerJumpEvent.patch b/patches/server/Add-PlayerJumpEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerJumpEvent.patch rename to patches/server/Add-PlayerJumpEvent.patch diff --git a/patches/unapplied/server/Add-TNTPrimeEvent.patch b/patches/server/Add-TNTPrimeEvent.patch similarity index 100% rename from patches/unapplied/server/Add-TNTPrimeEvent.patch rename to patches/server/Add-TNTPrimeEvent.patch diff --git a/patches/unapplied/server/Add-config-to-disable-ender-dragon-legacy-check.patch b/patches/server/Add-config-to-disable-ender-dragon-legacy-check.patch similarity index 100% rename from patches/unapplied/server/Add-config-to-disable-ender-dragon-legacy-check.patch rename to patches/server/Add-config-to-disable-ender-dragon-legacy-check.patch diff --git a/patches/unapplied/server/Add-openSign-method-to-HumanEntity.patch b/patches/server/Add-openSign-method-to-HumanEntity.patch similarity index 100% rename from patches/unapplied/server/Add-openSign-method-to-HumanEntity.patch rename to patches/server/Add-openSign-method-to-HumanEntity.patch diff --git a/patches/unapplied/server/Add-ray-tracing-methods-to-LivingEntity.patch b/patches/server/Add-ray-tracing-methods-to-LivingEntity.patch similarity index 100% rename from patches/unapplied/server/Add-ray-tracing-methods-to-LivingEntity.patch rename to patches/server/Add-ray-tracing-methods-to-LivingEntity.patch diff --git a/patches/unapplied/server/Add-setPlayerProfile-API-for-Skulls.patch b/patches/server/Add-setPlayerProfile-API-for-Skulls.patch similarity index 100% rename from patches/unapplied/server/Add-setPlayerProfile-API-for-Skulls.patch rename to patches/server/Add-setPlayerProfile-API-for-Skulls.patch diff --git a/patches/unapplied/server/Allow-chests-to-be-placed-with-NBT-data.patch b/patches/server/Allow-chests-to-be-placed-with-NBT-data.patch similarity index 100% rename from patches/unapplied/server/Allow-chests-to-be-placed-with-NBT-data.patch rename to patches/server/Allow-chests-to-be-placed-with-NBT-data.patch diff --git a/patches/unapplied/server/Allow-disabling-armour-stand-ticking.patch b/patches/server/Allow-disabling-armour-stand-ticking.patch similarity index 100% rename from patches/unapplied/server/Allow-disabling-armour-stand-ticking.patch rename to patches/server/Allow-disabling-armour-stand-ticking.patch diff --git a/patches/unapplied/server/Allow-spawning-Item-entities-with-World.spawnEntity.patch b/patches/server/Allow-spawning-Item-entities-with-World.spawnEntity.patch similarity index 100% rename from patches/unapplied/server/Allow-spawning-Item-entities-with-World.spawnEntity.patch rename to patches/server/Allow-spawning-Item-entities-with-World.spawnEntity.patch diff --git a/patches/unapplied/server/Allow-specifying-a-custom-authentication-servers-dow.patch b/patches/server/Allow-specifying-a-custom-authentication-servers-dow.patch similarity index 100% rename from patches/unapplied/server/Allow-specifying-a-custom-authentication-servers-dow.patch rename to patches/server/Allow-specifying-a-custom-authentication-servers-dow.patch diff --git a/patches/unapplied/server/AnvilDamageEvent.patch b/patches/server/AnvilDamageEvent.patch similarity index 100% rename from patches/unapplied/server/AnvilDamageEvent.patch rename to patches/server/AnvilDamageEvent.patch diff --git a/patches/unapplied/server/AsyncTabCompleteEvent.patch b/patches/server/AsyncTabCompleteEvent.patch similarity index 100% rename from patches/unapplied/server/AsyncTabCompleteEvent.patch rename to patches/server/AsyncTabCompleteEvent.patch diff --git a/patches/unapplied/server/Block-Enderpearl-Travel-Exploit.patch b/patches/server/Block-Enderpearl-Travel-Exploit.patch similarity index 100% rename from patches/unapplied/server/Block-Enderpearl-Travel-Exploit.patch rename to patches/server/Block-Enderpearl-Travel-Exploit.patch diff --git a/patches/unapplied/server/Block-player-logins-during-server-shutdown.patch b/patches/server/Block-player-logins-during-server-shutdown.patch similarity index 100% rename from patches/unapplied/server/Block-player-logins-during-server-shutdown.patch rename to patches/server/Block-player-logins-during-server-shutdown.patch diff --git a/patches/unapplied/server/Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/Break-up-and-make-tab-spam-limits-configurable.patch similarity index 100% rename from patches/unapplied/server/Break-up-and-make-tab-spam-limits-configurable.patch rename to patches/server/Break-up-and-make-tab-spam-limits-configurable.patch diff --git a/patches/unapplied/server/Call-PaperServerListPingEvent-for-legacy-pings.patch b/patches/server/Call-PaperServerListPingEvent-for-legacy-pings.patch similarity index 100% rename from patches/unapplied/server/Call-PaperServerListPingEvent-for-legacy-pings.patch rename to patches/server/Call-PaperServerListPingEvent-for-legacy-pings.patch diff --git a/patches/unapplied/server/Configurable-Alternative-LootPool-Luck-Formula.patch b/patches/server/Configurable-Alternative-LootPool-Luck-Formula.patch similarity index 100% rename from patches/unapplied/server/Configurable-Alternative-LootPool-Luck-Formula.patch rename to patches/server/Configurable-Alternative-LootPool-Luck-Formula.patch diff --git a/patches/unapplied/server/Configurable-speed-for-water-flowing-over-lava.patch b/patches/server/Configurable-speed-for-water-flowing-over-lava.patch similarity index 100% rename from patches/unapplied/server/Configurable-speed-for-water-flowing-over-lava.patch rename to patches/server/Configurable-speed-for-water-flowing-over-lava.patch diff --git a/patches/unapplied/server/Configurable-sprint-interruption-on-attack.patch b/patches/server/Configurable-sprint-interruption-on-attack.patch similarity index 100% rename from patches/unapplied/server/Configurable-sprint-interruption-on-attack.patch rename to patches/server/Configurable-sprint-interruption-on-attack.patch diff --git a/patches/unapplied/server/Disable-Explicit-Network-Manager-Flushing.patch b/patches/server/Disable-Explicit-Network-Manager-Flushing.patch similarity index 100% rename from patches/unapplied/server/Disable-Explicit-Network-Manager-Flushing.patch rename to patches/server/Disable-Explicit-Network-Manager-Flushing.patch diff --git a/patches/unapplied/server/Don-t-call-getItemMeta-on-hasItemMeta.patch b/patches/server/Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 100% rename from patches/unapplied/server/Don-t-call-getItemMeta-on-hasItemMeta.patch rename to patches/server/Don-t-call-getItemMeta-on-hasItemMeta.patch diff --git a/patches/unapplied/server/EnderDragon-Events.patch b/patches/server/EnderDragon-Events.patch similarity index 100% rename from patches/unapplied/server/EnderDragon-Events.patch rename to patches/server/EnderDragon-Events.patch diff --git a/patches/unapplied/server/Enderman.teleportRandomly.patch b/patches/server/Enderman.teleportRandomly.patch similarity index 100% rename from patches/unapplied/server/Enderman.teleportRandomly.patch rename to patches/server/Enderman.teleportRandomly.patch diff --git a/patches/unapplied/server/EndermanAttackPlayerEvent.patch b/patches/server/EndermanAttackPlayerEvent.patch similarity index 100% rename from patches/unapplied/server/EndermanAttackPlayerEvent.patch rename to patches/server/EndermanAttackPlayerEvent.patch diff --git a/patches/unapplied/server/EndermanEscapeEvent.patch b/patches/server/EndermanEscapeEvent.patch similarity index 100% rename from patches/unapplied/server/EndermanEscapeEvent.patch rename to patches/server/EndermanEscapeEvent.patch diff --git a/patches/unapplied/server/Entity-fromMobSpawner.patch b/patches/server/Entity-fromMobSpawner.patch similarity index 92% rename from patches/unapplied/server/Entity-fromMobSpawner.patch rename to patches/server/Entity-fromMobSpawner.patch index 8208656405..c1b2337141 100644 --- a/patches/unapplied/server/Entity-fromMobSpawner.patch +++ b/patches/server/Entity-fromMobSpawner.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 { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S // Spigot end // Paper start protected int numCollisions = 0; // Paper @@ -16,18 +16,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @javax.annotation.Nullable private org.bukkit.util.Vector origin; @javax.annotation.Nullable -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } - nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); + nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); } + // Save entity's from mob spawner status + if (spawnedViaMobSpawner) { + nbt.putBoolean("Paper.FromMobSpawner", true); + } // Paper end - return nbt; + return nbttagcompound; } catch (Throwable throwable) { -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S this.originWorld = originWorld; origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2)); } diff --git a/patches/unapplied/server/Expand-Explosions-API.patch b/patches/server/Expand-Explosions-API.patch similarity index 100% rename from patches/unapplied/server/Expand-Explosions-API.patch rename to patches/server/Expand-Explosions-API.patch diff --git a/patches/unapplied/server/Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 100% rename from patches/unapplied/server/Expand-World.spawnParticle-API-and-add-Builder.patch rename to patches/server/Expand-World.spawnParticle-API-and-add-Builder.patch diff --git a/patches/unapplied/server/Expose-attack-cooldown-methods-for-Player.patch b/patches/server/Expose-attack-cooldown-methods-for-Player.patch similarity index 100% rename from patches/unapplied/server/Expose-attack-cooldown-methods-for-Player.patch rename to patches/server/Expose-attack-cooldown-methods-for-Player.patch diff --git a/patches/unapplied/server/Expose-client-protocol-version-and-virtual-host.patch b/patches/server/Expose-client-protocol-version-and-virtual-host.patch similarity index 100% rename from patches/unapplied/server/Expose-client-protocol-version-and-virtual-host.patch rename to patches/server/Expose-client-protocol-version-and-virtual-host.patch diff --git a/patches/unapplied/server/Extend-Player-Interact-cancellation.patch b/patches/server/Extend-Player-Interact-cancellation.patch similarity index 100% rename from patches/unapplied/server/Extend-Player-Interact-cancellation.patch rename to patches/server/Extend-Player-Interact-cancellation.patch diff --git a/patches/unapplied/server/Fill-Profile-Property-Events.patch b/patches/server/Fill-Profile-Property-Events.patch similarity index 77% rename from patches/unapplied/server/Fill-Profile-Property-Events.patch rename to patches/server/Fill-Profile-Property-Events.patch index f7b9424847..2282e758e3 100644 --- a/patches/unapplied/server/Fill-Profile-Property-Events.patch +++ b/patches/server/Fill-Profile-Property-Events.patch @@ -42,11 +42,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java @@ -0,0 +0,0 @@ public class SkullBlockEntity extends BlockEntity { - MinecraftSessionService minecraftsessionservice = SkullBlockEntity.sessionService; + return apiServices.profileCache().getAsync(name).thenApplyAsync((optional) -> { + if (optional.isPresent() && !booleansupplier.getAsBoolean()) { + UUID uuid = ((GameProfile) optional.get()).getId(); +- ProfileResult profileresult = apiServices.sessionService().fetchProfile(uuid, true); ++ ProfileResult profileresult = apiServices.sessionService() instanceof com.destroystokyo.paper.profile.PaperMinecraftSessionService paperMinecraftSessionService ? paperMinecraftSessionService.fetchProfile(optional.get(), true) : apiServices.sessionService().fetchProfile(uuid, true); // Paper - if (minecraftsessionservice != null) { -- ProfileResult profileresult = minecraftsessionservice.fetchProfile(profile.getId(), true); -+ ProfileResult profileresult = minecraftsessionservice instanceof com.destroystokyo.paper.profile.PaperMinecraftSessionService paperMinecraftSessionService ? paperMinecraftSessionService.fetchProfile(profile, true) : minecraftsessionservice.fetchProfile(profile.getId(), true); // Paper - - return profileresult == null ? Optional.of(profile) : Optional.of(profileresult.profile()); + return profileresult != null ? Optional.ofNullable(profileresult.profile()) : optional; } else { diff --git a/patches/unapplied/server/Fix-CraftEntity-hashCode.patch b/patches/server/Fix-CraftEntity-hashCode.patch similarity index 100% rename from patches/unapplied/server/Fix-CraftEntity-hashCode.patch rename to patches/server/Fix-CraftEntity-hashCode.patch diff --git a/patches/unapplied/server/Fix-MC-117075-TE-Unload-Lag-Spike.patch b/patches/server/Fix-MC-117075-TE-Unload-Lag-Spike.patch similarity index 92% rename from patches/unapplied/server/Fix-MC-117075-TE-Unload-Lag-Spike.patch rename to patches/server/Fix-MC-117075-TE-Unload-Lag-Spike.patch index a64a204b55..26367339c4 100644 --- a/patches/unapplied/server/Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/patches/server/Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -0,0 +0,0 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - // Spigot start - // Iterator iterator = this.blockEntityTickers.iterator(); + boolean flag = this.tickRateManager().runsNormally(); + int tilesThisCycle = 0; + var toRemove = new it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet(net.minecraft.Util.identityStrategy()); // Paper - use removeAll + toRemove.add(null); @@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.blockEntityTickers.remove(this.tileTickPosition--); + toRemove.add(tickingblockentity); // Paper - use removeAll // Spigot end - } else if (this.shouldTickBlocksAt(tickingblockentity.getPos())) { + } else if (flag && this.shouldTickBlocksAt(tickingblockentity.getPos())) { tickingblockentity.tick(); } } diff --git a/patches/unapplied/server/Fix-NBT-type-issues.patch b/patches/server/Fix-NBT-type-issues.patch similarity index 100% rename from patches/unapplied/server/Fix-NBT-type-issues.patch rename to patches/server/Fix-NBT-type-issues.patch diff --git a/patches/unapplied/server/Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/patches/server/Fix-exploit-that-allowed-colored-signs-to-be-created.patch similarity index 100% rename from patches/unapplied/server/Fix-exploit-that-allowed-colored-signs-to-be-created.patch rename to patches/server/Fix-exploit-that-allowed-colored-signs-to-be-created.patch diff --git a/patches/unapplied/server/Fix-this-stupid-bullshit.patch b/patches/server/Fix-this-stupid-bullshit.patch similarity index 97% rename from patches/unapplied/server/Fix-this-stupid-bullshit.patch rename to patches/server/Fix-this-stupid-bullshit.patch index 041f8b9f4a..997faaa22d 100644 --- a/patches/unapplied/server/Fix-this-stupid-bullshit.patch +++ b/patches/server/Fix-this-stupid-bullshit.patch @@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -21); + deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { - System.err.println("*** Error, this build is outdated ***"); + // Paper start - This is some stupid bullshit diff --git a/patches/unapplied/server/Flag-to-disable-the-channel-limit.patch b/patches/server/Flag-to-disable-the-channel-limit.patch similarity index 100% rename from patches/unapplied/server/Flag-to-disable-the-channel-limit.patch rename to patches/server/Flag-to-disable-the-channel-limit.patch diff --git a/patches/unapplied/server/Handle-plugin-prefixes-using-Log4J-configuration.patch b/patches/server/Handle-plugin-prefixes-using-Log4J-configuration.patch similarity index 100% rename from patches/unapplied/server/Handle-plugin-prefixes-using-Log4J-configuration.patch rename to patches/server/Handle-plugin-prefixes-using-Log4J-configuration.patch diff --git a/patches/unapplied/server/Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch b/patches/server/Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch similarity index 99% rename from patches/unapplied/server/Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch rename to patches/server/Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch index fa8decc891..957210e499 100644 --- a/patches/unapplied/server/Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch +++ b/patches/server/Implement-EntityKnockbackByEntityEvent-and-EntityPus.patch @@ -12,7 +12,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 { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } public void push(double deltaX, double deltaY, double deltaZ) { diff --git a/patches/unapplied/server/Implement-EntityTeleportEndGatewayEvent.patch b/patches/server/Implement-EntityTeleportEndGatewayEvent.patch similarity index 100% rename from patches/unapplied/server/Implement-EntityTeleportEndGatewayEvent.patch rename to patches/server/Implement-EntityTeleportEndGatewayEvent.patch diff --git a/patches/unapplied/server/Implement-Expanded-ArmorStand-API.patch b/patches/server/Implement-Expanded-ArmorStand-API.patch similarity index 100% rename from patches/unapplied/server/Implement-Expanded-ArmorStand-API.patch rename to patches/server/Implement-Expanded-ArmorStand-API.patch diff --git a/patches/unapplied/server/Implement-World.getEntity-UUID-API.patch b/patches/server/Implement-World.getEntity-UUID-API.patch similarity index 100% rename from patches/unapplied/server/Implement-World.getEntity-UUID-API.patch rename to patches/server/Implement-World.getEntity-UUID-API.patch diff --git a/patches/unapplied/server/Implement-ensureServerConversions-API.patch b/patches/server/Implement-ensureServerConversions-API.patch similarity index 100% rename from patches/unapplied/server/Implement-ensureServerConversions-API.patch rename to patches/server/Implement-ensureServerConversions-API.patch diff --git a/patches/unapplied/server/Implement-extended-PaperServerListPingEvent.patch b/patches/server/Implement-extended-PaperServerListPingEvent.patch similarity index 100% rename from patches/unapplied/server/Implement-extended-PaperServerListPingEvent.patch rename to patches/server/Implement-extended-PaperServerListPingEvent.patch diff --git a/patches/unapplied/server/Implement-getI18NDisplayName.patch b/patches/server/Implement-getI18NDisplayName.patch similarity index 100% rename from patches/unapplied/server/Implement-getI18NDisplayName.patch rename to patches/server/Implement-getI18NDisplayName.patch diff --git a/patches/unapplied/server/Improve-BlockPosition-inlining.patch b/patches/server/Improve-BlockPosition-inlining.patch similarity index 100% rename from patches/unapplied/server/Improve-BlockPosition-inlining.patch rename to patches/server/Improve-BlockPosition-inlining.patch diff --git a/patches/unapplied/server/Improve-EntityShootBowEvent.patch b/patches/server/Improve-EntityShootBowEvent.patch similarity index 100% rename from patches/unapplied/server/Improve-EntityShootBowEvent.patch rename to patches/server/Improve-EntityShootBowEvent.patch diff --git a/patches/unapplied/server/Improve-Log4J-Configuration-Plugin-Loggers.patch b/patches/server/Improve-Log4J-Configuration-Plugin-Loggers.patch similarity index 100% rename from patches/unapplied/server/Improve-Log4J-Configuration-Plugin-Loggers.patch rename to patches/server/Improve-Log4J-Configuration-Plugin-Loggers.patch diff --git a/patches/unapplied/server/Improve-death-events.patch b/patches/server/Improve-death-events.patch similarity index 100% rename from patches/unapplied/server/Improve-death-events.patch rename to patches/server/Improve-death-events.patch diff --git a/patches/unapplied/server/Improve-the-Saddle-API-for-Horses.patch b/patches/server/Improve-the-Saddle-API-for-Horses.patch similarity index 100% rename from patches/unapplied/server/Improve-the-Saddle-API-for-Horses.patch rename to patches/server/Improve-the-Saddle-API-for-Horses.patch diff --git a/patches/unapplied/server/Improved-Async-Task-Scheduler.patch b/patches/server/Improved-Async-Task-Scheduler.patch similarity index 100% rename from patches/unapplied/server/Improved-Async-Task-Scheduler.patch rename to patches/server/Improved-Async-Task-Scheduler.patch diff --git a/patches/unapplied/server/Inventory-removeItemAnySlot.patch b/patches/server/Inventory-removeItemAnySlot.patch similarity index 100% rename from patches/unapplied/server/Inventory-removeItemAnySlot.patch rename to patches/server/Inventory-removeItemAnySlot.patch diff --git a/patches/unapplied/server/InventoryCloseEvent-Reason-API.patch b/patches/server/InventoryCloseEvent-Reason-API.patch similarity index 100% rename from patches/unapplied/server/InventoryCloseEvent-Reason-API.patch rename to patches/server/InventoryCloseEvent-Reason-API.patch diff --git a/patches/unapplied/server/ItemStack-getMaxItemUseDuration.patch b/patches/server/ItemStack-getMaxItemUseDuration.patch similarity index 100% rename from patches/unapplied/server/ItemStack-getMaxItemUseDuration.patch rename to patches/server/ItemStack-getMaxItemUseDuration.patch diff --git a/patches/unapplied/server/LivingEntity-Hand-Raised-Item-Use-API.patch b/patches/server/LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 100% rename from patches/unapplied/server/LivingEntity-Hand-Raised-Item-Use-API.patch rename to patches/server/LivingEntity-Hand-Raised-Item-Use-API.patch diff --git a/patches/unapplied/server/LivingEntity-setKiller.patch b/patches/server/LivingEntity-setKiller.patch similarity index 100% rename from patches/unapplied/server/LivingEntity-setKiller.patch rename to patches/server/LivingEntity-setKiller.patch diff --git a/patches/unapplied/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/patches/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 100% rename from patches/unapplied/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to patches/server/Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch diff --git a/patches/unapplied/server/Make-legacy-ping-handler-more-reliable.patch b/patches/server/Make-legacy-ping-handler-more-reliable.patch similarity index 100% rename from patches/unapplied/server/Make-legacy-ping-handler-more-reliable.patch rename to patches/server/Make-legacy-ping-handler-more-reliable.patch diff --git a/patches/unapplied/server/Make-shield-blocking-delay-configurable.patch b/patches/server/Make-shield-blocking-delay-configurable.patch similarity index 100% rename from patches/unapplied/server/Make-shield-blocking-delay-configurable.patch rename to patches/server/Make-shield-blocking-delay-configurable.patch diff --git a/patches/unapplied/server/Mob-Pathfinding-API.patch b/patches/server/Mob-Pathfinding-API.patch similarity index 100% rename from patches/unapplied/server/Mob-Pathfinding-API.patch rename to patches/server/Mob-Pathfinding-API.patch diff --git a/patches/unapplied/server/Ocelot-despawns-should-honor-nametags-and-leash.patch b/patches/server/Ocelot-despawns-should-honor-nametags-and-leash.patch similarity index 100% rename from patches/unapplied/server/Ocelot-despawns-should-honor-nametags-and-leash.patch rename to patches/server/Ocelot-despawns-should-honor-nametags-and-leash.patch diff --git a/patches/unapplied/server/Optimize-BlockPosition-helper-methods.patch b/patches/server/Optimize-BlockPosition-helper-methods.patch similarity index 100% rename from patches/unapplied/server/Optimize-BlockPosition-helper-methods.patch rename to patches/server/Optimize-BlockPosition-helper-methods.patch diff --git a/patches/unapplied/server/Optimize-CraftBlockData-Creation.patch b/patches/server/Optimize-CraftBlockData-Creation.patch similarity index 100% rename from patches/unapplied/server/Optimize-CraftBlockData-Creation.patch rename to patches/server/Optimize-CraftBlockData-Creation.patch diff --git a/patches/unapplied/server/Optimize-MappedRegistry.patch b/patches/server/Optimize-MappedRegistry.patch similarity index 82% rename from patches/unapplied/server/Optimize-MappedRegistry.patch rename to patches/server/Optimize-MappedRegistry.patch index 308e967384..84be297eb8 100644 --- a/patches/unapplied/server/Optimize-MappedRegistry.patch +++ b/patches/server/Optimize-MappedRegistry.patch @@ -15,14 +15,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private static final Logger LOGGER = LogUtils.getLogger(); final ResourceKey> key; private final ObjectList> byId = new ObjectArrayList<>(256); -- private final Object2IntMap toId = Util.make(new Object2IntOpenCustomHashMap<>(Util.identityStrategy()), (map) -> { +- private final Reference2IntMap toId = Util.make(new Reference2IntOpenHashMap<>(), (map) -> { - map.defaultReturnValue(-1); - }); - private final Map> byLocation = new HashMap<>(); - private final Map, Holder.Reference> byKey = new HashMap<>(); - private final Map> byValue = new IdentityHashMap<>(); - private final Map lifecycles = new IdentityHashMap<>(); -+ private final it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap toId = new it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap(2048);// Paper - use bigger expected size to reduce collisions and direct intent for FastUtil to be identity map ++ private final Reference2IntMap toId = new Reference2IntOpenHashMap(2048);// Paper - use bigger expected size to reduce collisions and direct intent for FastUtil to be identity map + private final Map> byLocation = new HashMap<>(2048); // Paper - use bigger expected size to reduce collisions + private final Map, Holder.Reference> byKey = new HashMap<>(2048); // Paper - use bigger expected size to reduce collisions + private final Map> byValue = new IdentityHashMap<>(2048); // Paper - use bigger expected size to reduce collisions @@ -35,6 +35,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public MappedRegistry(ResourceKey> key, Lifecycle lifecycle, boolean intrusive) { + this.toId.defaultReturnValue(-1); // Paper - Bootstrap.checkBootstrapCalled(() -> { - return "registry " + key; - }); + this.key = key; + this.registryLifecycle = lifecycle; + if (intrusive) { diff --git a/patches/unapplied/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 100% rename from patches/unapplied/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to patches/server/Option-to-prevent-armor-stands-from-doing-entity-loo.patch diff --git a/patches/unapplied/server/Player.setPlayerProfile-API.patch b/patches/server/Player.setPlayerProfile-API.patch similarity index 100% rename from patches/unapplied/server/Player.setPlayerProfile-API.patch rename to patches/server/Player.setPlayerProfile-API.patch diff --git a/patches/unapplied/server/PlayerElytraBoostEvent.patch b/patches/server/PlayerElytraBoostEvent.patch similarity index 100% rename from patches/unapplied/server/PlayerElytraBoostEvent.patch rename to patches/server/PlayerElytraBoostEvent.patch diff --git a/patches/unapplied/server/PlayerLaunchProjectileEvent.patch b/patches/server/PlayerLaunchProjectileEvent.patch similarity index 99% rename from patches/unapplied/server/PlayerLaunchProjectileEvent.patch rename to patches/server/PlayerLaunchProjectileEvent.patch index ec9cc0cd3d..5f08e32c3d 100644 --- a/patches/unapplied/server/PlayerLaunchProjectileEvent.patch +++ b/patches/server/PlayerLaunchProjectileEvent.patch @@ -284,13 +284,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } return; } -- + + if (event.shouldConsume()) { // Paper stack.hurtAndBreak(1, entityhuman, (entityhuman1) -> { entityhuman1.broadcastBreakEvent(user.getUsedItemHand()); }); + } // Paper - entitythrowntrident.tridentItem = stack.copy(); // SPIGOT-4511 update since damage call moved + entitythrowntrident.pickupItemStack = stack.copy(); // SPIGOT-4511 update since damage call moved // CraftBukkit end world.playSound((Player) null, (Entity) entitythrowntrident, SoundEvents.TRIDENT_THROW, SoundSource.PLAYERS, 1.0F, 1.0F); diff --git a/patches/unapplied/server/PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/PlayerNaturallySpawnCreaturesEvent.patch similarity index 72% rename from patches/unapplied/server/PlayerNaturallySpawnCreaturesEvent.patch rename to patches/server/PlayerNaturallySpawnCreaturesEvent.patch index 8469934e40..d73a2e25b3 100644 --- a/patches/unapplied/server/PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/PlayerNaturallySpawnCreaturesEvent.patch @@ -44,37 +44,30 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource { - boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit + boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit - Collections.shuffle(list); -+ // 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); -+ for (ServerPlayer entityPlayer : this.level.players()) { -+ entityPlayer.playerNaturallySpawnedEvent = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityPlayer.getBukkitEntity(), (byte) chunkRange); -+ entityPlayer.playerNaturallySpawnedEvent.callEvent(); -+ }; -+ // Paper end - Iterator iterator1 = list.iterator(); - - while (iterator1.hasNext()) { + Util.shuffle(list, this.level.random); ++ // 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); ++ for (ServerPlayer entityPlayer : this.level.players()) { ++ entityPlayer.playerNaturallySpawnedEvent = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityPlayer.getBukkitEntity(), (byte) chunkRange); ++ entityPlayer.playerNaturallySpawnedEvent.callEvent(); ++ } ++ // Paper end + int l = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); + boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit + Iterator iterator1 = list.iterator(); 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 +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ - package net.minecraft.server.level; - -+import com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent; - import com.google.common.collect.Lists; - import com.google.common.net.InetAddresses; - import com.mojang.authlib.GameProfile; @@ -0,0 +0,0 @@ public class ServerPlayer extends Player { // CraftBukkit end public boolean isRealPlayer; // Paper public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper -+ public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper ++ public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper // Paper start - replace player chunk loader private final java.util.concurrent.atomic.AtomicReference viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1)); diff --git a/patches/unapplied/server/PlayerPickupExperienceEvent.patch b/patches/server/PlayerPickupExperienceEvent.patch similarity index 100% rename from patches/unapplied/server/PlayerPickupExperienceEvent.patch rename to patches/server/PlayerPickupExperienceEvent.patch diff --git a/patches/unapplied/server/PlayerReadyArrowEvent.patch b/patches/server/PlayerReadyArrowEvent.patch similarity index 100% rename from patches/unapplied/server/PlayerReadyArrowEvent.patch rename to patches/server/PlayerReadyArrowEvent.patch diff --git a/patches/unapplied/server/PreCreatureSpawnEvent.patch b/patches/server/PreCreatureSpawnEvent.patch similarity index 100% rename from patches/unapplied/server/PreCreatureSpawnEvent.patch rename to patches/server/PreCreatureSpawnEvent.patch diff --git a/patches/unapplied/server/Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/patches/server/Prevent-Frosted-Ice-from-loading-holding-chunks.patch similarity index 100% rename from patches/unapplied/server/Prevent-Frosted-Ice-from-loading-holding-chunks.patch rename to patches/server/Prevent-Frosted-Ice-from-loading-holding-chunks.patch diff --git a/patches/unapplied/server/Prevent-logins-from-being-processed-when-the-player-.patch b/patches/server/Prevent-logins-from-being-processed-when-the-player-.patch similarity index 100% rename from patches/unapplied/server/Prevent-logins-from-being-processed-when-the-player-.patch rename to patches/server/Prevent-logins-from-being-processed-when-the-player-.patch diff --git a/patches/unapplied/server/Print-Error-details-when-failing-to-save-player-data.patch b/patches/server/Print-Error-details-when-failing-to-save-player-data.patch similarity index 94% rename from patches/unapplied/server/Print-Error-details-when-failing-to-save-player-data.patch rename to patches/server/Print-Error-details-when-failing-to-save-player-data.patch index 73c235e1a0..1128fbe30e 100644 --- a/patches/unapplied/server/Print-Error-details-when-failing-to-save-player-data.patch +++ b/patches/server/Print-Error-details-when-failing-to-save-player-data.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java @@ -0,0 +0,0 @@ public class PlayerDataStorage { - Util.safeReplaceFile(file1, file, file2); + Util.safeReplaceFile(path2, path1, path3); } catch (Exception exception) { - PlayerDataStorage.LOGGER.warn("Failed to save player data for {}", player.getName().getString()); + PlayerDataStorage.LOGGER.warn("Failed to save player data for {}", player.getScoreboardName(), exception); // Paper diff --git a/patches/unapplied/server/Profile-Lookup-Events.patch b/patches/server/Profile-Lookup-Events.patch similarity index 100% rename from patches/unapplied/server/Profile-Lookup-Events.patch rename to patches/server/Profile-Lookup-Events.patch diff --git a/patches/unapplied/server/ProfileWhitelistVerifyEvent.patch b/patches/server/ProfileWhitelistVerifyEvent.patch similarity index 100% rename from patches/unapplied/server/ProfileWhitelistVerifyEvent.patch rename to patches/server/ProfileWhitelistVerifyEvent.patch diff --git a/patches/unapplied/server/RangedEntity-API.patch b/patches/server/RangedEntity-API.patch similarity index 100% rename from patches/unapplied/server/RangedEntity-API.patch rename to patches/server/RangedEntity-API.patch diff --git a/patches/unapplied/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch b/patches/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch similarity index 100% rename from patches/unapplied/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch rename to patches/server/Refresh-player-inventory-when-cancelling-PlayerInter.patch diff --git a/patches/unapplied/server/Remove-unnecessary-itemmeta-handling.patch b/patches/server/Remove-unnecessary-itemmeta-handling.patch similarity index 100% rename from patches/unapplied/server/Remove-unnecessary-itemmeta-handling.patch rename to patches/server/Remove-unnecessary-itemmeta-handling.patch diff --git a/patches/unapplied/server/Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/patches/server/Reset-spawner-timer-when-spawner-event-is-cancelled.patch similarity index 100% rename from patches/unapplied/server/Reset-spawner-timer-when-spawner-event-is-cancelled.patch rename to patches/server/Reset-spawner-timer-when-spawner-event-is-cancelled.patch diff --git a/patches/unapplied/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch b/patches/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch similarity index 100% rename from patches/unapplied/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch rename to patches/server/Restore-vanilla-default-mob-spawn-range-and-water-an.patch diff --git a/patches/unapplied/server/Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/Send-attack-SoundEffects-only-to-players-who-can-see.patch similarity index 100% rename from patches/unapplied/server/Send-attack-SoundEffects-only-to-players-who-can-see.patch rename to patches/server/Send-attack-SoundEffects-only-to-players-who-can-see.patch diff --git a/patches/unapplied/server/SkeletonHorse-Additions.patch b/patches/server/SkeletonHorse-Additions.patch similarity index 100% rename from patches/unapplied/server/SkeletonHorse-Additions.patch rename to patches/server/SkeletonHorse-Additions.patch diff --git a/patches/unapplied/server/Slime-Pathfinder-Events.patch b/patches/server/Slime-Pathfinder-Events.patch similarity index 100% rename from patches/unapplied/server/Slime-Pathfinder-Events.patch rename to patches/server/Slime-Pathfinder-Events.patch diff --git a/patches/unapplied/server/Tameable-getOwnerUniqueId-API.patch b/patches/server/Tameable-getOwnerUniqueId-API.patch similarity index 100% rename from patches/unapplied/server/Tameable-getOwnerUniqueId-API.patch rename to patches/server/Tameable-getOwnerUniqueId-API.patch diff --git a/patches/unapplied/server/Toggleable-player-crits-helps-mitigate-hacked-client.patch b/patches/server/Toggleable-player-crits-helps-mitigate-hacked-client.patch similarity index 100% rename from patches/unapplied/server/Toggleable-player-crits-helps-mitigate-hacked-client.patch rename to patches/server/Toggleable-player-crits-helps-mitigate-hacked-client.patch diff --git a/patches/unapplied/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/patches/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch similarity index 100% rename from patches/unapplied/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch rename to patches/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch diff --git a/patches/unapplied/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch similarity index 100% rename from patches/unapplied/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch rename to patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch diff --git a/patches/unapplied/server/Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/Use-ConcurrentHashMap-in-JsonList.patch similarity index 100% rename from patches/unapplied/server/Use-ConcurrentHashMap-in-JsonList.patch rename to patches/server/Use-ConcurrentHashMap-in-JsonList.patch diff --git a/patches/unapplied/server/Use-a-Queue-for-Queueing-Commands.patch b/patches/server/Use-a-Queue-for-Queueing-Commands.patch similarity index 100% rename from patches/unapplied/server/Use-a-Queue-for-Queueing-Commands.patch rename to patches/server/Use-a-Queue-for-Queueing-Commands.patch diff --git a/patches/unapplied/server/Vanished-players-don-t-have-rights.patch b/patches/server/Vanished-players-don-t-have-rights.patch similarity index 100% rename from patches/unapplied/server/Vanished-players-don-t-have-rights.patch rename to patches/server/Vanished-players-don-t-have-rights.patch diff --git a/patches/unapplied/server/Vex-get-setSummoner-API.patch b/patches/server/Vex-get-setSummoner-API.patch similarity index 100% rename from patches/unapplied/server/Vex-get-setSummoner-API.patch rename to patches/server/Vex-get-setSummoner-API.patch diff --git a/patches/unapplied/server/WitchConsumePotionEvent.patch b/patches/server/WitchConsumePotionEvent.patch similarity index 100% rename from patches/unapplied/server/WitchConsumePotionEvent.patch rename to patches/server/WitchConsumePotionEvent.patch diff --git a/patches/unapplied/server/WitchReadyPotionEvent.patch b/patches/server/WitchReadyPotionEvent.patch similarity index 100% rename from patches/unapplied/server/WitchReadyPotionEvent.patch rename to patches/server/WitchReadyPotionEvent.patch diff --git a/patches/unapplied/server/WitchThrowPotionEvent.patch b/patches/server/WitchThrowPotionEvent.patch similarity index 100% rename from patches/unapplied/server/WitchThrowPotionEvent.patch rename to patches/server/WitchThrowPotionEvent.patch diff --git a/patches/unapplied/server/add-more-information-to-Entity.toString.patch b/patches/server/add-more-information-to-Entity.toString.patch similarity index 98% rename from patches/unapplied/server/add-more-information-to-Entity.toString.patch rename to patches/server/add-more-information-to-Entity.toString.patch index 9b83a587e2..88406bb0a7 100644 --- a/patches/unapplied/server/add-more-information-to-Entity.toString.patch +++ b/patches/server/add-more-information-to-Entity.toString.patch @@ -9,7 +9,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 { +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public String toString() { String s = this.level() == null ? "~NULL~" : this.level().toString(); diff --git a/patches/unapplied/server/getPlayerUniqueId-API.patch b/patches/server/getPlayerUniqueId-API.patch similarity index 100% rename from patches/unapplied/server/getPlayerUniqueId-API.patch rename to patches/server/getPlayerUniqueId-API.patch diff --git a/patches/unapplied/server/handle-ServerboundKeepAlivePacket-async.patch b/patches/server/handle-ServerboundKeepAlivePacket-async.patch similarity index 100% rename from patches/unapplied/server/handle-ServerboundKeepAlivePacket-async.patch rename to patches/server/handle-ServerboundKeepAlivePacket-async.patch diff --git a/patches/unapplied/server/revert-serverside-behavior-of-keepalives.patch b/patches/server/revert-serverside-behavior-of-keepalives.patch similarity index 100% rename from patches/unapplied/server/revert-serverside-behavior-of-keepalives.patch rename to patches/server/revert-serverside-behavior-of-keepalives.patch diff --git a/patches/unapplied/server/use-CB-BlockState-implementations-for-captured-block.patch b/patches/server/use-CB-BlockState-implementations-for-captured-block.patch similarity index 100% rename from patches/unapplied/server/use-CB-BlockState-implementations-for-captured-block.patch rename to patches/server/use-CB-BlockState-implementations-for-captured-block.patch