diff --git a/patches/removed/1.17/0647-Entity-load-save-limit-per-chunk.patch b/patches/removed/1.17/0647-Entity-load-save-limit-per-chunk.patch deleted file mode 100644 index 784088ba5d..0000000000 --- a/patches/removed/1.17/0647-Entity-load-save-limit-per-chunk.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: jmp -Date: Wed, 18 Nov 2020 20:52:25 -0800 -Subject: [PATCH] Entity load/save limit per chunk - -Adds a config option to limit the number of entities saved and loaded -to a chunk. The default values of -1 disable the limit. Although -defaults are only included for certain entites, this allows setting -limits for any entity type. - -1.17: looks like tracking the count on loading should work fine just putting it in the EntityType#loadEntitiesRecursive, but -the tracking count on save needs some more work to implement. - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7ebc85264a2cbfb601dfe5472b561cac1a7cf8bf..486e5438254348db68017228af131cba7defd637 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -7,6 +7,7 @@ import java.util.List; - import java.util.Map; - import java.util.stream.Collectors; - import net.minecraft.world.Difficulty; -+import net.minecraft.world.entity.EntityType; - import net.minecraft.world.entity.monster.Vindicator; - import net.minecraft.world.entity.monster.Zombie; - import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode; -@@ -762,4 +763,18 @@ public class PaperWorldConfig { - Difficulty.class - ); - } -+ -+ public Map, Integer> entityPerChunkSaveLimits = new HashMap<>(); -+ private void entityPerChunkSaveLimits() { -+ getInt("entity-per-chunk-save-limit.experience_orb", -1); -+ getInt("entity-per-chunk-save-limit.snowball", -1); -+ getInt("entity-per-chunk-save-limit.ender_pearl", -1); -+ getInt("entity-per-chunk-save-limit.arrow", -1); -+ EntityType.getEntityNameList().forEach(name -> { -+ final EntityType type = EntityType.getByName(name.getPath()).orElseThrow(() -> new IllegalStateException("Unknown Entity Type: " + name.toString())); -+ final String path = ".entity-per-chunk-save-limit." + name.getPath(); -+ final int value = config.getInt("world-settings." + worldName + path, config.getInt("world-settings.default" + path, -1)); // get without setting defaults -+ if (value != -1) entityPerChunkSaveLimits.put(type, value); -+ }); -+ } - } -diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index f6a814f9305813eaafa56baa0327e0111cd4e38c..30f80f8549c3236d6bfe594e323e4ca6e702005d 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -@@ -539,11 +539,22 @@ public class ChunkSerializer { - - chunk.setLastSaveHadEntities(false); - -+ // Paper start -+ final Map, Integer> savedEntityCounts = Maps.newHashMap(); - for (int j = 0; j < chunk.getEntitySlices().length; ++j) { - Iterator iterator1 = chunk.getEntitySlices()[j].iterator(); - - while (iterator1.hasNext()) { - Entity entity = (Entity) iterator1.next(); -+ final EntityType entityType = entity.getType(); -+ final int saveLimit = worldserver.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1); -+ if (saveLimit > -1) { -+ if (savedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) { -+ continue; -+ } -+ savedEntityCounts.merge(entityType, 1, Integer::sum); -+ } -+ // Paper end - CompoundTag nbttagcompound4 = new CompoundTag(); - // Paper start - if (asyncsavedata == null && !entity.removed && (int) Math.floor(entity.getX()) >> 4 != chunk.getPos().x || (int) Math.floor(entity.getZ()) >> 4 != chunk.getPos().z) { -@@ -674,10 +685,21 @@ public class ChunkSerializer { - ListTag nbttaglist = tag.getList("Entities", 10); - Level world = chunk.getLevel(); - -+ // Paper start -+ final Map, Integer> loadedEntityCounts = Maps.newHashMap(); - for (int i = 0; i < nbttaglist.size(); ++i) { - CompoundTag nbttagcompound1 = nbttaglist.getCompound(i); - - EntityType.loadEntityRecursive(nbttagcompound1, world, (entity) -> { -+ final EntityType entityType = entity.getType(); -+ final int saveLimit = world.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1); -+ if (saveLimit > -1) { -+ if (loadedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) { -+ return null; -+ } -+ loadedEntityCounts.merge(entityType, 1, Integer::sum); -+ } -+ // Paper end - chunk.addEntity(entity); - return entity; - }); diff --git a/patches/server/0647-Entity-load-save-limit-per-chunk.patch b/patches/server/0647-Entity-load-save-limit-per-chunk.patch new file mode 100644 index 0000000000..5fe41929a7 --- /dev/null +++ b/patches/server/0647-Entity-load-save-limit-per-chunk.patch @@ -0,0 +1,96 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: jmp +Date: Wed, 18 Nov 2020 20:52:25 -0800 +Subject: [PATCH] Entity load/save limit per chunk + +Adds a config option to limit the number of entities saved and loaded +to a chunk. The default values of -1 disable the limit. Although +defaults are only included for certain entites, this allows setting +limits for any entity type. + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 79687b8add9e4768d2c9aa1efdad7cc9736ef22c..54c74b8d3056e512b4a8c1760c45a33ab7a6f4a9 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -1,9 +1,12 @@ + package com.destroystokyo.paper; + + import java.util.Arrays; ++import java.util.HashMap; + import java.util.List; ++import java.util.Map; + import java.util.stream.Collectors; + import net.minecraft.world.Difficulty; ++import net.minecraft.world.entity.EntityType; + import net.minecraft.world.entity.monster.Vindicator; + import net.minecraft.world.entity.monster.Zombie; + import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode; +@@ -123,6 +126,20 @@ public class PaperWorldConfig { + ); + } + ++ public Map, Integer> entityPerChunkSaveLimits = new HashMap<>(); ++ private void entityPerChunkSaveLimits() { ++ getInt("entity-per-chunk-save-limit.experience_orb", -1); ++ getInt("entity-per-chunk-save-limit.snowball", -1); ++ getInt("entity-per-chunk-save-limit.ender_pearl", -1); ++ getInt("entity-per-chunk-save-limit.arrow", -1); ++ EntityType.getEntityNameList().forEach(name -> { ++ final EntityType type = EntityType.getByName(name.getPath()).orElseThrow(() -> new IllegalStateException("Unknown Entity Type: " + name.toString())); ++ final String path = ".entity-per-chunk-save-limit." + name.getPath(); ++ final int value = config.getInt("world-settings." + worldName + path, config.getInt("world-settings.default" + path, -1)); // get without setting defaults ++ if (value != -1) entityPerChunkSaveLimits.put(type, value); ++ }); ++ } ++ + public short keepLoadedRange; + private void keepLoadedRange() { + keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); +diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java +index 536d979139326191d1199e93e9fc885164766aec..c7f50d45b3a0a238e41e5a024cd4dec08e07c8b4 100644 +--- a/src/main/java/net/minecraft/world/entity/EntityType.java ++++ b/src/main/java/net/minecraft/world/entity/EntityType.java +@@ -561,9 +561,20 @@ public class EntityType implements EntityTypeTest { + final Spliterator spliterator = entityNbtList.spliterator(); + + return StreamSupport.stream(new Spliterator() { ++ final Map, Integer> loadedEntityCounts = new java.util.HashMap<>(); // Paper + public boolean tryAdvance(Consumer consumer) { + return spliterator.tryAdvance((nbtbase) -> { + EntityType.loadEntityRecursive((CompoundTag) nbtbase, world, (entity) -> { ++ // Paper start ++ final EntityType entityType = entity.getType(); ++ final int saveLimit = world.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1); ++ if (saveLimit > -1) { ++ if (this.loadedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) { ++ return null; ++ } ++ this.loadedEntityCounts.merge(entityType, 1, Integer::sum); ++ } ++ // Paper end + consumer.accept(entity); + return entity; + }); +diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java +index 6204c6c9cf2cb620e41105889807f85438bd006c..572a013445bd83d366cce27d0e015ba8271df7e0 100644 +--- a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java ++++ b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java +@@ -89,7 +89,18 @@ public class EntityStorage implements EntityPersistentStorage { + + } else { + ListTag listTag = new ListTag(); ++ final java.util.Map, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper + dataList.getEntities().forEach((entity) -> { ++ // Paper start ++ final EntityType entityType = entity.getType(); ++ final int saveLimit = this.level.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1); ++ if (saveLimit > -1) { ++ if (savedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) { ++ return; ++ } ++ savedEntityCounts.merge(entityType, 1, Integer::sum); ++ } ++ // Paper end + CompoundTag compoundTag = new CompoundTag(); + if (entity.save(compoundTag)) { + listTag.add(compoundTag); diff --git a/patches/server/0647-fix-cancelling-block-falling-causing-client-desync.patch b/patches/server/0648-fix-cancelling-block-falling-causing-client-desync.patch similarity index 100% rename from patches/server/0647-fix-cancelling-block-falling-causing-client-desync.patch rename to patches/server/0648-fix-cancelling-block-falling-causing-client-desync.patch diff --git a/patches/server/0648-Expose-protocol-version.patch b/patches/server/0649-Expose-protocol-version.patch similarity index 100% rename from patches/server/0648-Expose-protocol-version.patch rename to patches/server/0649-Expose-protocol-version.patch diff --git a/patches/server/0649-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch b/patches/server/0650-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch similarity index 100% rename from patches/server/0649-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch rename to patches/server/0650-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch diff --git a/patches/server/0650-Enhance-console-tab-completions-for-brigadier-comman.patch b/patches/server/0651-Enhance-console-tab-completions-for-brigadier-comman.patch similarity index 100% rename from patches/server/0650-Enhance-console-tab-completions-for-brigadier-comman.patch rename to patches/server/0651-Enhance-console-tab-completions-for-brigadier-comman.patch diff --git a/patches/server/0651-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/0652-Fix-PlayerItemConsumeEvent-cancelling-properly.patch similarity index 100% rename from patches/server/0651-Fix-PlayerItemConsumeEvent-cancelling-properly.patch rename to patches/server/0652-Fix-PlayerItemConsumeEvent-cancelling-properly.patch diff --git a/patches/server/0652-Add-bypass-host-check.patch b/patches/server/0653-Add-bypass-host-check.patch similarity index 100% rename from patches/server/0652-Add-bypass-host-check.patch rename to patches/server/0653-Add-bypass-host-check.patch diff --git a/patches/server/0653-Set-area-affect-cloud-rotation.patch b/patches/server/0654-Set-area-affect-cloud-rotation.patch similarity index 100% rename from patches/server/0653-Set-area-affect-cloud-rotation.patch rename to patches/server/0654-Set-area-affect-cloud-rotation.patch diff --git a/patches/server/0654-add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/0655-add-isDeeplySleeping-to-HumanEntity.patch similarity index 100% rename from patches/server/0654-add-isDeeplySleeping-to-HumanEntity.patch rename to patches/server/0655-add-isDeeplySleeping-to-HumanEntity.patch diff --git a/patches/server/0655-Fix-duplicating-give-items-on-item-drop-cancel.patch b/patches/server/0656-Fix-duplicating-give-items-on-item-drop-cancel.patch similarity index 100% rename from patches/server/0655-Fix-duplicating-give-items-on-item-drop-cancel.patch rename to patches/server/0656-Fix-duplicating-give-items-on-item-drop-cancel.patch diff --git a/patches/server/0656-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/server/0657-add-consumeFuel-to-FurnaceBurnEvent.patch similarity index 100% rename from patches/server/0656-add-consumeFuel-to-FurnaceBurnEvent.patch rename to patches/server/0657-add-consumeFuel-to-FurnaceBurnEvent.patch diff --git a/patches/server/0657-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/server/0658-add-get-set-drop-chance-to-EntityEquipment.patch similarity index 100% rename from patches/server/0657-add-get-set-drop-chance-to-EntityEquipment.patch rename to patches/server/0658-add-get-set-drop-chance-to-EntityEquipment.patch diff --git a/patches/server/0658-fix-PigZombieAngerEvent-cancellation.patch b/patches/server/0659-fix-PigZombieAngerEvent-cancellation.patch similarity index 100% rename from patches/server/0658-fix-PigZombieAngerEvent-cancellation.patch rename to patches/server/0659-fix-PigZombieAngerEvent-cancellation.patch diff --git a/patches/server/0659-Fix-checkReach-check-for-Shulker-boxes.patch b/patches/server/0660-Fix-checkReach-check-for-Shulker-boxes.patch similarity index 100% rename from patches/server/0659-Fix-checkReach-check-for-Shulker-boxes.patch rename to patches/server/0660-Fix-checkReach-check-for-Shulker-boxes.patch diff --git a/patches/server/0660-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0661-fix-PlayerItemHeldEvent-firing-twice.patch similarity index 100% rename from patches/server/0660-fix-PlayerItemHeldEvent-firing-twice.patch rename to patches/server/0661-fix-PlayerItemHeldEvent-firing-twice.patch diff --git a/patches/server/0661-Added-PlayerDeepSleepEvent.patch b/patches/server/0662-Added-PlayerDeepSleepEvent.patch similarity index 100% rename from patches/server/0661-Added-PlayerDeepSleepEvent.patch rename to patches/server/0662-Added-PlayerDeepSleepEvent.patch diff --git a/patches/server/0662-More-World-API.patch b/patches/server/0663-More-World-API.patch similarity index 100% rename from patches/server/0662-More-World-API.patch rename to patches/server/0663-More-World-API.patch diff --git a/patches/server/0663-Added-PlayerBedFailEnterEvent.patch b/patches/server/0664-Added-PlayerBedFailEnterEvent.patch similarity index 100% rename from patches/server/0663-Added-PlayerBedFailEnterEvent.patch rename to patches/server/0664-Added-PlayerBedFailEnterEvent.patch diff --git a/patches/server/0664-Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/0665-Implement-methods-to-convert-between-Component-and-B.patch similarity index 100% rename from patches/server/0664-Implement-methods-to-convert-between-Component-and-B.patch rename to patches/server/0665-Implement-methods-to-convert-between-Component-and-B.patch diff --git a/patches/server/0665-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0666-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch similarity index 100% rename from patches/server/0665-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch rename to patches/server/0666-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch diff --git a/patches/server/0666-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0667-Introduce-beacon-activation-deactivation-events.patch similarity index 100% rename from patches/server/0666-Introduce-beacon-activation-deactivation-events.patch rename to patches/server/0667-Introduce-beacon-activation-deactivation-events.patch diff --git a/patches/server/0667-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0668-add-RespawnFlags-to-PlayerRespawnEvent.patch similarity index 100% rename from patches/server/0667-add-RespawnFlags-to-PlayerRespawnEvent.patch rename to patches/server/0668-add-RespawnFlags-to-PlayerRespawnEvent.patch diff --git a/patches/server/0668-Add-Channel-initialization-listeners.patch b/patches/server/0669-Add-Channel-initialization-listeners.patch similarity index 100% rename from patches/server/0668-Add-Channel-initialization-listeners.patch rename to patches/server/0669-Add-Channel-initialization-listeners.patch diff --git a/patches/server/0669-Send-empty-commands-if-tab-completion-is-disabled.patch b/patches/server/0670-Send-empty-commands-if-tab-completion-is-disabled.patch similarity index 100% rename from patches/server/0669-Send-empty-commands-if-tab-completion-is-disabled.patch rename to patches/server/0670-Send-empty-commands-if-tab-completion-is-disabled.patch diff --git a/patches/server/0670-Add-more-WanderingTrader-API.patch b/patches/server/0671-Add-more-WanderingTrader-API.patch similarity index 100% rename from patches/server/0670-Add-more-WanderingTrader-API.patch rename to patches/server/0671-Add-more-WanderingTrader-API.patch diff --git a/patches/server/0671-Add-EntityBlockStorage-clearEntities.patch b/patches/server/0672-Add-EntityBlockStorage-clearEntities.patch similarity index 100% rename from patches/server/0671-Add-EntityBlockStorage-clearEntities.patch rename to patches/server/0672-Add-EntityBlockStorage-clearEntities.patch diff --git a/patches/server/0672-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/server/0673-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch similarity index 100% rename from patches/server/0672-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch rename to patches/server/0673-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch diff --git a/patches/server/0673-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0674-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch similarity index 100% rename from patches/server/0673-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/0674-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch diff --git a/patches/server/0674-Inventory-close.patch b/patches/server/0675-Inventory-close.patch similarity index 100% rename from patches/server/0674-Inventory-close.patch rename to patches/server/0675-Inventory-close.patch diff --git a/patches/server/0675-call-PortalCreateEvent-players-and-end-platform.patch b/patches/server/0676-call-PortalCreateEvent-players-and-end-platform.patch similarity index 92% rename from patches/server/0675-call-PortalCreateEvent-players-and-end-platform.patch rename to patches/server/0676-call-PortalCreateEvent-players-and-end-platform.patch index eb541c0ee2..1e9b5dd549 100644 --- a/patches/server/0675-call-PortalCreateEvent-players-and-end-platform.patch +++ b/patches/server/0676-call-PortalCreateEvent-players-and-end-platform.patch @@ -5,7 +5,7 @@ Subject: [PATCH] call PortalCreateEvent players and end platform diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java -index 8f0cf4297015f3cbe709e2eb82280cac72489925..22ea0da3836b61bb018ae974d2b8c7546b9528d6 100644 +index b98316165c6d10945ccc9e5e0c3f0be9cfc3e889..84eca485a09c6d147f3baa277e398de58a9dc147 100644 --- a/src/main/java/net/minecraft/core/BlockPos.java +++ b/src/main/java/net/minecraft/core/BlockPos.java @@ -523,6 +523,7 @@ public class BlockPos extends Vec3i { @@ -17,7 +17,7 @@ index 8f0cf4297015f3cbe709e2eb82280cac72489925..22ea0da3836b61bb018ae974d2b8c754 return this.set(this.getX() + dx, this.getY() + dy, this.getZ() + dz); } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 2fa2ba45fa1d79d9c78d80cca2aeebedad5a9ba0..b131e307056f04be14917ab92b1688b4fa2832cd 100644 +index 654befb6433647c701ef7966fd37baea3c2ba39b..57e2a6af2bc9e08797e3d06262d4af4bd156f34b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1167,15 +1167,21 @@ public class ServerPlayer extends Player { diff --git a/patches/server/0676-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/0677-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch similarity index 98% rename from patches/server/0676-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch rename to patches/server/0677-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch index 4330fb3781..7a0c9f8eb4 100644 --- a/patches/server/0676-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch +++ b/patches/server/0677-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch @@ -44,7 +44,7 @@ index 6b4163f5601a0961055c8451ec7ef2204938cf69..c54a37516ef1d8a76f7161917bf44812 @Override public void setItemSlot(EquipmentSlot slot, ItemStack stack) { diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java -index 2257391ad42219efda0b6a11f1ca0f66e377e412..1ffe939bb66358391d92d3e5378865b1cc8690fd 100644 +index 6dbf806b5984ae16e747dce350c7cffcf0b190ad..f17ed24cee2ac9a9ba5d9a02c1cf8c92ee7fe8db 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java @@ -145,7 +145,7 @@ public class Phantom extends FlyingMob implements Enemy { diff --git a/patches/server/0677-Fix-CraftPotionBrewer-cache.patch b/patches/server/0678-Fix-CraftPotionBrewer-cache.patch similarity index 100% rename from patches/server/0677-Fix-CraftPotionBrewer-cache.patch rename to patches/server/0678-Fix-CraftPotionBrewer-cache.patch diff --git a/patches/server/0678-Add-basic-Datapack-API.patch b/patches/server/0679-Add-basic-Datapack-API.patch similarity index 100% rename from patches/server/0678-Add-basic-Datapack-API.patch rename to patches/server/0679-Add-basic-Datapack-API.patch diff --git a/patches/server/0679-Add-environment-variable-to-disable-server-gui.patch b/patches/server/0680-Add-environment-variable-to-disable-server-gui.patch similarity index 100% rename from patches/server/0679-Add-environment-variable-to-disable-server-gui.patch rename to patches/server/0680-Add-environment-variable-to-disable-server-gui.patch diff --git a/patches/server/0680-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0681-additions-to-PlayerGameModeChangeEvent.patch similarity index 97% rename from patches/server/0680-additions-to-PlayerGameModeChangeEvent.patch rename to patches/server/0681-additions-to-PlayerGameModeChangeEvent.patch index ace243298e..d46dddee41 100644 --- a/patches/server/0680-additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/0681-additions-to-PlayerGameModeChangeEvent.patch @@ -45,7 +45,7 @@ index d75f78d2e3fb1376e8f6a8668c98a04a693c99e1..79f6089b934124c3309c6bee2e48b36b } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index b131e307056f04be14917ab92b1688b4fa2832cd..b4055c6de62c22ba8ee8384884f9b3fd62eddeb8 100644 +index 57e2a6af2bc9e08797e3d06262d4af4bd156f34b..5d3269c6912a23aef26d5b155c04c2cd567cefba 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1784,8 +1784,15 @@ public class ServerPlayer extends Player { @@ -136,7 +136,7 @@ index 0b2cb820b912ddb6366f7ffb79c71047d03f2001..52294f5cfce86faf301c835bf1a9c2a5 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ee40e03704bb8c6b3aa990542fc852058d00f081..0329a727b71e56195a55c69edfd3502fb322e572 100644 +index e5a2fcd390ab5b41d7e482d486cef42a9eef94f5..6e3bebdb7667bfd39c608412b55f7ec7732e1f7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1249,7 +1249,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0681-Clear-SyncLoadInfo.patch b/patches/server/0682-Clear-SyncLoadInfo.patch similarity index 100% rename from patches/server/0681-Clear-SyncLoadInfo.patch rename to patches/server/0682-Clear-SyncLoadInfo.patch diff --git a/patches/server/0682-ItemStack-repair-check-API.patch b/patches/server/0683-ItemStack-repair-check-API.patch similarity index 100% rename from patches/server/0682-ItemStack-repair-check-API.patch rename to patches/server/0683-ItemStack-repair-check-API.patch diff --git a/patches/server/0683-More-Enchantment-API.patch b/patches/server/0684-More-Enchantment-API.patch similarity index 100% rename from patches/server/0683-More-Enchantment-API.patch rename to patches/server/0684-More-Enchantment-API.patch diff --git a/patches/server/0684-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/0685-Add-command-line-option-to-load-extra-plugin-jars-no.patch similarity index 100% rename from patches/server/0684-Add-command-line-option-to-load-extra-plugin-jars-no.patch rename to patches/server/0685-Add-command-line-option-to-load-extra-plugin-jars-no.patch diff --git a/patches/server/0685-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0686-Fix-and-optimise-world-force-upgrading.patch similarity index 99% rename from patches/server/0685-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/0686-Fix-and-optimise-world-force-upgrading.patch index de71eaee1b..5c60318d59 100644 --- a/patches/server/0685-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/0686-Fix-and-optimise-world-force-upgrading.patch @@ -263,7 +263,7 @@ index cf0a74b8a1c31d4bc493eb09a69ee2bd94cb6485..6fa1a7da70896d0ff34d38698769195a Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, worlds, eraseCache); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8ab99b04ef3e85b64ea78680aa85df1a0894399f..43f9143e892111aa9901454b3de7b57945ecb707 100644 +index c567d8a80fb9caca186bd4c4a7f5199a3eb6f494..c582610142e9f8568c330c7c804926b9ccdaec09 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -562,13 +562,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements PaletteResize { diff --git a/patches/server/0698-Add-option-to-fix-items-merging-through-walls.patch b/patches/server/0699-Add-option-to-fix-items-merging-through-walls.patch similarity index 93% rename from patches/server/0698-Add-option-to-fix-items-merging-through-walls.patch rename to patches/server/0699-Add-option-to-fix-items-merging-through-walls.patch index ea7f105268..36c4605de8 100644 --- a/patches/server/0698-Add-option-to-fix-items-merging-through-walls.patch +++ b/patches/server/0699-Add-option-to-fix-items-merging-through-walls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to fix items merging through walls diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4a5dd2527fce021e7d69d7509c3abfe39deab235..1ee76ca0df91a7d23882d8647539c5135593410c 100644 +index cc0946050383d00f1f46f16a5bc9236606bee638..a132f4a5dddf2c895712e5393dfe3d6d1656b6d1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -765,5 +765,10 @@ public class PaperWorldConfig { +@@ -782,5 +782,10 @@ public class PaperWorldConfig { private void mapItemFrameCursorLimit() { mapItemFrameCursorLimit = getInt("map-item-frame-cursor-limit", mapItemFrameCursorLimit); } diff --git a/patches/server/0699-Add-BellRevealRaiderEvent.patch b/patches/server/0700-Add-BellRevealRaiderEvent.patch similarity index 100% rename from patches/server/0699-Add-BellRevealRaiderEvent.patch rename to patches/server/0700-Add-BellRevealRaiderEvent.patch diff --git a/patches/server/0700-Fix-invulnerable-end-crystals.patch b/patches/server/0701-Fix-invulnerable-end-crystals.patch similarity index 96% rename from patches/server/0700-Fix-invulnerable-end-crystals.patch rename to patches/server/0701-Fix-invulnerable-end-crystals.patch index 3d27ccc916..299094a5fc 100644 --- a/patches/server/0700-Fix-invulnerable-end-crystals.patch +++ b/patches/server/0701-Fix-invulnerable-end-crystals.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix invulnerable end crystals MC-108513 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1ee76ca0df91a7d23882d8647539c5135593410c..9974151e3bcc7db9acf3f6adacb68331f6085824 100644 +index a132f4a5dddf2c895712e5393dfe3d6d1656b6d1..37d438d131bd66c46a650a48c70af1fde5665fc7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -770,5 +770,10 @@ public class PaperWorldConfig { +@@ -787,5 +787,10 @@ public class PaperWorldConfig { private void fixItemsMergingThroughWalls() { fixItemsMergingThroughWalls = getBoolean("fix-items-merging-through-walls", fixItemsMergingThroughWalls); } diff --git a/patches/server/0701-Add-ElderGuardianAppearanceEvent.patch b/patches/server/0702-Add-ElderGuardianAppearanceEvent.patch similarity index 100% rename from patches/server/0701-Add-ElderGuardianAppearanceEvent.patch rename to patches/server/0702-Add-ElderGuardianAppearanceEvent.patch diff --git a/patches/server/0702-Reset-villager-inventory-on-cancelled-pickup-event.patch b/patches/server/0703-Reset-villager-inventory-on-cancelled-pickup-event.patch similarity index 100% rename from patches/server/0702-Reset-villager-inventory-on-cancelled-pickup-event.patch rename to patches/server/0703-Reset-villager-inventory-on-cancelled-pickup-event.patch diff --git a/patches/server/0703-Fix-dangerous-end-portal-logic.patch b/patches/server/0704-Fix-dangerous-end-portal-logic.patch similarity index 97% rename from patches/server/0703-Fix-dangerous-end-portal-logic.patch rename to patches/server/0704-Fix-dangerous-end-portal-logic.patch index 3bdefebafa..72f9d5461b 100644 --- a/patches/server/0703-Fix-dangerous-end-portal-logic.patch +++ b/patches/server/0704-Fix-dangerous-end-portal-logic.patch @@ -11,7 +11,7 @@ Move the tick logic into the post tick, where portaling was designed to happen in the first place. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 8c5bf69b89822c8211d472ba3b4b809fa436948a..aaaf5d49972ab608473637dc884dd0c802deaae0 100644 +index 2c25e5ca42a700e1be52781f605a1583df249b85..cfab75b70b4cf4c95f3a7971c78f6dc42c0d23d0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -361,6 +361,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n diff --git a/patches/server/0704-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/patches/server/0705-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 100% rename from patches/server/0704-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to patches/server/0705-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch diff --git a/patches/server/0705-Make-item-validations-configurable.patch b/patches/server/0706-Make-item-validations-configurable.patch similarity index 100% rename from patches/server/0705-Make-item-validations-configurable.patch rename to patches/server/0706-Make-item-validations-configurable.patch diff --git a/patches/server/0706-Add-more-line-of-sight-methods.patch b/patches/server/0707-Add-more-line-of-sight-methods.patch similarity index 100% rename from patches/server/0706-Add-more-line-of-sight-methods.patch rename to patches/server/0707-Add-more-line-of-sight-methods.patch diff --git a/patches/server/0707-add-per-world-spawn-limits.patch b/patches/server/0708-add-per-world-spawn-limits.patch similarity index 94% rename from patches/server/0707-add-per-world-spawn-limits.patch rename to patches/server/0708-add-per-world-spawn-limits.patch index 0f1dd93b1b..a258214674 100644 --- a/patches/server/0707-add-per-world-spawn-limits.patch +++ b/patches/server/0708-add-per-world-spawn-limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] add per world spawn limits Taken from #2982. Credit to Chasewhip8 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9974151e3bcc7db9acf3f6adacb68331f6085824..913b0a9b5a31aba4e28e1fe15d5d58b4c8edfc3c 100644 +index 37d438d131bd66c46a650a48c70af1fde5665fc7..b252fc8b88d380feede31f7bc3cca24b4452478b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -626,6 +626,19 @@ public class PaperWorldConfig { +@@ -643,6 +643,19 @@ public class PaperWorldConfig { zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); } diff --git a/patches/server/0708-Fix-PotionSplashEvent-for-water-splash-potions.patch b/patches/server/0709-Fix-PotionSplashEvent-for-water-splash-potions.patch similarity index 100% rename from patches/server/0708-Fix-PotionSplashEvent-for-water-splash-potions.patch rename to patches/server/0709-Fix-PotionSplashEvent-for-water-splash-potions.patch diff --git a/patches/server/0709-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch b/patches/server/0710-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch similarity index 99% rename from patches/server/0709-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch rename to patches/server/0710-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch index a09b97be3d..096c6fb001 100644 --- a/patches/server/0709-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch +++ b/patches/server/0710-Fix-incorrect-status-dataconverter-for-pre-1.13-chun.patch @@ -34,8 +34,6 @@ This should fix some problems converting old data, as the changes here are going to prevent the chunk from being regenerated incorrectly. -SPOTTEDLEAF!!!!!!!!!!! - diff --git a/src/main/java/net/minecraft/util/datafix/fixes/ChunkToProtochunkFix.java b/src/main/java/net/minecraft/util/datafix/fixes/ChunkToProtochunkFix.java index 081bcae48ae34d8354635ea57952f09f14f7fa7a..a4305f58f793e1577de5e13132381ce81304cae4 100644 --- a/src/main/java/net/minecraft/util/datafix/fixes/ChunkToProtochunkFix.java