From 58133bdfdfa9003031fbf26fbc7668b7995a9260 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Tue, 7 Jun 2022 23:54:21 +0200 Subject: [PATCH] Update PreCreatureSpawnEvent patch --- .../0170-PreCreatureSpawnEvent.patch} | 93 ++++++++++++------- ...> 0171-Fill-Profile-Property-Events.patch} | 0 ...layerAdvancementCriterionGrantEvent.patch} | 0 ...ch => 0173-Add-ArmorStand-Item-Meta.patch} | 0 ...Extend-Player-Interact-cancellation.patch} | 0 ... 0175-Tameable-getOwnerUniqueId-API.patch} | 0 ...-crits-helps-mitigate-hacked-client.patch} | 0 ...e-Explicit-Network-Manager-Flushing.patch} | 0 ...t-extended-PaperServerListPingEvent.patch} | 0 ...-PlayerProfile-in-AsyncPreLoginEven.patch} | 0 ...=> 0180-Player.setPlayerProfile-API.patch} | 0 ...patch => 0181-getPlayerUniqueId-API.patch} | 2 +- ... 0182-Improved-Async-Task-Scheduler.patch} | 0 ... => 0183-Upstream-config-migrations.patch} | 0 ...e-legacy-ping-handler-more-reliable.patch} | 0 ...erverListPingEvent-for-legacy-pings.patch} | 0 ...6-Flag-to-disable-the-channel-limit.patch} | 2 +- ...-Add-openSign-method-to-HumanEntity.patch} | 0 ...rable-sprint-interruption-on-attack.patch} | 0 ...allowed-colored-signs-to-be-created.patch} | 0 ...t.patch => 0190-EndermanEscapeEvent.patch} | 0 ...h => 0191-Enderman.teleportRandomly.patch} | 0 ...192-Block-Enderpearl-Travel-Exploit.patch} | 0 ...d.spawnParticle-API-and-add-Builder.patch} | 0 ...ted-Ice-from-loading-holding-chunks.patch} | 0 ...h => 0195-EndermanAttackPlayerEvent.patch} | 0 ...tch => 0196-WitchConsumePotionEvent.patch} | 0 ...patch => 0197-WitchThrowPotionEvent.patch} | 0 ...tem-entities-with-World.spawnEntity.patch} | 0 ...patch => 0199-WitchReadyPotionEvent.patch} | 0 ...200-ItemStack-getMaxItemUseDuration.patch} | 0 ...ement-EntityTeleportEndGatewayEvent.patch} | 0 ...d-flag-on-cancel-of-Explosion-Event.patch} | 0 ...ch => 0203-Fix-CraftEntity-hashCode.patch} | 0 ...e-Alternative-LootPool-Luck-Formula.patch} | 0 ...ls-when-failing-to-save-player-data.patch} | 0 ...-shield-blocking-delay-configurable.patch} | 0 ...=> 0207-Improve-EntityShootBowEvent.patch} | 0 ...patch => 0208-PlayerReadyArrowEvent.patch} | 0 ...lement-EntityKnockbackByEntityEvent.patch} | 0 ...patch => 0210-Expand-Explosions-API.patch} | 0 ...vingEntity-Hand-Raised-Item-Use-API.patch} | 0 ...-API.patch => 0212-RangedEntity-API.patch} | 0 ...o-disable-ender-dragon-legacy-check.patch} | 0 ...-Implement-World.getEntity-UUID-API.patch} | 0 ...0215-InventoryCloseEvent-Reason-API.patch} | 4 +- ...tch => 0216-Vex-get-setSummoner-API.patch} | 0 ...ventory-when-cancelling-PlayerInter.patch} | 0 ...-if-stack-size-above-max-stack-size.patch} | 0 ...-to-keep-logging-IO-off-main-thread.patch} | 0 ...more-information-to-Entity.toString.patch} | 0 ...tMagicNumbers.isSupportedApiVersion.patch} | 0 ...ts.patch => 0222-EnderDragon-Events.patch} | 0 ...atch => 0223-PlayerElytraBoostEvent.patch} | 0 ...=> 0224-PlayerLaunchProjectileEvent.patch} | 0 ...0225-Improve-BlockPosition-inlining.patch} | 0 ...-armor-stands-from-doing-entity-loo.patch} | 0 ...-Vanished-players-don-t-have-rights.patch} | 0 ...llow-disabling-armour-stand-ticking.patch} | 0 ...tch => 0229-SkeletonHorse-Additions.patch} | 0 ...n-t-call-getItemMeta-on-hasItemMeta.patch} | 0 ...1-Implement-Expanded-ArmorStand-API.patch} | 0 ...vent.patch => 0232-AnvilDamageEvent.patch} | 0 ...h => 0233-Add-hand-to-bucket-events.patch} | 0 ...ent.patch => 0234-Add-TNTPrimeEvent.patch} | 0 ...d-make-tab-spam-limits-configurable.patch} | 0 ...-Experience-should-save-as-Integers.patch} | 0 ...ent-rendering-skulls-from-same-user.patch} | 0 ...es-option-to-debug-dupe-uuid-issues.patch} | 0 ...d-Early-Warning-Feature-to-WatchDog.patch} | 2 +- ...0-Use-ConcurrentHashMap-in-JsonList.patch} | 2 +- ...1-Use-a-Queue-for-Queueing-Commands.patch} | 0 ...le-Entities-from-a-chunk-without-sn.patch} | 0 ...timize-BlockPosition-helper-methods.patch} | 0 ...efault-mob-spawn-range-and-water-an.patch} | 0 ...tch => 0245-Slime-Pathfinder-Events.patch} | 0 ...e-speed-for-water-flowing-over-lava.patch} | 0 ...47-Optimize-CraftBlockData-Creation.patch} | 0 ...tch => 0248-Optimize-MappedRegistry.patch} | 0 ...ch => 0249-Add-PhantomPreSpawnEvent.patch} | 0 ....patch => 0250-Add-More-Creeper-API.patch} | 0 ...=> 0251-Inventory-removeItemAnySlot.patch} | 0 ...oadChunk-int-int-false-load-unconve.patch} | 0 83 files changed, 68 insertions(+), 37 deletions(-) rename patches/{removed/1.19/0169-PreCreatureSpawnEvent.patch => server/0170-PreCreatureSpawnEvent.patch} (61%) rename patches/server/{0170-Fill-Profile-Property-Events.patch => 0171-Fill-Profile-Property-Events.patch} (100%) rename patches/server/{0171-PlayerAdvancementCriterionGrantEvent.patch => 0172-PlayerAdvancementCriterionGrantEvent.patch} (100%) rename patches/server/{0172-Add-ArmorStand-Item-Meta.patch => 0173-Add-ArmorStand-Item-Meta.patch} (100%) rename patches/server/{0173-Extend-Player-Interact-cancellation.patch => 0174-Extend-Player-Interact-cancellation.patch} (100%) rename patches/server/{0174-Tameable-getOwnerUniqueId-API.patch => 0175-Tameable-getOwnerUniqueId-API.patch} (100%) rename patches/server/{0175-Toggleable-player-crits-helps-mitigate-hacked-client.patch => 0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch} (100%) rename patches/server/{0176-Disable-Explicit-Network-Manager-Flushing.patch => 0177-Disable-Explicit-Network-Manager-Flushing.patch} (100%) rename patches/server/{0177-Implement-extended-PaperServerListPingEvent.patch => 0178-Implement-extended-PaperServerListPingEvent.patch} (100%) rename patches/server/{0178-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch => 0179-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch} (100%) rename patches/server/{0179-Player.setPlayerProfile-API.patch => 0180-Player.setPlayerProfile-API.patch} (100%) rename patches/server/{0180-getPlayerUniqueId-API.patch => 0181-getPlayerUniqueId-API.patch} (94%) rename patches/server/{0181-Improved-Async-Task-Scheduler.patch => 0182-Improved-Async-Task-Scheduler.patch} (100%) rename patches/server/{0182-Upstream-config-migrations.patch => 0183-Upstream-config-migrations.patch} (100%) rename patches/server/{0183-Make-legacy-ping-handler-more-reliable.patch => 0184-Make-legacy-ping-handler-more-reliable.patch} (100%) rename patches/server/{0184-Call-PaperServerListPingEvent-for-legacy-pings.patch => 0185-Call-PaperServerListPingEvent-for-legacy-pings.patch} (100%) rename patches/server/{0185-Flag-to-disable-the-channel-limit.patch => 0186-Flag-to-disable-the-channel-limit.patch} (95%) rename patches/server/{0186-Add-openSign-method-to-HumanEntity.patch => 0187-Add-openSign-method-to-HumanEntity.patch} (100%) rename patches/server/{0187-Configurable-sprint-interruption-on-attack.patch => 0188-Configurable-sprint-interruption-on-attack.patch} (100%) rename patches/server/{0188-Fix-exploit-that-allowed-colored-signs-to-be-created.patch => 0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch} (100%) rename patches/server/{0189-EndermanEscapeEvent.patch => 0190-EndermanEscapeEvent.patch} (100%) rename patches/server/{0190-Enderman.teleportRandomly.patch => 0191-Enderman.teleportRandomly.patch} (100%) rename patches/server/{0191-Block-Enderpearl-Travel-Exploit.patch => 0192-Block-Enderpearl-Travel-Exploit.patch} (100%) rename patches/server/{0192-Expand-World.spawnParticle-API-and-add-Builder.patch => 0193-Expand-World.spawnParticle-API-and-add-Builder.patch} (100%) rename patches/server/{0193-Prevent-Frosted-Ice-from-loading-holding-chunks.patch => 0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch} (100%) rename patches/server/{0194-EndermanAttackPlayerEvent.patch => 0195-EndermanAttackPlayerEvent.patch} (100%) rename patches/server/{0195-WitchConsumePotionEvent.patch => 0196-WitchConsumePotionEvent.patch} (100%) rename patches/server/{0196-WitchThrowPotionEvent.patch => 0197-WitchThrowPotionEvent.patch} (100%) rename patches/server/{0197-Allow-spawning-Item-entities-with-World.spawnEntity.patch => 0198-Allow-spawning-Item-entities-with-World.spawnEntity.patch} (100%) rename patches/server/{0198-WitchReadyPotionEvent.patch => 0199-WitchReadyPotionEvent.patch} (100%) rename patches/server/{0199-ItemStack-getMaxItemUseDuration.patch => 0200-ItemStack-getMaxItemUseDuration.patch} (100%) rename patches/server/{0200-Implement-EntityTeleportEndGatewayEvent.patch => 0201-Implement-EntityTeleportEndGatewayEvent.patch} (100%) rename patches/server/{0201-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch => 0202-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch} (100%) rename patches/server/{0202-Fix-CraftEntity-hashCode.patch => 0203-Fix-CraftEntity-hashCode.patch} (100%) rename patches/server/{0203-Configurable-Alternative-LootPool-Luck-Formula.patch => 0204-Configurable-Alternative-LootPool-Luck-Formula.patch} (100%) rename patches/server/{0204-Print-Error-details-when-failing-to-save-player-data.patch => 0205-Print-Error-details-when-failing-to-save-player-data.patch} (100%) rename patches/server/{0205-Make-shield-blocking-delay-configurable.patch => 0206-Make-shield-blocking-delay-configurable.patch} (100%) rename patches/server/{0206-Improve-EntityShootBowEvent.patch => 0207-Improve-EntityShootBowEvent.patch} (100%) rename patches/server/{0207-PlayerReadyArrowEvent.patch => 0208-PlayerReadyArrowEvent.patch} (100%) rename patches/server/{0208-Implement-EntityKnockbackByEntityEvent.patch => 0209-Implement-EntityKnockbackByEntityEvent.patch} (100%) rename patches/server/{0209-Expand-Explosions-API.patch => 0210-Expand-Explosions-API.patch} (100%) rename patches/server/{0210-LivingEntity-Hand-Raised-Item-Use-API.patch => 0211-LivingEntity-Hand-Raised-Item-Use-API.patch} (100%) rename patches/server/{0211-RangedEntity-API.patch => 0212-RangedEntity-API.patch} (100%) rename patches/server/{0212-Add-config-to-disable-ender-dragon-legacy-check.patch => 0213-Add-config-to-disable-ender-dragon-legacy-check.patch} (100%) rename patches/server/{0213-Implement-World.getEntity-UUID-API.patch => 0214-Implement-World.getEntity-UUID-API.patch} (100%) rename patches/server/{0214-InventoryCloseEvent-Reason-API.patch => 0215-InventoryCloseEvent-Reason-API.patch} (98%) rename patches/server/{0215-Vex-get-setSummoner-API.patch => 0216-Vex-get-setSummoner-API.patch} (100%) rename patches/server/{0216-Refresh-player-inventory-when-cancelling-PlayerInter.patch => 0217-Refresh-player-inventory-when-cancelling-PlayerInter.patch} (100%) rename patches/server/{0217-Avoid-item-merge-if-stack-size-above-max-stack-size.patch => 0218-Avoid-item-merge-if-stack-size-above-max-stack-size.patch} (100%) rename patches/server/{0218-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch => 0219-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch} (100%) rename patches/server/{0219-add-more-information-to-Entity.toString.patch => 0220-add-more-information-to-Entity.toString.patch} (100%) rename patches/server/{0220-Add-CraftMagicNumbers.isSupportedApiVersion.patch => 0221-Add-CraftMagicNumbers.isSupportedApiVersion.patch} (100%) rename patches/server/{0221-EnderDragon-Events.patch => 0222-EnderDragon-Events.patch} (100%) rename patches/server/{0222-PlayerElytraBoostEvent.patch => 0223-PlayerElytraBoostEvent.patch} (100%) rename patches/server/{0223-PlayerLaunchProjectileEvent.patch => 0224-PlayerLaunchProjectileEvent.patch} (100%) rename patches/server/{0224-Improve-BlockPosition-inlining.patch => 0225-Improve-BlockPosition-inlining.patch} (100%) rename patches/server/{0225-Option-to-prevent-armor-stands-from-doing-entity-loo.patch => 0226-Option-to-prevent-armor-stands-from-doing-entity-loo.patch} (100%) rename patches/server/{0226-Vanished-players-don-t-have-rights.patch => 0227-Vanished-players-don-t-have-rights.patch} (100%) rename patches/server/{0227-Allow-disabling-armour-stand-ticking.patch => 0228-Allow-disabling-armour-stand-ticking.patch} (100%) rename patches/server/{0228-SkeletonHorse-Additions.patch => 0229-SkeletonHorse-Additions.patch} (100%) rename patches/server/{0229-Don-t-call-getItemMeta-on-hasItemMeta.patch => 0230-Don-t-call-getItemMeta-on-hasItemMeta.patch} (100%) rename patches/server/{0230-Implement-Expanded-ArmorStand-API.patch => 0231-Implement-Expanded-ArmorStand-API.patch} (100%) rename patches/server/{0231-AnvilDamageEvent.patch => 0232-AnvilDamageEvent.patch} (100%) rename patches/server/{0232-Add-hand-to-bucket-events.patch => 0233-Add-hand-to-bucket-events.patch} (100%) rename patches/server/{0233-Add-TNTPrimeEvent.patch => 0234-Add-TNTPrimeEvent.patch} (100%) rename patches/server/{0234-Break-up-and-make-tab-spam-limits-configurable.patch => 0235-Break-up-and-make-tab-spam-limits-configurable.patch} (100%) rename patches/server/{0235-MC-135506-Experience-should-save-as-Integers.patch => 0236-MC-135506-Experience-should-save-as-Integers.patch} (100%) rename patches/server/{0236-Fix-client-rendering-skulls-from-same-user.patch => 0237-Fix-client-rendering-skulls-from-same-user.patch} (100%) rename patches/server/{0237-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch => 0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch} (100%) rename patches/server/{0238-Add-Early-Warning-Feature-to-WatchDog.patch => 0239-Add-Early-Warning-Feature-to-WatchDog.patch} (99%) rename patches/server/{0239-Use-ConcurrentHashMap-in-JsonList.patch => 0240-Use-ConcurrentHashMap-in-JsonList.patch} (98%) rename patches/server/{0240-Use-a-Queue-for-Queueing-Commands.patch => 0241-Use-a-Queue-for-Queueing-Commands.patch} (100%) rename patches/server/{0241-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch => 0242-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch} (100%) rename patches/server/{0242-Optimize-BlockPosition-helper-methods.patch => 0243-Optimize-BlockPosition-helper-methods.patch} (100%) rename patches/server/{0243-Restore-vanilla-default-mob-spawn-range-and-water-an.patch => 0244-Restore-vanilla-default-mob-spawn-range-and-water-an.patch} (100%) rename patches/server/{0244-Slime-Pathfinder-Events.patch => 0245-Slime-Pathfinder-Events.patch} (100%) rename patches/server/{0245-Configurable-speed-for-water-flowing-over-lava.patch => 0246-Configurable-speed-for-water-flowing-over-lava.patch} (100%) rename patches/server/{0246-Optimize-CraftBlockData-Creation.patch => 0247-Optimize-CraftBlockData-Creation.patch} (100%) rename patches/server/{0247-Optimize-MappedRegistry.patch => 0248-Optimize-MappedRegistry.patch} (100%) rename patches/server/{0248-Add-PhantomPreSpawnEvent.patch => 0249-Add-PhantomPreSpawnEvent.patch} (100%) rename patches/server/{0249-Add-More-Creeper-API.patch => 0250-Add-More-Creeper-API.patch} (100%) rename patches/server/{0250-Inventory-removeItemAnySlot.patch => 0251-Inventory-removeItemAnySlot.patch} (100%) rename patches/server/{0251-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch => 0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch} (100%) diff --git a/patches/removed/1.19/0169-PreCreatureSpawnEvent.patch b/patches/server/0170-PreCreatureSpawnEvent.patch similarity index 61% rename from patches/removed/1.19/0169-PreCreatureSpawnEvent.patch rename to patches/server/0170-PreCreatureSpawnEvent.patch index b69782184..48aecbc86 100644 --- a/patches/removed/1.19/0169-PreCreatureSpawnEvent.patch +++ b/patches/server/0170-PreCreatureSpawnEvent.patch @@ -14,11 +14,55 @@ instead and save a lot of server resources. See: https://github.com/PaperMC/Paper/issues/917 +diff --git a/src/main/java/net/minecraft/util/SpawnUtil.java b/src/main/java/net/minecraft/util/SpawnUtil.java +index f4d1a3e861a8727d7f3efd75c0e83cc9418fa9bd..4f2952cb39be3644e81ae627b748b7916eed2304 100644 +--- a/src/main/java/net/minecraft/util/SpawnUtil.java ++++ b/src/main/java/net/minecraft/util/SpawnUtil.java +@@ -19,10 +19,10 @@ public class SpawnUtil { + + public static Optional trySpawnMob(EntityType entityType, MobSpawnType reason, ServerLevel world, BlockPos pos, int tries, int horizontalRange, int verticalRange, SpawnUtil.Strategy requirements) { + // CraftBukkit start +- return SpawnUtil.trySpawnMob(entityType, reason, world, pos, tries, horizontalRange, verticalRange, requirements, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT); ++ return SpawnUtil.trySpawnMob(entityType, reason, world, pos, tries, horizontalRange, verticalRange, requirements, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT, null); // Paper + } + +- public static Optional trySpawnMob(EntityType entitytypes, MobSpawnType enummobspawn, ServerLevel worldserver, BlockPos blockposition, int i, int j, int k, SpawnUtil.Strategy spawnutil_a, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) { ++ public static Optional trySpawnMob(EntityType entitytypes, MobSpawnType enummobspawn, ServerLevel worldserver, BlockPos blockposition, int i, int j, int k, SpawnUtil.Strategy spawnutil_a, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason, @javax.annotation.Nullable Runnable onAbort) { // Paper + // CraftBukkit end + BlockPos.MutableBlockPos blockposition_mutableblockposition = blockposition.mutable(); + +@@ -32,6 +32,26 @@ public class SpawnUtil { + + blockposition_mutableblockposition.setWithOffset(blockposition, i1, k, j1); + if (worldserver.getWorldBorder().isWithinBounds((BlockPos) blockposition_mutableblockposition) && SpawnUtil.moveToPossibleSpawnPosition(worldserver, k, blockposition_mutableblockposition, spawnutil_a)) { ++ // Paper start ++ String key = EntityType.getKey(entitytypes).getPath(); ++ org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key); ++ ++ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event; ++ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( ++ net.minecraft.server.MCUtil.toLocation(worldserver, blockposition), ++ type, ++ reason ++ ); ++ if (!event.callEvent()) { ++ if (event.shouldAbortSpawn()) { ++ if (onAbort != null) { ++ onAbort.run(); ++ } ++ return Optional.empty(); ++ } ++ break; ++ } ++ // Paper end + T t0 = entitytypes.create(worldserver, (CompoundTag) null, (Component) null, (Player) null, blockposition_mutableblockposition, enummobspawn, false, false); // CraftBukkit - decompile error + + if (t0 != null) { diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 8699a3bd63e2df83615ae39a6873d9874f0fb8da..05a3d736193775c1aa6ce3759e13a1f76f747d09 100644 +index 0c7c8b8671738d9ec408f5dc7f2950a9991858b8..3ee0d583bb6e07570071562a083462c8d67e8a1d 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -338,6 +338,20 @@ public class EntityType implements EntityTypeTest { +@@ -347,6 +347,20 @@ public class EntityType implements EntityTypeTest { @Nullable public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { @@ -40,36 +84,23 @@ index 8699a3bd63e2df83615ae39a6873d9874f0fb8da..05a3d736193775c1aa6ce3759e13a1f7 if (t0 != null) { diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index ac44ba98d0acc9aa2a75088d8a9a145fdbcbd911..ecd7083b40ce6230d49ea4487766a6f06b4e96d0 100644 +index 25cd8a4101cf44955d95924c9794c238ddde2901..f957c0aca36b7228ac3a33ca04c948b1d10642d1 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -997,6 +997,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler - BlockPos blockposition1 = this.findSpawnPositionForGolemInColumn(blockposition, d0, d1); +@@ -947,7 +947,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler + }).limit(5L).collect(Collectors.toList()); - if (blockposition1 != null) { -+ // Paper start - Call PreCreatureSpawnEvent -+ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event; -+ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( -+ net.minecraft.server.MCUtil.toLocation(level, blockposition1), -+ org.bukkit.entity.EntityType.IRON_GOLEM, -+ org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE -+ ); -+ if (!event.callEvent()) { -+ if (event.shouldAbortSpawn()) { -+ GolemSensor.golemDetected(this); // Set Golem Last Seen to stop it from spawning another one -+ return null; -+ } -+ break; -+ } -+ // Paper end - IronGolem entityirongolem = (IronGolem) EntityType.IRON_GOLEM.create(world, (CompoundTag) null, (Component) null, (Player) null, blockposition1, MobSpawnType.MOB_SUMMONED, false, false); - - if (entityirongolem != null) { + if (list1.size() >= requiredCount) { +- if (SpawnUtil.trySpawnMob(EntityType.IRON_GOLEM, MobSpawnType.MOB_SUMMONED, world, this.blockPosition(), 10, 8, 6, SpawnUtil.Strategy.LEGACY_IRON_GOLEM, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE).isPresent()) { // CraftBukkit ++ if (SpawnUtil.trySpawnMob(EntityType.IRON_GOLEM, MobSpawnType.MOB_SUMMONED, world, this.blockPosition(), 10, 8, 6, SpawnUtil.Strategy.LEGACY_IRON_GOLEM, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE, () -> {GolemSensor.golemDetected(this);}).isPresent()) { // CraftBukkit // Paper - Set Golem Last Seen to stop it from spawning another one + list.forEach(GolemSensor::golemDetected); + } + } diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 5bf68b03ddfc7c9554c467e2c0588084a796f6fa..18b1b7c05665ee1fb06670ceded719b19f3a4ee3 100644 +index c104ea31c63fab8f23b4db71ba6e664f710e0bee..031bb42a1921966e8dd45c9e57dcd09f2dece7fb 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -122,6 +122,27 @@ public abstract class BaseSpawner { +@@ -124,6 +124,27 @@ public abstract class BaseSpawner { } else if (!SpawnPlacements.checkSpawnRules((EntityType) optional.get(), world, MobSpawnType.SPAWNER, blockposition1, world.getRandom())) { continue; } @@ -98,10 +129,10 @@ index 5bf68b03ddfc7c9554c467e2c0588084a796f6fa..18b1b7c05665ee1fb06670ceded719b1 Entity entity = EntityType.loadEntityRecursive(nbttagcompound, world, (entity1) -> { entity1.moveTo(d0, d1, d2, entity1.getYRot(), entity1.getXRot()); diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index fee21a585b95448a5edab70002e9c4ea36a5d989..a62c5f48e54d10eb416111448cd250704ef594a0 100644 +index 878fc7f57178bff0e42fd01434f0aaa2732f5a5b..ec6fcfc94b34d2b523c011b197e6484d13517c36 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -211,7 +211,13 @@ public final class NaturalSpawner { +@@ -212,7 +212,13 @@ public final class NaturalSpawner { j1 = biomesettingsmobs_c.minCount + world.random.nextInt(1 + biomesettingsmobs_c.maxCount - biomesettingsmobs_c.minCount); } @@ -116,12 +147,12 @@ index fee21a585b95448a5edab70002e9c4ea36a5d989..a62c5f48e54d10eb416111448cd25070 Mob entityinsentient = NaturalSpawner.getMobForSpawn(world, biomesettingsmobs_c.type); if (entityinsentient == null) { -@@ -258,9 +264,25 @@ public final class NaturalSpawner { +@@ -259,9 +265,25 @@ public final class NaturalSpawner { return squaredDistance <= 576.0D ? false : (world.getSharedSpawnPos().closerToCenterThan(new Vec3((double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D), 24.0D) ? false : Objects.equals(new ChunkPos(pos), chunk.getPos()) || world.isNaturalSpawningAllowed((BlockPos) pos)); } -- private static boolean isValidSpawnPostitionForType(ServerLevel world, MobCategory group, StructureFeatureManager structureAccessor, ChunkGenerator chunkGenerator, MobSpawnSettings.SpawnerData spawnEntry, BlockPos.MutableBlockPos pos, double squaredDistance) { -+ private static Boolean isValidSpawnPostitionForType(ServerLevel world, MobCategory group, StructureFeatureManager structureAccessor, ChunkGenerator chunkGenerator, MobSpawnSettings.SpawnerData spawnEntry, BlockPos.MutableBlockPos pos, double squaredDistance) { // Paper +- private static boolean isValidSpawnPostitionForType(ServerLevel world, MobCategory group, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobSpawnSettings.SpawnerData spawnEntry, BlockPos.MutableBlockPos pos, double squaredDistance) { ++ private static Boolean isValidSpawnPostitionForType(ServerLevel world, MobCategory group, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobSpawnSettings.SpawnerData spawnEntry, BlockPos.MutableBlockPos pos, double squaredDistance) { // Paper EntityType entitytypes = spawnEntry.type; + // Paper start diff --git a/patches/server/0170-Fill-Profile-Property-Events.patch b/patches/server/0171-Fill-Profile-Property-Events.patch similarity index 100% rename from patches/server/0170-Fill-Profile-Property-Events.patch rename to patches/server/0171-Fill-Profile-Property-Events.patch diff --git a/patches/server/0171-PlayerAdvancementCriterionGrantEvent.patch b/patches/server/0172-PlayerAdvancementCriterionGrantEvent.patch similarity index 100% rename from patches/server/0171-PlayerAdvancementCriterionGrantEvent.patch rename to patches/server/0172-PlayerAdvancementCriterionGrantEvent.patch diff --git a/patches/server/0172-Add-ArmorStand-Item-Meta.patch b/patches/server/0173-Add-ArmorStand-Item-Meta.patch similarity index 100% rename from patches/server/0172-Add-ArmorStand-Item-Meta.patch rename to patches/server/0173-Add-ArmorStand-Item-Meta.patch diff --git a/patches/server/0173-Extend-Player-Interact-cancellation.patch b/patches/server/0174-Extend-Player-Interact-cancellation.patch similarity index 100% rename from patches/server/0173-Extend-Player-Interact-cancellation.patch rename to patches/server/0174-Extend-Player-Interact-cancellation.patch diff --git a/patches/server/0174-Tameable-getOwnerUniqueId-API.patch b/patches/server/0175-Tameable-getOwnerUniqueId-API.patch similarity index 100% rename from patches/server/0174-Tameable-getOwnerUniqueId-API.patch rename to patches/server/0175-Tameable-getOwnerUniqueId-API.patch diff --git a/patches/server/0175-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch similarity index 100% rename from patches/server/0175-Toggleable-player-crits-helps-mitigate-hacked-client.patch rename to patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch diff --git a/patches/server/0176-Disable-Explicit-Network-Manager-Flushing.patch b/patches/server/0177-Disable-Explicit-Network-Manager-Flushing.patch similarity index 100% rename from patches/server/0176-Disable-Explicit-Network-Manager-Flushing.patch rename to patches/server/0177-Disable-Explicit-Network-Manager-Flushing.patch diff --git a/patches/server/0177-Implement-extended-PaperServerListPingEvent.patch b/patches/server/0178-Implement-extended-PaperServerListPingEvent.patch similarity index 100% rename from patches/server/0177-Implement-extended-PaperServerListPingEvent.patch rename to patches/server/0178-Implement-extended-PaperServerListPingEvent.patch diff --git a/patches/server/0178-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/patches/server/0179-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch similarity index 100% rename from patches/server/0178-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch rename to patches/server/0179-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch diff --git a/patches/server/0179-Player.setPlayerProfile-API.patch b/patches/server/0180-Player.setPlayerProfile-API.patch similarity index 100% rename from patches/server/0179-Player.setPlayerProfile-API.patch rename to patches/server/0180-Player.setPlayerProfile-API.patch diff --git a/patches/server/0180-getPlayerUniqueId-API.patch b/patches/server/0181-getPlayerUniqueId-API.patch similarity index 94% rename from patches/server/0180-getPlayerUniqueId-API.patch rename to patches/server/0181-getPlayerUniqueId-API.patch index c29d59341..97de22fb6 100644 --- a/patches/server/0180-getPlayerUniqueId-API.patch +++ b/patches/server/0181-getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5d62881b974081d7207773580697c5d6ccdc8880..3f4556e3f8c7665c64d96109030a669a308ba4a9 100644 +index 2a171e67ce018d44c0739e6ee7ae51709daceb21..6681c07f5f59124299263d990cfe7bdf202aef87 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1688,6 +1688,25 @@ public final class CraftServer implements Server { diff --git a/patches/server/0181-Improved-Async-Task-Scheduler.patch b/patches/server/0182-Improved-Async-Task-Scheduler.patch similarity index 100% rename from patches/server/0181-Improved-Async-Task-Scheduler.patch rename to patches/server/0182-Improved-Async-Task-Scheduler.patch diff --git a/patches/server/0182-Upstream-config-migrations.patch b/patches/server/0183-Upstream-config-migrations.patch similarity index 100% rename from patches/server/0182-Upstream-config-migrations.patch rename to patches/server/0183-Upstream-config-migrations.patch diff --git a/patches/server/0183-Make-legacy-ping-handler-more-reliable.patch b/patches/server/0184-Make-legacy-ping-handler-more-reliable.patch similarity index 100% rename from patches/server/0183-Make-legacy-ping-handler-more-reliable.patch rename to patches/server/0184-Make-legacy-ping-handler-more-reliable.patch diff --git a/patches/server/0184-Call-PaperServerListPingEvent-for-legacy-pings.patch b/patches/server/0185-Call-PaperServerListPingEvent-for-legacy-pings.patch similarity index 100% rename from patches/server/0184-Call-PaperServerListPingEvent-for-legacy-pings.patch rename to patches/server/0185-Call-PaperServerListPingEvent-for-legacy-pings.patch diff --git a/patches/server/0185-Flag-to-disable-the-channel-limit.patch b/patches/server/0186-Flag-to-disable-the-channel-limit.patch similarity index 95% rename from patches/server/0185-Flag-to-disable-the-channel-limit.patch rename to patches/server/0186-Flag-to-disable-the-channel-limit.patch index 2afbb6eb3..3f124b16d 100644 --- a/patches/server/0185-Flag-to-disable-the-channel-limit.patch +++ b/patches/server/0186-Flag-to-disable-the-channel-limit.patch @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e976dc1020d50e669d856951354e82977ad3d8ee..de76f01f39c44517487c86133d9914994c1c9d7b 100644 +index b666b1a52d35b2092f8095f7257fd1581f6766d9..5e6ef43ee8875cb09a915a657ec25f63d9480ba3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -168,6 +168,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0186-Add-openSign-method-to-HumanEntity.patch b/patches/server/0187-Add-openSign-method-to-HumanEntity.patch similarity index 100% rename from patches/server/0186-Add-openSign-method-to-HumanEntity.patch rename to patches/server/0187-Add-openSign-method-to-HumanEntity.patch diff --git a/patches/server/0187-Configurable-sprint-interruption-on-attack.patch b/patches/server/0188-Configurable-sprint-interruption-on-attack.patch similarity index 100% rename from patches/server/0187-Configurable-sprint-interruption-on-attack.patch rename to patches/server/0188-Configurable-sprint-interruption-on-attack.patch diff --git a/patches/server/0188-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch similarity index 100% rename from patches/server/0188-Fix-exploit-that-allowed-colored-signs-to-be-created.patch rename to patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch diff --git a/patches/server/0189-EndermanEscapeEvent.patch b/patches/server/0190-EndermanEscapeEvent.patch similarity index 100% rename from patches/server/0189-EndermanEscapeEvent.patch rename to patches/server/0190-EndermanEscapeEvent.patch diff --git a/patches/server/0190-Enderman.teleportRandomly.patch b/patches/server/0191-Enderman.teleportRandomly.patch similarity index 100% rename from patches/server/0190-Enderman.teleportRandomly.patch rename to patches/server/0191-Enderman.teleportRandomly.patch diff --git a/patches/server/0191-Block-Enderpearl-Travel-Exploit.patch b/patches/server/0192-Block-Enderpearl-Travel-Exploit.patch similarity index 100% rename from patches/server/0191-Block-Enderpearl-Travel-Exploit.patch rename to patches/server/0192-Block-Enderpearl-Travel-Exploit.patch diff --git a/patches/server/0192-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0193-Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 100% rename from patches/server/0192-Expand-World.spawnParticle-API-and-add-Builder.patch rename to patches/server/0193-Expand-World.spawnParticle-API-and-add-Builder.patch diff --git a/patches/server/0193-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/patches/server/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch similarity index 100% rename from patches/server/0193-Prevent-Frosted-Ice-from-loading-holding-chunks.patch rename to patches/server/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch diff --git a/patches/server/0194-EndermanAttackPlayerEvent.patch b/patches/server/0195-EndermanAttackPlayerEvent.patch similarity index 100% rename from patches/server/0194-EndermanAttackPlayerEvent.patch rename to patches/server/0195-EndermanAttackPlayerEvent.patch diff --git a/patches/server/0195-WitchConsumePotionEvent.patch b/patches/server/0196-WitchConsumePotionEvent.patch similarity index 100% rename from patches/server/0195-WitchConsumePotionEvent.patch rename to patches/server/0196-WitchConsumePotionEvent.patch diff --git a/patches/server/0196-WitchThrowPotionEvent.patch b/patches/server/0197-WitchThrowPotionEvent.patch similarity index 100% rename from patches/server/0196-WitchThrowPotionEvent.patch rename to patches/server/0197-WitchThrowPotionEvent.patch diff --git a/patches/server/0197-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/patches/server/0198-Allow-spawning-Item-entities-with-World.spawnEntity.patch similarity index 100% rename from patches/server/0197-Allow-spawning-Item-entities-with-World.spawnEntity.patch rename to patches/server/0198-Allow-spawning-Item-entities-with-World.spawnEntity.patch diff --git a/patches/server/0198-WitchReadyPotionEvent.patch b/patches/server/0199-WitchReadyPotionEvent.patch similarity index 100% rename from patches/server/0198-WitchReadyPotionEvent.patch rename to patches/server/0199-WitchReadyPotionEvent.patch diff --git a/patches/server/0199-ItemStack-getMaxItemUseDuration.patch b/patches/server/0200-ItemStack-getMaxItemUseDuration.patch similarity index 100% rename from patches/server/0199-ItemStack-getMaxItemUseDuration.patch rename to patches/server/0200-ItemStack-getMaxItemUseDuration.patch diff --git a/patches/server/0200-Implement-EntityTeleportEndGatewayEvent.patch b/patches/server/0201-Implement-EntityTeleportEndGatewayEvent.patch similarity index 100% rename from patches/server/0200-Implement-EntityTeleportEndGatewayEvent.patch rename to patches/server/0201-Implement-EntityTeleportEndGatewayEvent.patch diff --git a/patches/server/0201-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/patches/server/0202-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch similarity index 100% rename from patches/server/0201-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch rename to patches/server/0202-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch diff --git a/patches/server/0202-Fix-CraftEntity-hashCode.patch b/patches/server/0203-Fix-CraftEntity-hashCode.patch similarity index 100% rename from patches/server/0202-Fix-CraftEntity-hashCode.patch rename to patches/server/0203-Fix-CraftEntity-hashCode.patch diff --git a/patches/server/0203-Configurable-Alternative-LootPool-Luck-Formula.patch b/patches/server/0204-Configurable-Alternative-LootPool-Luck-Formula.patch similarity index 100% rename from patches/server/0203-Configurable-Alternative-LootPool-Luck-Formula.patch rename to patches/server/0204-Configurable-Alternative-LootPool-Luck-Formula.patch diff --git a/patches/server/0204-Print-Error-details-when-failing-to-save-player-data.patch b/patches/server/0205-Print-Error-details-when-failing-to-save-player-data.patch similarity index 100% rename from patches/server/0204-Print-Error-details-when-failing-to-save-player-data.patch rename to patches/server/0205-Print-Error-details-when-failing-to-save-player-data.patch diff --git a/patches/server/0205-Make-shield-blocking-delay-configurable.patch b/patches/server/0206-Make-shield-blocking-delay-configurable.patch similarity index 100% rename from patches/server/0205-Make-shield-blocking-delay-configurable.patch rename to patches/server/0206-Make-shield-blocking-delay-configurable.patch diff --git a/patches/server/0206-Improve-EntityShootBowEvent.patch b/patches/server/0207-Improve-EntityShootBowEvent.patch similarity index 100% rename from patches/server/0206-Improve-EntityShootBowEvent.patch rename to patches/server/0207-Improve-EntityShootBowEvent.patch diff --git a/patches/server/0207-PlayerReadyArrowEvent.patch b/patches/server/0208-PlayerReadyArrowEvent.patch similarity index 100% rename from patches/server/0207-PlayerReadyArrowEvent.patch rename to patches/server/0208-PlayerReadyArrowEvent.patch diff --git a/patches/server/0208-Implement-EntityKnockbackByEntityEvent.patch b/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch similarity index 100% rename from patches/server/0208-Implement-EntityKnockbackByEntityEvent.patch rename to patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch diff --git a/patches/server/0209-Expand-Explosions-API.patch b/patches/server/0210-Expand-Explosions-API.patch similarity index 100% rename from patches/server/0209-Expand-Explosions-API.patch rename to patches/server/0210-Expand-Explosions-API.patch diff --git a/patches/server/0210-LivingEntity-Hand-Raised-Item-Use-API.patch b/patches/server/0211-LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 100% rename from patches/server/0210-LivingEntity-Hand-Raised-Item-Use-API.patch rename to patches/server/0211-LivingEntity-Hand-Raised-Item-Use-API.patch diff --git a/patches/server/0211-RangedEntity-API.patch b/patches/server/0212-RangedEntity-API.patch similarity index 100% rename from patches/server/0211-RangedEntity-API.patch rename to patches/server/0212-RangedEntity-API.patch diff --git a/patches/server/0212-Add-config-to-disable-ender-dragon-legacy-check.patch b/patches/server/0213-Add-config-to-disable-ender-dragon-legacy-check.patch similarity index 100% rename from patches/server/0212-Add-config-to-disable-ender-dragon-legacy-check.patch rename to patches/server/0213-Add-config-to-disable-ender-dragon-legacy-check.patch diff --git a/patches/server/0213-Implement-World.getEntity-UUID-API.patch b/patches/server/0214-Implement-World.getEntity-UUID-API.patch similarity index 100% rename from patches/server/0213-Implement-World.getEntity-UUID-API.patch rename to patches/server/0214-Implement-World.getEntity-UUID-API.patch diff --git a/patches/server/0214-InventoryCloseEvent-Reason-API.patch b/patches/server/0215-InventoryCloseEvent-Reason-API.patch similarity index 98% rename from patches/server/0214-InventoryCloseEvent-Reason-API.patch rename to patches/server/0215-InventoryCloseEvent-Reason-API.patch index 3940ced1f..f41166b92 100644 --- a/patches/server/0214-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0215-InventoryCloseEvent-Reason-API.patch @@ -105,7 +105,7 @@ index 6b96d3e39fb6de4ce1c82eb36c881331d885fec8..c8b729f19ece0eccac953f3344eefb73 this.player.doCloseContainer(); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index a9821199bd953ad5d16ed663f367556b099e999a..50a3148628229a0c10c0982e2540ed655777ba5a 100644 +index fe1636a73f1af09314a200b99c196984d09a4b4a..d35de56c2110c8dcdf6104010f2edb0158b29780 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -506,7 +506,7 @@ public abstract class PlayerList { @@ -174,7 +174,7 @@ index 6c708f65b3a3718c7b53e0c2cc12ee8ad62ff2b9..a6ac2fdcda24ec031d5d2ea9e4492614 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index de76f01f39c44517487c86133d9914994c1c9d7b..1f66387bc95e70ddeaffd2850e8e1d4a93d4ce4f 100644 +index 5e6ef43ee8875cb09a915a657ec25f63d9480ba3..331dd7f22d71719e7598b076246b9dcaffa77562 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1061,7 +1061,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0215-Vex-get-setSummoner-API.patch b/patches/server/0216-Vex-get-setSummoner-API.patch similarity index 100% rename from patches/server/0215-Vex-get-setSummoner-API.patch rename to patches/server/0216-Vex-get-setSummoner-API.patch diff --git a/patches/server/0216-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/patches/server/0217-Refresh-player-inventory-when-cancelling-PlayerInter.patch similarity index 100% rename from patches/server/0216-Refresh-player-inventory-when-cancelling-PlayerInter.patch rename to patches/server/0217-Refresh-player-inventory-when-cancelling-PlayerInter.patch diff --git a/patches/server/0217-Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/patches/server/0218-Avoid-item-merge-if-stack-size-above-max-stack-size.patch similarity index 100% rename from patches/server/0217-Avoid-item-merge-if-stack-size-above-max-stack-size.patch rename to patches/server/0218-Avoid-item-merge-if-stack-size-above-max-stack-size.patch diff --git a/patches/server/0218-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/0219-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch similarity index 100% rename from patches/server/0218-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch rename to patches/server/0219-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch diff --git a/patches/server/0219-add-more-information-to-Entity.toString.patch b/patches/server/0220-add-more-information-to-Entity.toString.patch similarity index 100% rename from patches/server/0219-add-more-information-to-Entity.toString.patch rename to patches/server/0220-add-more-information-to-Entity.toString.patch diff --git a/patches/server/0220-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/patches/server/0221-Add-CraftMagicNumbers.isSupportedApiVersion.patch similarity index 100% rename from patches/server/0220-Add-CraftMagicNumbers.isSupportedApiVersion.patch rename to patches/server/0221-Add-CraftMagicNumbers.isSupportedApiVersion.patch diff --git a/patches/server/0221-EnderDragon-Events.patch b/patches/server/0222-EnderDragon-Events.patch similarity index 100% rename from patches/server/0221-EnderDragon-Events.patch rename to patches/server/0222-EnderDragon-Events.patch diff --git a/patches/server/0222-PlayerElytraBoostEvent.patch b/patches/server/0223-PlayerElytraBoostEvent.patch similarity index 100% rename from patches/server/0222-PlayerElytraBoostEvent.patch rename to patches/server/0223-PlayerElytraBoostEvent.patch diff --git a/patches/server/0223-PlayerLaunchProjectileEvent.patch b/patches/server/0224-PlayerLaunchProjectileEvent.patch similarity index 100% rename from patches/server/0223-PlayerLaunchProjectileEvent.patch rename to patches/server/0224-PlayerLaunchProjectileEvent.patch diff --git a/patches/server/0224-Improve-BlockPosition-inlining.patch b/patches/server/0225-Improve-BlockPosition-inlining.patch similarity index 100% rename from patches/server/0224-Improve-BlockPosition-inlining.patch rename to patches/server/0225-Improve-BlockPosition-inlining.patch diff --git a/patches/server/0225-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0226-Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 100% rename from patches/server/0225-Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to patches/server/0226-Option-to-prevent-armor-stands-from-doing-entity-loo.patch diff --git a/patches/server/0226-Vanished-players-don-t-have-rights.patch b/patches/server/0227-Vanished-players-don-t-have-rights.patch similarity index 100% rename from patches/server/0226-Vanished-players-don-t-have-rights.patch rename to patches/server/0227-Vanished-players-don-t-have-rights.patch diff --git a/patches/server/0227-Allow-disabling-armour-stand-ticking.patch b/patches/server/0228-Allow-disabling-armour-stand-ticking.patch similarity index 100% rename from patches/server/0227-Allow-disabling-armour-stand-ticking.patch rename to patches/server/0228-Allow-disabling-armour-stand-ticking.patch diff --git a/patches/server/0228-SkeletonHorse-Additions.patch b/patches/server/0229-SkeletonHorse-Additions.patch similarity index 100% rename from patches/server/0228-SkeletonHorse-Additions.patch rename to patches/server/0229-SkeletonHorse-Additions.patch diff --git a/patches/server/0229-Don-t-call-getItemMeta-on-hasItemMeta.patch b/patches/server/0230-Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 100% rename from patches/server/0229-Don-t-call-getItemMeta-on-hasItemMeta.patch rename to patches/server/0230-Don-t-call-getItemMeta-on-hasItemMeta.patch diff --git a/patches/server/0230-Implement-Expanded-ArmorStand-API.patch b/patches/server/0231-Implement-Expanded-ArmorStand-API.patch similarity index 100% rename from patches/server/0230-Implement-Expanded-ArmorStand-API.patch rename to patches/server/0231-Implement-Expanded-ArmorStand-API.patch diff --git a/patches/server/0231-AnvilDamageEvent.patch b/patches/server/0232-AnvilDamageEvent.patch similarity index 100% rename from patches/server/0231-AnvilDamageEvent.patch rename to patches/server/0232-AnvilDamageEvent.patch diff --git a/patches/server/0232-Add-hand-to-bucket-events.patch b/patches/server/0233-Add-hand-to-bucket-events.patch similarity index 100% rename from patches/server/0232-Add-hand-to-bucket-events.patch rename to patches/server/0233-Add-hand-to-bucket-events.patch diff --git a/patches/server/0233-Add-TNTPrimeEvent.patch b/patches/server/0234-Add-TNTPrimeEvent.patch similarity index 100% rename from patches/server/0233-Add-TNTPrimeEvent.patch rename to patches/server/0234-Add-TNTPrimeEvent.patch diff --git a/patches/server/0234-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 100% rename from patches/server/0234-Break-up-and-make-tab-spam-limits-configurable.patch rename to patches/server/0235-Break-up-and-make-tab-spam-limits-configurable.patch diff --git a/patches/server/0235-MC-135506-Experience-should-save-as-Integers.patch b/patches/server/0236-MC-135506-Experience-should-save-as-Integers.patch similarity index 100% rename from patches/server/0235-MC-135506-Experience-should-save-as-Integers.patch rename to patches/server/0236-MC-135506-Experience-should-save-as-Integers.patch diff --git a/patches/server/0236-Fix-client-rendering-skulls-from-same-user.patch b/patches/server/0237-Fix-client-rendering-skulls-from-same-user.patch similarity index 100% rename from patches/server/0236-Fix-client-rendering-skulls-from-same-user.patch rename to patches/server/0237-Fix-client-rendering-skulls-from-same-user.patch diff --git a/patches/server/0237-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 100% rename from patches/server/0237-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch diff --git a/patches/server/0238-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 99% rename from patches/server/0238-Add-Early-Warning-Feature-to-WatchDog.patch rename to patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch index 51d4efddb..3efe9c908 100644 --- a/patches/server/0238-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch @@ -48,7 +48,7 @@ index b031d4340dbee22108f8cbc15729337c50160a29..87970a1291b6c01bcb94a87fbbb0877a long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop lastTick = start - TICK_TIME; // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3f4556e3f8c7665c64d96109030a669a308ba4a9..8e52146e5fcdb85a1e5c6f69eafb0adc52e5288d 100644 +index 6681c07f5f59124299263d990cfe7bdf202aef87..907de15edda4f9b1165d985ff6b2c2a8317f06b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -900,6 +900,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0239-Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/0240-Use-ConcurrentHashMap-in-JsonList.patch similarity index 98% rename from patches/server/0239-Use-ConcurrentHashMap-in-JsonList.patch rename to patches/server/0240-Use-ConcurrentHashMap-in-JsonList.patch index c70d73f4e..943880681 100644 --- a/patches/server/0239-Use-ConcurrentHashMap-in-JsonList.patch +++ b/patches/server/0240-Use-ConcurrentHashMap-in-JsonList.patch @@ -23,7 +23,7 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s The point of this is readability, but does have a side-benefit of a small microptimization diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 50a3148628229a0c10c0982e2540ed655777ba5a..838a12ed1ea78dbe82a5fe1e0b1b313ac3b03cf9 100644 +index d35de56c2110c8dcdf6104010f2edb0158b29780..cf3cca43a2eb2a3731112fef37b0ac4a0676ecf5 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -622,7 +622,7 @@ public abstract class PlayerList { diff --git a/patches/server/0240-Use-a-Queue-for-Queueing-Commands.patch b/patches/server/0241-Use-a-Queue-for-Queueing-Commands.patch similarity index 100% rename from patches/server/0240-Use-a-Queue-for-Queueing-Commands.patch rename to patches/server/0241-Use-a-Queue-for-Queueing-Commands.patch diff --git a/patches/server/0241-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/patches/server/0242-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 100% rename from patches/server/0241-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to patches/server/0242-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch diff --git a/patches/server/0242-Optimize-BlockPosition-helper-methods.patch b/patches/server/0243-Optimize-BlockPosition-helper-methods.patch similarity index 100% rename from patches/server/0242-Optimize-BlockPosition-helper-methods.patch rename to patches/server/0243-Optimize-BlockPosition-helper-methods.patch diff --git a/patches/server/0243-Restore-vanilla-default-mob-spawn-range-and-water-an.patch b/patches/server/0244-Restore-vanilla-default-mob-spawn-range-and-water-an.patch similarity index 100% rename from patches/server/0243-Restore-vanilla-default-mob-spawn-range-and-water-an.patch rename to patches/server/0244-Restore-vanilla-default-mob-spawn-range-and-water-an.patch diff --git a/patches/server/0244-Slime-Pathfinder-Events.patch b/patches/server/0245-Slime-Pathfinder-Events.patch similarity index 100% rename from patches/server/0244-Slime-Pathfinder-Events.patch rename to patches/server/0245-Slime-Pathfinder-Events.patch diff --git a/patches/server/0245-Configurable-speed-for-water-flowing-over-lava.patch b/patches/server/0246-Configurable-speed-for-water-flowing-over-lava.patch similarity index 100% rename from patches/server/0245-Configurable-speed-for-water-flowing-over-lava.patch rename to patches/server/0246-Configurable-speed-for-water-flowing-over-lava.patch diff --git a/patches/server/0246-Optimize-CraftBlockData-Creation.patch b/patches/server/0247-Optimize-CraftBlockData-Creation.patch similarity index 100% rename from patches/server/0246-Optimize-CraftBlockData-Creation.patch rename to patches/server/0247-Optimize-CraftBlockData-Creation.patch diff --git a/patches/server/0247-Optimize-MappedRegistry.patch b/patches/server/0248-Optimize-MappedRegistry.patch similarity index 100% rename from patches/server/0247-Optimize-MappedRegistry.patch rename to patches/server/0248-Optimize-MappedRegistry.patch diff --git a/patches/server/0248-Add-PhantomPreSpawnEvent.patch b/patches/server/0249-Add-PhantomPreSpawnEvent.patch similarity index 100% rename from patches/server/0248-Add-PhantomPreSpawnEvent.patch rename to patches/server/0249-Add-PhantomPreSpawnEvent.patch diff --git a/patches/server/0249-Add-More-Creeper-API.patch b/patches/server/0250-Add-More-Creeper-API.patch similarity index 100% rename from patches/server/0249-Add-More-Creeper-API.patch rename to patches/server/0250-Add-More-Creeper-API.patch diff --git a/patches/server/0250-Inventory-removeItemAnySlot.patch b/patches/server/0251-Inventory-removeItemAnySlot.patch similarity index 100% rename from patches/server/0250-Inventory-removeItemAnySlot.patch rename to patches/server/0251-Inventory-removeItemAnySlot.patch diff --git a/patches/server/0251-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/patches/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 100% rename from patches/server/0251-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to patches/server/0252-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch