From 4f136356d89ede0c0e33dbcc79f926367a6127aa Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:55:31 -0700 Subject: [PATCH] some more patch --- ...-PlayerAttackEntityCooldownResetEvent.patch | 0 ...d-Plugin-Tickets-to-API-Chunk-Methods.patch | 0 .../Add-Raw-Byte-ItemStack-Serialization.patch | 0 .../server/Add-ThrownEggHatchEvent.patch | 2 +- ...-implement-PlayerRecipeBookClickEvent.patch | 0 .../Add-debug-for-sync-chunk-loads.patch | 0 ...on-for-console-having-all-permissions.patch | 0 ...-to-allow-iron-golems-to-spawn-in-air.patch | 0 ...on-to-nerf-pigmen-from-nether-portals.patch | 8 ++++---- .../Add-permission-for-command-blocks.patch | 0 ...antom-creative-and-insomniac-controls.patch | 0 .../Add-tick-times-API-and-mspt-command.patch | 12 ++++++------ .../server/Add-villager-reputation-API.patch | 0 patches/{unapplied => }/server/Anti-Xray.patch | 0 ...-get-gravity-in-void.-Fixes-MC-167279.patch | 0 ...e-chance-of-villager-zombie-infection.patch | 0 ...ad-Player-s-shouldn-t-be-able-to-move.patch | 0 ...cktraces-in-log-messages-crash-report.patch | 2 +- ...llow-bees-to-load-chunks-for-beehives.patch | 0 ...player-is-attempted-to-be-removed-fro.patch | 0 ...-t-fire-BlockFade-on-worldgen-threads.patch | 0 ...-move-existing-players-to-world-spawn.patch | 0 ...n-entity-collision-code-if-not-needed.patch | 0 .../server/Don-t-tick-dead-players.patch | 0 ...nsure-Entity-AABB-s-are-never-invalid.patch | 6 +++--- ...ider-respects-game-and-entity-rules-f.patch | 0 .../server/Ensure-safe-gateway-teleport.patch | 0 .../server/Entity-Jump-API.patch | 0 .../server/ExperienceOrbMergeEvent.patch | 4 ++-- .../Expose-MinecraftServer-isRunning.patch | 0 .../server/Expose-game-version.patch | 0 ...ler-runTaskTimerAsynchronously-Plugin.patch | 0 ...ng-Broken-behavior-of-PlayerJoinEvent.patch | 0 ...rld-Difficulty-Remembering-Difficulty.patch | 0 .../Fix-PotionEffect-ignores-icon-flag.patch | 0 ...issing-chunks-due-to-integer-overflow.patch | 0 ...em-duplication-issues-and-teleport-is.patch | 10 +++++----- ...iston-physics-inconsistency-MC-188840.patch | 0 .../server/Fix-sand-duping.patch | 0 ...Fix-villager-trading-demand-MC-163962.patch | 0 .../Hide-sync-chunk-writes-behind-flag.patch | 0 .../server/Implement-Mob-Goal-API.patch | 0 .../Implement-Player-Client-Options-API.patch | 0 .../server/Improve-Arrow-API.patch | 0 .../Improve-Block-breakNaturally-API.patch | 0 ...e-Legacy-Component-serialization-size.patch | 0 .../server/Improve-java-version-check.patch | 0 .../server/Improved-Watchdog-Support.patch | 4 ++-- ...tHolder-method-without-block-snapshot.patch | 0 .../server/Make-the-GUI-graph-fancier.patch | 0 .../server/Maps-shouldn-t-load-chunks.patch | 0 ...spawn-point-if-spawn-in-unloaded-worl.patch | 2 +- .../server/Optimise-Chunk-getFluid.patch | 0 ...se-getChunkAt-calls-for-loaded-chunks.patch | 0 .../Optimize-Bit-Operations-by-inlining.patch | 0 ...Optimize-Collision-to-not-load-chunks.patch | 2 +- ...GoalSelector-Goal.Flag-Set-operations.patch | 0 .../server/Optimize-Pathfinding.patch | 0 .../server/Optimize-Voxel-Shape-Merging.patch | 0 ...e-brigadier-child-sorting-performance.patch | 0 ...r-maximum-exp-value-when-merging-orbs.patch | 10 +++++----- .../server/Paper-dumpitem-command.patch | 0 ...-spawn-settings-and-per-player-option.patch | 0 .../server/Potential-bed-API.patch | 0 ...e-PlayerChunkMap-adds-crashing-server.patch | 0 ...event-opening-inventories-when-frozen.patch | 0 ...n-desync-in-playerconnection-causing-.patch | 0 .../Prevent-teleporting-dead-entities.patch | 0 ...-and-End-Portal-Frames-from-being-des.patch | 18 +++++++++--------- .../Reduce-Either-Optional-allocation.patch | 0 ...ce-memory-footprint-of-NBTTagCompound.patch | 0 ...onnections-shouldn-t-hold-up-shutdown.patch | 0 ...K-per-thread-native-byte-buffer-cache.patch | 0 ...verbose-world-setting-to-false-by-def.patch | 0 ...stance-map-to-optimise-entity-tracker.patch | 2 +- ...lookup-for-Treasure-Maps-Fixes-lag-fr.patch | 0 ...-PickItem-Packet-and-kick-for-invalid.patch | 0 ...tripwire-hook-placement-before-update.patch | 12 ++++++------ .../server/Villager-Restocks-API.patch | 0 .../Wait-for-Async-Tasks-during-shutdown.patch | 0 .../add-hand-to-BlockMultiPlaceEvent.patch | 0 .../server/misc-debugging-dumps.patch | 0 82 files changed, 47 insertions(+), 47 deletions(-) rename patches/{unapplied => }/server/Add-PlayerAttackEntityCooldownResetEvent.patch (100%) rename patches/{unapplied => }/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch (100%) rename patches/{unapplied => }/server/Add-Raw-Byte-ItemStack-Serialization.patch (100%) rename patches/{unapplied => }/server/Add-ThrownEggHatchEvent.patch (89%) rename patches/{unapplied => }/server/Add-and-implement-PlayerRecipeBookClickEvent.patch (100%) rename patches/{unapplied => }/server/Add-debug-for-sync-chunk-loads.patch (100%) rename patches/{unapplied => }/server/Add-option-for-console-having-all-permissions.patch (100%) rename patches/{unapplied => }/server/Add-option-to-allow-iron-golems-to-spawn-in-air.patch (100%) rename patches/{unapplied => }/server/Add-option-to-nerf-pigmen-from-nether-portals.patch (95%) rename patches/{unapplied => }/server/Add-permission-for-command-blocks.patch (100%) rename patches/{unapplied => }/server/Add-phantom-creative-and-insomniac-controls.patch (100%) rename patches/{unapplied => }/server/Add-tick-times-API-and-mspt-command.patch (94%) rename patches/{unapplied => }/server/Add-villager-reputation-API.patch (100%) rename patches/{unapplied => }/server/Anti-Xray.patch (100%) rename patches/{unapplied => }/server/Bees-get-gravity-in-void.-Fixes-MC-167279.patch (100%) rename patches/{unapplied => }/server/Configurable-chance-of-villager-zombie-infection.patch (100%) rename patches/{unapplied => }/server/Dead-Player-s-shouldn-t-be-able-to-move.patch (100%) rename patches/{unapplied => }/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch (99%) rename patches/{unapplied => }/server/Do-not-allow-bees-to-load-chunks-for-beehives.patch (100%) rename patches/{unapplied => }/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch (100%) rename patches/{unapplied => }/server/Don-t-fire-BlockFade-on-worldgen-threads.patch (100%) rename patches/{unapplied => }/server/Don-t-move-existing-players-to-world-spawn.patch (100%) rename patches/{unapplied => }/server/Don-t-run-entity-collision-code-if-not-needed.patch (100%) rename patches/{unapplied => }/server/Don-t-tick-dead-players.patch (100%) rename patches/{unapplied => }/server/Ensure-Entity-AABB-s-are-never-invalid.patch (95%) rename patches/{unapplied => }/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch (100%) rename patches/{unapplied => }/server/Ensure-safe-gateway-teleport.patch (100%) rename patches/{unapplied => }/server/Entity-Jump-API.patch (100%) rename patches/{unapplied => }/server/ExperienceOrbMergeEvent.patch (92%) rename patches/{unapplied => }/server/Expose-MinecraftServer-isRunning.patch (100%) rename patches/{unapplied => }/server/Expose-game-version.patch (100%) rename patches/{unapplied => }/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch (100%) rename patches/{unapplied => }/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch (100%) rename patches/{unapplied => }/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch (100%) rename patches/{unapplied => }/server/Fix-PotionEffect-ignores-icon-flag.patch (100%) rename patches/{unapplied => }/server/Fix-missing-chunks-due-to-integer-overflow.patch (100%) rename patches/{unapplied => }/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch (98%) rename patches/{unapplied => }/server/Fix-piston-physics-inconsistency-MC-188840.patch (100%) rename patches/{unapplied => }/server/Fix-sand-duping.patch (100%) rename patches/{unapplied => }/server/Fix-villager-trading-demand-MC-163962.patch (100%) rename patches/{unapplied => }/server/Hide-sync-chunk-writes-behind-flag.patch (100%) rename patches/{unapplied => }/server/Implement-Mob-Goal-API.patch (100%) rename patches/{unapplied => }/server/Implement-Player-Client-Options-API.patch (100%) rename patches/{unapplied => }/server/Improve-Arrow-API.patch (100%) rename patches/{unapplied => }/server/Improve-Block-breakNaturally-API.patch (100%) rename patches/{unapplied => }/server/Improve-Legacy-Component-serialization-size.patch (100%) rename patches/{unapplied => }/server/Improve-java-version-check.patch (100%) rename patches/{unapplied => }/server/Improved-Watchdog-Support.patch (99%) rename patches/{unapplied => }/server/Inventory-getHolder-method-without-block-snapshot.patch (100%) rename patches/{unapplied => }/server/Make-the-GUI-graph-fancier.patch (100%) rename patches/{unapplied => }/server/Maps-shouldn-t-load-chunks.patch (100%) rename patches/{unapplied => }/server/Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch (99%) rename patches/{unapplied => }/server/Optimise-Chunk-getFluid.patch (100%) rename patches/{unapplied => }/server/Optimise-getChunkAt-calls-for-loaded-chunks.patch (100%) rename patches/{unapplied => }/server/Optimize-Bit-Operations-by-inlining.patch (100%) rename patches/{unapplied => }/server/Optimize-Collision-to-not-load-chunks.patch (99%) rename patches/{unapplied => }/server/Optimize-GoalSelector-Goal.Flag-Set-operations.patch (100%) rename patches/{unapplied => }/server/Optimize-Pathfinding.patch (100%) rename patches/{unapplied => }/server/Optimize-Voxel-Shape-Merging.patch (100%) rename patches/{unapplied => }/server/Optimize-brigadier-child-sorting-performance.patch (100%) rename patches/{unapplied => }/server/Option-for-maximum-exp-value-when-merging-orbs.patch (85%) rename patches/{unapplied => }/server/Paper-dumpitem-command.patch (100%) rename patches/{unapplied => }/server/Pillager-patrol-spawn-settings-and-per-player-option.patch (100%) rename patches/{unapplied => }/server/Potential-bed-API.patch (100%) rename patches/{unapplied => }/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch (100%) rename patches/{unapplied => }/server/Prevent-opening-inventories-when-frozen.patch (100%) rename patches/{unapplied => }/server/Prevent-position-desync-in-playerconnection-causing-.patch (100%) rename patches/{unapplied => }/server/Prevent-teleporting-dead-entities.patch (100%) rename patches/{unapplied => }/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch (94%) rename patches/{unapplied => }/server/Reduce-Either-Optional-allocation.patch (100%) rename patches/{unapplied => }/server/Reduce-memory-footprint-of-NBTTagCompound.patch (100%) rename patches/{unapplied => }/server/Remote-Connections-shouldn-t-hold-up-shutdown.patch (100%) rename patches/{unapplied => }/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch (100%) rename patches/{unapplied => }/server/Set-spigots-verbose-world-setting-to-false-by-def.patch (100%) rename patches/{unapplied => }/server/Use-distance-map-to-optimise-entity-tracker.patch (99%) rename patches/{unapplied => }/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch (100%) rename patches/{unapplied => }/server/Validate-PickItem-Packet-and-kick-for-invalid.patch (100%) rename patches/{unapplied => }/server/Validate-tripwire-hook-placement-before-update.patch (60%) rename patches/{unapplied => }/server/Villager-Restocks-API.patch (100%) rename patches/{unapplied => }/server/Wait-for-Async-Tasks-during-shutdown.patch (100%) rename patches/{unapplied => }/server/add-hand-to-BlockMultiPlaceEvent.patch (100%) rename patches/{unapplied => }/server/misc-debugging-dumps.patch (100%) diff --git a/patches/unapplied/server/Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerAttackEntityCooldownResetEvent.patch rename to patches/server/Add-PlayerAttackEntityCooldownResetEvent.patch diff --git a/patches/unapplied/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from patches/unapplied/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/patches/unapplied/server/Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from patches/unapplied/server/Add-Raw-Byte-ItemStack-Serialization.patch rename to patches/server/Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/patches/unapplied/server/Add-ThrownEggHatchEvent.patch b/patches/server/Add-ThrownEggHatchEvent.patch similarity index 89% rename from patches/unapplied/server/Add-ThrownEggHatchEvent.patch rename to patches/server/Add-ThrownEggHatchEvent.patch index ae364ab44c..72bc0bcd65 100644 --- a/patches/unapplied/server/Add-ThrownEggHatchEvent.patch +++ b/patches/server/Add-ThrownEggHatchEvent.patch @@ -23,4 +23,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end for (int i = 0; i < b0; ++i) { - Entity entitychicken = this.level().getWorld().createEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit + Entity entitychicken = this.level().getWorld().makeEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit diff --git a/patches/unapplied/server/Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from patches/unapplied/server/Add-and-implement-PlayerRecipeBookClickEvent.patch rename to patches/server/Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/patches/unapplied/server/Add-debug-for-sync-chunk-loads.patch b/patches/server/Add-debug-for-sync-chunk-loads.patch similarity index 100% rename from patches/unapplied/server/Add-debug-for-sync-chunk-loads.patch rename to patches/server/Add-debug-for-sync-chunk-loads.patch diff --git a/patches/unapplied/server/Add-option-for-console-having-all-permissions.patch b/patches/server/Add-option-for-console-having-all-permissions.patch similarity index 100% rename from patches/unapplied/server/Add-option-for-console-having-all-permissions.patch rename to patches/server/Add-option-for-console-having-all-permissions.patch diff --git a/patches/unapplied/server/Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 100% rename from patches/unapplied/server/Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to patches/server/Add-option-to-allow-iron-golems-to-spawn-in-air.patch diff --git a/patches/unapplied/server/Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 95% rename from patches/unapplied/server/Add-option-to-nerf-pigmen-from-nether-portals.patch rename to patches/server/Add-option-to-nerf-pigmen-from-nether-portals.patch index f6ea9a9d7d..6d3a8abd6c 100644 --- a/patches/unapplied/server/Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/Add-option-to-nerf-pigmen-from-nether-portals.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 // Paper start public long activatedImmunityTick = Integer.MIN_VALUE; // Paper public boolean isTemporarilyActive = false; // Paper @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 protected int numCollisions = 0; // Paper public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one @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 if (spawnedViaMobSpawner) { nbt.putBoolean("Paper.FromMobSpawner", true); } @@ -24,9 +24,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + nbt.putBoolean("Paper.FromNetherPortal", 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 } spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status diff --git a/patches/unapplied/server/Add-permission-for-command-blocks.patch b/patches/server/Add-permission-for-command-blocks.patch similarity index 100% rename from patches/unapplied/server/Add-permission-for-command-blocks.patch rename to patches/server/Add-permission-for-command-blocks.patch diff --git a/patches/unapplied/server/Add-phantom-creative-and-insomniac-controls.patch b/patches/server/Add-phantom-creative-and-insomniac-controls.patch similarity index 100% rename from patches/unapplied/server/Add-phantom-creative-and-insomniac-controls.patch rename to patches/server/Add-phantom-creative-and-insomniac-controls.patch diff --git a/patches/unapplied/server/Add-tick-times-API-and-mspt-command.patch b/patches/server/Add-tick-times-API-and-mspt-command.patch similarity index 94% rename from patches/unapplied/server/Add-tick-times-API-and-mspt-command.patch rename to patches/server/Add-tick-times-API-and-mspt-command.patch index 79a407fb35..11479ba47e 100644 --- a/patches/unapplied/server/Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/Add-tick-times-API-and-mspt-command.patch @@ -129,9 +129,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && loopItem.value >= maxValue)) { + if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue) && new com.destroystokyo.paper.event.entity.ExperienceOrbMergeEvent((org.bukkit.entity.ExperienceOrb) entity.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) loopItem.getBukkitEntity()).callEvent()) { // Paper - ExperienceOrbMergeEvent diff --git a/patches/unapplied/server/Expose-MinecraftServer-isRunning.patch b/patches/server/Expose-MinecraftServer-isRunning.patch similarity index 100% rename from patches/unapplied/server/Expose-MinecraftServer-isRunning.patch rename to patches/server/Expose-MinecraftServer-isRunning.patch diff --git a/patches/unapplied/server/Expose-game-version.patch b/patches/server/Expose-game-version.patch similarity index 100% rename from patches/unapplied/server/Expose-game-version.patch rename to patches/server/Expose-game-version.patch diff --git a/patches/unapplied/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from patches/unapplied/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to patches/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/patches/unapplied/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 100% rename from patches/unapplied/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to patches/server/Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch diff --git a/patches/unapplied/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 100% rename from patches/unapplied/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to patches/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch diff --git a/patches/unapplied/server/Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from patches/unapplied/server/Fix-PotionEffect-ignores-icon-flag.patch rename to patches/server/Fix-PotionEffect-ignores-icon-flag.patch diff --git a/patches/unapplied/server/Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from patches/unapplied/server/Fix-missing-chunks-due-to-integer-overflow.patch rename to patches/server/Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/patches/unapplied/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch b/patches/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 98% rename from patches/unapplied/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to patches/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch index f49864e08d..5e7474e221 100644 --- a/patches/unapplied/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/patches/server/Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -19,7 +19,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 } else { // CraftBukkit start - Capture drops for death event if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) { @@ -34,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 entityitem.setDefaultPickUpDelay(); // CraftBukkit start -@@ -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 @Nullable public Entity teleportTo(ServerLevel worldserver, Vec3 location) { // CraftBukkit end @@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (this.level() instanceof ServerLevel && !this.isRemoved()) { this.level().getProfiler().push("changeDimension"); // CraftBukkit start -@@ -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 // CraftBukkit end this.level().getProfiler().popPush("reloading"); @@ -59,7 +59,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Entity entity = this.getType().create(worldserver); if (entity != null) { -@@ -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 // CraftBukkit start - Forward the CraftEntity to the new entity this.getBukkitEntity().setHandle(entity); entity.bukkitEntity = this.getBukkitEntity(); @@ -70,7 +70,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end } -@@ -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 boolean canChangeDimensions() { diff --git a/patches/unapplied/server/Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from patches/unapplied/server/Fix-piston-physics-inconsistency-MC-188840.patch rename to patches/server/Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/patches/unapplied/server/Fix-sand-duping.patch b/patches/server/Fix-sand-duping.patch similarity index 100% rename from patches/unapplied/server/Fix-sand-duping.patch rename to patches/server/Fix-sand-duping.patch diff --git a/patches/unapplied/server/Fix-villager-trading-demand-MC-163962.patch b/patches/server/Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from patches/unapplied/server/Fix-villager-trading-demand-MC-163962.patch rename to patches/server/Fix-villager-trading-demand-MC-163962.patch diff --git a/patches/unapplied/server/Hide-sync-chunk-writes-behind-flag.patch b/patches/server/Hide-sync-chunk-writes-behind-flag.patch similarity index 100% rename from patches/unapplied/server/Hide-sync-chunk-writes-behind-flag.patch rename to patches/server/Hide-sync-chunk-writes-behind-flag.patch diff --git a/patches/unapplied/server/Implement-Mob-Goal-API.patch b/patches/server/Implement-Mob-Goal-API.patch similarity index 100% rename from patches/unapplied/server/Implement-Mob-Goal-API.patch rename to patches/server/Implement-Mob-Goal-API.patch diff --git a/patches/unapplied/server/Implement-Player-Client-Options-API.patch b/patches/server/Implement-Player-Client-Options-API.patch similarity index 100% rename from patches/unapplied/server/Implement-Player-Client-Options-API.patch rename to patches/server/Implement-Player-Client-Options-API.patch diff --git a/patches/unapplied/server/Improve-Arrow-API.patch b/patches/server/Improve-Arrow-API.patch similarity index 100% rename from patches/unapplied/server/Improve-Arrow-API.patch rename to patches/server/Improve-Arrow-API.patch diff --git a/patches/unapplied/server/Improve-Block-breakNaturally-API.patch b/patches/server/Improve-Block-breakNaturally-API.patch similarity index 100% rename from patches/unapplied/server/Improve-Block-breakNaturally-API.patch rename to patches/server/Improve-Block-breakNaturally-API.patch diff --git a/patches/unapplied/server/Improve-Legacy-Component-serialization-size.patch b/patches/server/Improve-Legacy-Component-serialization-size.patch similarity index 100% rename from patches/unapplied/server/Improve-Legacy-Component-serialization-size.patch rename to patches/server/Improve-Legacy-Component-serialization-size.patch diff --git a/patches/unapplied/server/Improve-java-version-check.patch b/patches/server/Improve-java-version-check.patch similarity index 100% rename from patches/unapplied/server/Improve-java-version-check.patch rename to patches/server/Improve-java-version-check.patch diff --git a/patches/unapplied/server/Improved-Watchdog-Support.patch b/patches/server/Improved-Watchdog-Support.patch similarity index 99% rename from patches/unapplied/server/Improved-Watchdog-Support.patch rename to patches/server/Improved-Watchdog-Support.patch index a4fc2ebcc0..3058ff9dbb 100644 --- a/patches/unapplied/server/Improved-Watchdog-Support.patch +++ b/patches/server/Improved-Watchdog-Support.patch @@ -168,9 +168,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + org.spigotmc.WatchdogThread.tick(); // Paper org.spigotmc.WatchdogThread.hasStarted = true; // Paper Arrays.fill( this.recentTps, 20 ); - long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop + long tickSection = Util.getNanos(), curTime, tickCount = 1; // Paper @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0) { + // Paper start - Maximum exp value when merging - Whole section has been tweaked, see comments for specifics @@ -19,8 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + List entities = world.getEntities(entity, entity.getBoundingBox().inflate(radius, radius, radius)); for (Entity e : entities) { - if (e instanceof net.minecraft.world.entity.ExperienceOrb) { - net.minecraft.world.entity.ExperienceOrb loopItem = (net.minecraft.world.entity.ExperienceOrb) e; + if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) { - if (!loopItem.isRemoved()) { + // Paper start + if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue)) { @@ -36,7 +35,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } } } -+ } // Paper end - End iteration skip check - All tweaking ends here } ++ } // Paper end - End iteration skip check - All tweaking ends here + } // Spigot end - } else if (!(entity instanceof ServerPlayer)) { + diff --git a/patches/unapplied/server/Paper-dumpitem-command.patch b/patches/server/Paper-dumpitem-command.patch similarity index 100% rename from patches/unapplied/server/Paper-dumpitem-command.patch rename to patches/server/Paper-dumpitem-command.patch diff --git a/patches/unapplied/server/Pillager-patrol-spawn-settings-and-per-player-option.patch b/patches/server/Pillager-patrol-spawn-settings-and-per-player-option.patch similarity index 100% rename from patches/unapplied/server/Pillager-patrol-spawn-settings-and-per-player-option.patch rename to patches/server/Pillager-patrol-spawn-settings-and-per-player-option.patch diff --git a/patches/unapplied/server/Potential-bed-API.patch b/patches/server/Potential-bed-API.patch similarity index 100% rename from patches/unapplied/server/Potential-bed-API.patch rename to patches/server/Potential-bed-API.patch diff --git a/patches/unapplied/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch similarity index 100% rename from patches/unapplied/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch rename to patches/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch diff --git a/patches/unapplied/server/Prevent-opening-inventories-when-frozen.patch b/patches/server/Prevent-opening-inventories-when-frozen.patch similarity index 100% rename from patches/unapplied/server/Prevent-opening-inventories-when-frozen.patch rename to patches/server/Prevent-opening-inventories-when-frozen.patch diff --git a/patches/unapplied/server/Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from patches/unapplied/server/Prevent-position-desync-in-playerconnection-causing-.patch rename to patches/server/Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/patches/unapplied/server/Prevent-teleporting-dead-entities.patch b/patches/server/Prevent-teleporting-dead-entities.patch similarity index 100% rename from patches/unapplied/server/Prevent-teleporting-dead-entities.patch rename to patches/server/Prevent-teleporting-dead-entities.patch diff --git a/patches/unapplied/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 94% rename from patches/unapplied/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to patches/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index 59a7b34c5e..51a191a670 100644 --- a/patches/unapplied/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/patches/server/Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -24,15 +24,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 FluidState fluid = iblockdata.getFluidState(); // Paper if (!this.level.isInWorldBounds(blockposition)) { -@@ -0,0 +0,0 @@ public class Explosion { - } - // CraftBukkit end - -- if (!iblockdata.isAir()) { -+ if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper - BlockPos blockposition1 = blockposition.immutable(); - - this.level.getProfiler().push("explosion_blocks"); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/Level.java @@ -118,6 +109,15 @@ diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour. index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +@@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { + /** @deprecated */ + @Deprecated + public void onExplosionHit(BlockState state, Level world, BlockPos pos, Explosion explosion, BiConsumer stackMerger) { +- if (!state.isAir() && explosion.getBlockInteraction() != Explosion.BlockInteraction.TRIGGER_BLOCK) { ++ if (!state.isAir() && explosion.getBlockInteraction() != Explosion.BlockInteraction.TRIGGER_BLOCK && state.isDestroyable()) { // Paper + Block block = state.getBlock(); + boolean flag = explosion.getIndirectSourceEntity() instanceof Player; + @@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { /** @deprecated */ @Deprecated diff --git a/patches/unapplied/server/Reduce-Either-Optional-allocation.patch b/patches/server/Reduce-Either-Optional-allocation.patch similarity index 100% rename from patches/unapplied/server/Reduce-Either-Optional-allocation.patch rename to patches/server/Reduce-Either-Optional-allocation.patch diff --git a/patches/unapplied/server/Reduce-memory-footprint-of-NBTTagCompound.patch b/patches/server/Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 100% rename from patches/unapplied/server/Reduce-memory-footprint-of-NBTTagCompound.patch rename to patches/server/Reduce-memory-footprint-of-NBTTagCompound.patch diff --git a/patches/unapplied/server/Remote-Connections-shouldn-t-hold-up-shutdown.patch b/patches/server/Remote-Connections-shouldn-t-hold-up-shutdown.patch similarity index 100% rename from patches/unapplied/server/Remote-Connections-shouldn-t-hold-up-shutdown.patch rename to patches/server/Remote-Connections-shouldn-t-hold-up-shutdown.patch diff --git a/patches/unapplied/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from patches/unapplied/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to patches/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/patches/unapplied/server/Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 100% rename from patches/unapplied/server/Set-spigots-verbose-world-setting-to-false-by-def.patch rename to patches/server/Set-spigots-verbose-world-setting-to-false-by-def.patch diff --git a/patches/unapplied/server/Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/Use-distance-map-to-optimise-entity-tracker.patch similarity index 99% rename from patches/unapplied/server/Use-distance-map-to-optimise-entity-tracker.patch rename to patches/server/Use-distance-map-to-optimise-entity-tracker.patch index 9a76d7d50f..0c8e540e93 100644 --- a/patches/unapplied/server/Use-distance-map-to-optimise-entity-tracker.patch +++ b/patches/server/Use-distance-map-to-optimise-entity-tracker.patch @@ -247,7 +247,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -@@ -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 boolean updatingSectionStatus = false; // Paper end diff --git a/patches/unapplied/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from patches/unapplied/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/patches/unapplied/server/Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 100% rename from patches/unapplied/server/Validate-PickItem-Packet-and-kick-for-invalid.patch rename to patches/server/Validate-PickItem-Packet-and-kick-for-invalid.patch diff --git a/patches/unapplied/server/Validate-tripwire-hook-placement-before-update.patch b/patches/server/Validate-tripwire-hook-placement-before-update.patch similarity index 60% rename from patches/unapplied/server/Validate-tripwire-hook-placement-before-update.patch rename to patches/server/Validate-tripwire-hook-placement-before-update.patch index 440eda08ed..34e1c65d66 100644 --- a/patches/unapplied/server/Validate-tripwire-hook-placement-before-update.patch +++ b/patches/server/Validate-tripwire-hook-placement-before-update.patch @@ -10,9 +10,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java @@ -0,0 +0,0 @@ public class TripWireHookBlock extends Block { - this.emitState(world, pos, flag4, flag5, flag2, flag3); - if (!beingRemoved) { -+ if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate - world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3); - if (flag1) { - this.notifyNeighbors(world, pos, enumdirection); + TripWireHookBlock.emitState(world, pos, flag4, flag5, flag2, flag3); + if (!flag) { ++ if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate + world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3); + if (flag1) { + TripWireHookBlock.notifyNeighbors(block, world, pos, enumdirection); diff --git a/patches/unapplied/server/Villager-Restocks-API.patch b/patches/server/Villager-Restocks-API.patch similarity index 100% rename from patches/unapplied/server/Villager-Restocks-API.patch rename to patches/server/Villager-Restocks-API.patch diff --git a/patches/unapplied/server/Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/Wait-for-Async-Tasks-during-shutdown.patch similarity index 100% rename from patches/unapplied/server/Wait-for-Async-Tasks-during-shutdown.patch rename to patches/server/Wait-for-Async-Tasks-during-shutdown.patch diff --git a/patches/unapplied/server/add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/add-hand-to-BlockMultiPlaceEvent.patch similarity index 100% rename from patches/unapplied/server/add-hand-to-BlockMultiPlaceEvent.patch rename to patches/server/add-hand-to-BlockMultiPlaceEvent.patch diff --git a/patches/unapplied/server/misc-debugging-dumps.patch b/patches/server/misc-debugging-dumps.patch similarity index 100% rename from patches/unapplied/server/misc-debugging-dumps.patch rename to patches/server/misc-debugging-dumps.patch