From f371b4e3745852359b2944684fcfd4cb45f74a4c Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 7 Jun 2022 21:06:41 -0700 Subject: [PATCH] <3 jmp --- ...ement-alternative-item-despawn-rate.patch} | 12 ++--- .../0356-Tracking-Range-Improvements.patch} | 4 +- ...-items-vanishing-through-end-portal.patch} | 4 +- ...ment-optional-per-player-mob-spawns.patch} | 50 +++++++++---------- ...pper-searches-if-there-are-no-items.patch} | 8 +-- ...et-gravity-in-void.-Fixes-MC-167279.patch} | 4 +- ...-getChunkAt-calls-for-loaded-chunks.patch} | 6 +-- ...0362-Add-debug-for-sync-chunk-loads.patch} | 8 +-- ...3-Remove-garbage-Java-version-check.patch} | 2 +- .../0364-Add-ThrownEggHatchEvent.patch} | 0 .../0365-Entity-Jump-API.patch} | 6 +-- ...-to-nerf-pigmen-from-nether-portals.patch} | 10 ++-- .../0367-Make-the-GUI-graph-fancier.patch} | 0 ...68-add-hand-to-BlockMultiPlaceEvent.patch} | 0 ...ipwire-hook-placement-before-update.patch} | 6 +-- ...o-allow-iron-golems-to-spawn-in-air.patch} | 4 +- ...chance-of-villager-zombie-infection.patch} | 15 +++--- .../0372-Optimise-Chunk-getFluid.patch} | 10 ++-- ...rbose-world-setting-to-false-by-def.patch} | 0 ...Add-tick-times-API-and-mspt-command.patch} | 17 ++++--- ...75-Expose-MinecraftServer-isRunning.patch} | 4 +- ...dd-Raw-Byte-ItemStack-Serialization.patch} | 2 +- 22 files changed, 86 insertions(+), 86 deletions(-) rename patches/{unapplied/server/0357-Implement-alternative-item-despawn-rate.patch => server/0355-Implement-alternative-item-despawn-rate.patch} (94%) rename patches/{unapplied/server/0358-Tracking-Range-Improvements.patch => server/0356-Tracking-Range-Improvements.patch} (95%) rename patches/{unapplied/server/0359-Fix-items-vanishing-through-end-portal.patch => server/0357-Fix-items-vanishing-through-end-portal.patch} (89%) rename patches/{unapplied/server/0360-implement-optional-per-player-mob-spawns.patch => server/0358-implement-optional-per-player-mob-spawns.patch} (94%) rename patches/{unapplied/server/0361-Avoid-hopper-searches-if-there-are-no-items.patch => server/0359-Avoid-hopper-searches-if-there-are-no-items.patch} (94%) rename patches/{unapplied/server/0362-Bees-get-gravity-in-void.-Fixes-MC-167279.patch => server/0360-Bees-get-gravity-in-void.-Fixes-MC-167279.patch} (91%) rename patches/{unapplied/server/0363-Optimise-getChunkAt-calls-for-loaded-chunks.patch => server/0361-Optimise-getChunkAt-calls-for-loaded-chunks.patch} (92%) rename patches/{unapplied/server/0364-Add-debug-for-sync-chunk-loads.patch => server/0362-Add-debug-for-sync-chunk-loads.patch} (97%) rename patches/{unapplied/server/0365-Remove-garbage-Java-version-check.patch => server/0363-Remove-garbage-Java-version-check.patch} (91%) rename patches/{unapplied/server/0366-Add-ThrownEggHatchEvent.patch => server/0364-Add-ThrownEggHatchEvent.patch} (100%) rename patches/{unapplied/server/0367-Entity-Jump-API.patch => server/0365-Entity-Jump-API.patch} (92%) rename patches/{unapplied/server/0368-Add-option-to-nerf-pigmen-from-nether-portals.patch => server/0366-Add-option-to-nerf-pigmen-from-nether-portals.patch} (89%) rename patches/{unapplied/server/0369-Make-the-GUI-graph-fancier.patch => server/0367-Make-the-GUI-graph-fancier.patch} (100%) rename patches/{unapplied/server/0370-add-hand-to-BlockMultiPlaceEvent.patch => server/0368-add-hand-to-BlockMultiPlaceEvent.patch} (100%) rename patches/{unapplied/server/0371-Validate-tripwire-hook-placement-before-update.patch => server/0369-Validate-tripwire-hook-placement-before-update.patch} (79%) rename patches/{unapplied/server/0372-Add-option-to-allow-iron-golems-to-spawn-in-air.patch => server/0370-Add-option-to-allow-iron-golems-to-spawn-in-air.patch} (92%) rename patches/{unapplied/server/0373-Configurable-chance-of-villager-zombie-infection.patch => server/0371-Configurable-chance-of-villager-zombie-infection.patch} (87%) rename patches/{unapplied/server/0374-Optimise-Chunk-getFluid.patch => server/0372-Optimise-Chunk-getFluid.patch} (87%) rename patches/{unapplied/server/0375-Set-spigots-verbose-world-setting-to-false-by-def.patch => server/0373-Set-spigots-verbose-world-setting-to-false-by-def.patch} (100%) rename patches/{unapplied/server/0376-Add-tick-times-API-and-mspt-command.patch => server/0374-Add-tick-times-API-and-mspt-command.patch} (92%) rename patches/{unapplied/server/0377-Expose-MinecraftServer-isRunning.patch => server/0375-Expose-MinecraftServer-isRunning.patch} (83%) rename patches/{unapplied/server/0378-Add-Raw-Byte-ItemStack-Serialization.patch => server/0376-Add-Raw-Byte-ItemStack-Serialization.patch} (96%) diff --git a/patches/unapplied/server/0357-Implement-alternative-item-despawn-rate.patch b/patches/server/0355-Implement-alternative-item-despawn-rate.patch similarity index 94% rename from patches/unapplied/server/0357-Implement-alternative-item-despawn-rate.patch rename to patches/server/0355-Implement-alternative-item-despawn-rate.patch index 7bc359fed..b481d30f3 100644 --- a/patches/unapplied/server/0357-Implement-alternative-item-despawn-rate.patch +++ b/patches/server/0355-Implement-alternative-item-despawn-rate.patch @@ -86,7 +86,7 @@ index 9e1db210ded0830d0dcfaa34936e66bbf51fc1fc..5918a319d34f8f30cce2f458dd061d83 + } +} diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 4e9e0ef895c29cfc1e925c0c3ffead23c4e4dc0a..b56d1229333bb86433d6691f1116f2d195c4b16b 100644 +index 85fc33183ff01611bfa90ddd33a9c885d1dd7172..3364316079dba81778869380b70e621cb9ac6269 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java @@ -54,6 +54,7 @@ public class ItemEntity extends Entity { @@ -97,7 +97,7 @@ index 4e9e0ef895c29cfc1e925c0c3ffead23c4e4dc0a..b56d1229333bb86433d6691f1116f2d1 public ItemEntity(EntityType type, Level world) { super(type, world); -@@ -174,7 +175,7 @@ public class ItemEntity extends Entity { +@@ -184,7 +185,7 @@ public class ItemEntity extends Entity { } } @@ -106,7 +106,7 @@ index 4e9e0ef895c29cfc1e925c0c3ffead23c4e4dc0a..b56d1229333bb86433d6691f1116f2d1 // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -198,7 +199,7 @@ public class ItemEntity extends Entity { +@@ -208,7 +209,7 @@ public class ItemEntity extends Entity { this.lastTick = MinecraftServer.currentTick; // CraftBukkit end @@ -115,7 +115,7 @@ index 4e9e0ef895c29cfc1e925c0c3ffead23c4e4dc0a..b56d1229333bb86433d6691f1116f2d1 // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -253,7 +254,7 @@ public class ItemEntity extends Entity { +@@ -263,7 +264,7 @@ public class ItemEntity extends Entity { private boolean isMergable() { ItemStack itemstack = this.getItem(); @@ -124,7 +124,7 @@ index 4e9e0ef895c29cfc1e925c0c3ffead23c4e4dc0a..b56d1229333bb86433d6691f1116f2d1 } private void tryToMerge(ItemEntity other) { -@@ -497,6 +498,8 @@ public class ItemEntity extends Entity { +@@ -507,6 +508,8 @@ public class ItemEntity extends Entity { com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit this.getEntityData().set(ItemEntity.DATA_ITEM, stack); this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty @@ -133,7 +133,7 @@ index 4e9e0ef895c29cfc1e925c0c3ffead23c4e4dc0a..b56d1229333bb86433d6691f1116f2d1 } @Override -@@ -560,7 +563,7 @@ public class ItemEntity extends Entity { +@@ -570,7 +573,7 @@ public class ItemEntity extends Entity { public void makeFakeItem() { this.setNeverPickUp(); diff --git a/patches/unapplied/server/0358-Tracking-Range-Improvements.patch b/patches/server/0356-Tracking-Range-Improvements.patch similarity index 95% rename from patches/unapplied/server/0358-Tracking-Range-Improvements.patch rename to patches/server/0356-Tracking-Range-Improvements.patch index 2a36982dc..2d0327a85 100644 --- a/patches/unapplied/server/0358-Tracking-Range-Improvements.patch +++ b/patches/server/0356-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 0fad7ad13be138cbc7c4b09f457adbde570cf6fa..f1bf847a498023ce8729315c6ec68f1d16cab822 100644 +index 4ff1c09b4db2edbcf39c13a1942dd95bd566173d..6d5bb19888a2a0dc130eff3d7bc09811351dd75e 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1867,6 +1867,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1910,6 +1910,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getType().clientTrackingRange() * 16; diff --git a/patches/unapplied/server/0359-Fix-items-vanishing-through-end-portal.patch b/patches/server/0357-Fix-items-vanishing-through-end-portal.patch similarity index 89% rename from patches/unapplied/server/0359-Fix-items-vanishing-through-end-portal.patch rename to patches/server/0357-Fix-items-vanishing-through-end-portal.patch index c27cdfd7f..1e609cba7 100644 --- a/patches/unapplied/server/0359-Fix-items-vanishing-through-end-portal.patch +++ b/patches/server/0357-Fix-items-vanishing-through-end-portal.patch @@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the heightmap resolves the issue without having to load all spawn chunks. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 339031b16c856d29509916e6178151cc0f790dde..55bfca9606770ac8eb0c15ed83c5d3c605c22871 100644 +index dff627579f775dbe0a6323ffa60d9a65299b121a..a0a5c5b4e5a684f5ead6ad021966723c11d49547 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3025,6 +3025,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3072,6 +3072,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (flag1) { blockposition1 = ServerLevel.END_SPAWN_POINT; } else { diff --git a/patches/unapplied/server/0360-implement-optional-per-player-mob-spawns.patch b/patches/server/0358-implement-optional-per-player-mob-spawns.patch similarity index 94% rename from patches/unapplied/server/0360-implement-optional-per-player-mob-spawns.patch rename to patches/server/0358-implement-optional-per-player-mob-spawns.patch index d6f4cfeb6..152146bff 100644 --- a/patches/unapplied/server/0360-implement-optional-per-player-mob-spawns.patch +++ b/patches/server/0358-implement-optional-per-player-mob-spawns.patch @@ -269,10 +269,10 @@ index 0000000000000000000000000000000000000000..11de56afaf059b00fa5bec293516bcdc + } +} diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index f1bf847a498023ce8729315c6ec68f1d16cab822..a0ffdeaad5c375539857d6a5a94832216d09f024 100644 +index 6d5bb19888a2a0dc130eff3d7bc09811351dd75e..5cf6f6f67520af8d94456a028828e49446e82be9 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -155,6 +155,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -159,6 +159,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private final Long2LongMap chunkSaveCooldowns; private final Queue unloadQueue; int viewDistance; @@ -280,7 +280,7 @@ index f1bf847a498023ce8729315c6ec68f1d16cab822..a0ffdeaad5c375539857d6a5a9483221 // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback() public final CallbackExecutor callbackExecutor = new CallbackExecutor(); -@@ -184,16 +185,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -188,16 +189,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int chunkX = MCUtil.getChunkCoordinate(player.getX()); int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); // Note: players need to be explicitly added to distance maps before they can be updated @@ -312,7 +312,7 @@ index f1bf847a498023ce8729315c6ec68f1d16cab822..a0ffdeaad5c375539857d6a5a9483221 } // Paper end // Paper start -@@ -268,6 +284,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -280,6 +296,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.dataRegionManager = new io.papermc.paper.chunk.SingleThreadChunkRegionManager(this.level, 2, (1.0 / 3.0), 1, 6, "Data", DataRegionData::new, DataRegionSectionData::new); this.regionManagers.add(this.dataRegionManager); // Paper end @@ -320,7 +320,7 @@ index f1bf847a498023ce8729315c6ec68f1d16cab822..a0ffdeaad5c375539857d6a5a9483221 } protected ChunkGenerator generator() { -@@ -285,6 +302,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -301,6 +318,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }); } @@ -370,10 +370,10 @@ index 1e066a35b53b1f71a0e6376a22d51fc4c0a412dc..6228f2f67541da62b0ae093de987662d this.naturalSpawnChunkCounter.runAllUpdates(); return this.naturalSpawnChunkCounter.chunks.size(); diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 98f3b91605ecf81538659220354f78d4de9d203e..39b4ddbb87e6ec2e8103445625ff0d7d368bd513 100644 +index 7784dae8016d6ca5fbbf887316100d270710294b..75381eceabd706b5343884dd168dc14801923685 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -907,7 +907,18 @@ public class ServerChunkCache extends ChunkSource { +@@ -908,7 +908,18 @@ public class ServerChunkCache extends ChunkSource { gameprofilerfiller.push("naturalSpawnCount"); this.level.timings.countNaturalMobs.startTiming(); // Paper - timings int l = this.distanceManager.getNaturalSpawnChunkCount(); @@ -394,10 +394,10 @@ index 98f3b91605ecf81538659220354f78d4de9d203e..39b4ddbb87e6ec2e8103445625ff0d7d this.lastSpawnState = spawnercreature_d; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 41392a92af27b85e213eed3ac0fff281bb5c32b3..ba8f8b222e8951e0eea8642ecbb843fbf5146f5d 100644 +index b19ca7f62e78035ed5f52e1eb1a76066af97de80..5c5a42f59908b1f7a737d97c2470037a3d4361a8 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -226,6 +226,11 @@ public class ServerPlayer extends Player { +@@ -233,6 +233,11 @@ public class ServerPlayer extends Player { public boolean queueHealthUpdatePacket = false; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; // Paper end @@ -409,7 +409,7 @@ index 41392a92af27b85e213eed3ac0fff281bb5c32b3..ba8f8b222e8951e0eea8642ecbb843fb // CraftBukkit start public String displayName; -@@ -316,6 +321,7 @@ public class ServerPlayer extends Player { +@@ -323,6 +328,7 @@ public class ServerPlayer extends Player { this.adventure$displayName = net.kyori.adventure.text.Component.text(this.getScoreboardName()); // Paper this.bukkitPickUpLoot = true; this.maxHealthCache = this.getMaxHealth(); @@ -418,15 +418,14 @@ index 41392a92af27b85e213eed3ac0fff281bb5c32b3..ba8f8b222e8951e0eea8642ecbb843fb // Yes, this doesn't match Vanilla, but it's the best we can do for now. diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732ee10427d 100644 +index fedc36ceebaf3e1d267431bdf7db81e25f4d6fd7..611dbcebd54604da5bd3e6ed510032db2a70401d 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -67,7 +67,13 @@ public final class NaturalSpawner { - +@@ -69,6 +69,12 @@ public final class NaturalSpawner { private NaturalSpawner() {} -+ // Paper start - add countMobs parameter public static NaturalSpawner.SpawnState createState(int spawningChunkCount, Iterable entities, NaturalSpawner.ChunkGetter chunkSource, LocalMobCapCalculator localmobcapcalculator) { ++ // Paper start - add countMobs parameter + return createState(spawningChunkCount, entities, chunkSource, localmobcapcalculator, false); + } + @@ -435,7 +434,7 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 PotentialCalculator spawnercreatureprobabilities = new PotentialCalculator(); Object2IntOpenHashMap object2intopenhashmap = new Object2IntOpenHashMap(); Iterator iterator = entities.iterator(); -@@ -102,11 +108,16 @@ public final class NaturalSpawner { +@@ -103,11 +109,16 @@ public final class NaturalSpawner { spawnercreatureprobabilities.addCharge(entity.blockPosition(), biomesettingsmobs_b.getCharge()); } @@ -453,7 +452,7 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 }); } } -@@ -141,13 +152,37 @@ public final class NaturalSpawner { +@@ -142,13 +153,37 @@ public final class NaturalSpawner { continue; } @@ -493,12 +492,11 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 } } -@@ -155,12 +190,18 @@ public final class NaturalSpawner { - world.getProfiler().pop(); +@@ -157,11 +192,17 @@ public final class NaturalSpawner { } -+ // Paper start - add parameters and int ret type public static void spawnCategoryForChunk(MobCategory group, ServerLevel world, LevelChunk chunk, NaturalSpawner.SpawnPredicate checker, NaturalSpawner.AfterSpawnCallback runner) { ++ // Paper start - add parameters and int ret type + spawnCategoryForChunk(group, world, chunk, checker, runner, Integer.MAX_VALUE, null); + } + public static int spawnCategoryForChunk(MobCategory group, ServerLevel world, LevelChunk chunk, NaturalSpawner.SpawnPredicate checker, NaturalSpawner.AfterSpawnCallback runner, int maxSpawns, Consumer trackEntity) { @@ -513,7 +511,7 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 } @VisibleForDebug -@@ -171,15 +212,21 @@ public final class NaturalSpawner { +@@ -172,15 +213,21 @@ public final class NaturalSpawner { }); } @@ -523,7 +521,7 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 + } + public static int spawnCategoryForPosition(MobCategory group, ServerLevel world, ChunkAccess chunk, BlockPos pos, NaturalSpawner.SpawnPredicate checker, NaturalSpawner.AfterSpawnCallback runner, int maxSpawns, Consumer trackEntity) { + // Paper end - add maxSpawns parameter and return spawned mobs - StructureFeatureManager structuremanager = world.structureFeatureManager(); + StructureManager structuremanager = world.structureManager(); ChunkGenerator chunkgenerator = world.getChunkSource().getGenerator(); int i = pos.getY(); BlockState iblockdata = world.getBlockStateIfLoadedAndInBounds(pos); // Paper - don't load chunks for mob spawn @@ -536,7 +534,7 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 int k = 0; while (k < 3) { -@@ -221,14 +268,14 @@ public final class NaturalSpawner { +@@ -222,14 +269,14 @@ public final class NaturalSpawner { // Paper start Boolean doSpawning = isValidSpawnPostitionForType(world, group, structuremanager, chunkgenerator, biomesettingsmobs_c, blockposition_mutableblockposition, d2); if (doSpawning == null) { @@ -553,7 +551,7 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 } entityinsentient.moveTo(d0, (double) i, d1, world.random.nextFloat() * 360.0F, 0.0F); -@@ -240,10 +287,15 @@ public final class NaturalSpawner { +@@ -241,10 +288,15 @@ public final class NaturalSpawner { ++j; ++k1; runner.run(entityinsentient, chunk); @@ -571,7 +569,7 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 } if (entityinsentient.isMaxGroupSizeReached(k1)) { -@@ -265,6 +317,7 @@ public final class NaturalSpawner { +@@ -266,6 +318,7 @@ public final class NaturalSpawner { } } @@ -579,7 +577,7 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 } private static boolean isRightDistanceToPlayerAndSpawnPoint(ServerLevel world, ChunkAccess chunk, BlockPos.MutableBlockPos pos, double squaredDistance) { -@@ -550,7 +603,7 @@ public final class NaturalSpawner { +@@ -551,7 +604,7 @@ public final class NaturalSpawner { MobCategory enumcreaturetype = entitytypes.getCategory(); this.mobCategoryCounts.addTo(enumcreaturetype, 1); @@ -588,7 +586,7 @@ index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732 } public int getSpawnableChunkCount() { -@@ -566,6 +619,7 @@ public final class NaturalSpawner { +@@ -567,6 +620,7 @@ public final class NaturalSpawner { int i = limit * this.spawnableChunkCount / NaturalSpawner.MAGIC_NUMBER; // CraftBukkit end diff --git a/patches/unapplied/server/0361-Avoid-hopper-searches-if-there-are-no-items.patch b/patches/server/0359-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 94% rename from patches/unapplied/server/0361-Avoid-hopper-searches-if-there-are-no-items.patch rename to patches/server/0359-Avoid-hopper-searches-if-there-are-no-items.patch index 9191fd85e..22d9e42ec 100644 --- a/patches/unapplied/server/0361-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/patches/server/0359-Avoid-hopper-searches-if-there-are-no-items.patch @@ -14,10 +14,10 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear Combined, this adds up a lot. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index bfbd1922d77602628e57326b3251459f45b1aed9..334fd625829c8e5e9c434b184f6d0084b2d6ccc8 100644 +index b56fe14e7b7de95876ba2b1d084856d6935e591c..c4e679eca56ca756d2d7a9d2ffa2a56e5ab3f721 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -986,7 +986,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -990,7 +990,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } } @@ -67,10 +67,10 @@ index 524f3c42964eb83c9109bcc548a1075f1e295411..e9aee7d11798c3bd990466f101e9e342 } diff --git a/src/main/java/net/minecraft/world/level/entity/EntitySectionStorage.java b/src/main/java/net/minecraft/world/level/entity/EntitySectionStorage.java -index 078be552dce5c02f699bad83816c3154cef2b1ec..2e873762530e8f50158886436bd76b35d91953af 100644 +index 4c1e7c219e1ca153be4423347bd239ebaec4a31d..f54ca6383298848b2ee7108c41fcea593f924881 100644 --- a/src/main/java/net/minecraft/world/level/entity/EntitySectionStorage.java +++ b/src/main/java/net/minecraft/world/level/entity/EntitySectionStorage.java -@@ -111,13 +111,20 @@ public class EntitySectionStorage { +@@ -112,13 +112,20 @@ public class EntitySectionStorage { } public void getEntities(AABB box, Consumer action) { diff --git a/patches/unapplied/server/0362-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/patches/server/0360-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 91% rename from patches/unapplied/server/0362-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to patches/server/0360-Bees-get-gravity-in-void.-Fixes-MC-167279.patch index 03bd1852c..2b398af93 100644 --- a/patches/unapplied/server/0362-Bees-get-gravity-in-void.-Fixes-MC-167279.patch +++ b/patches/server/0360-Bees-get-gravity-in-void.-Fixes-MC-167279.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279 diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index 6ea223224e984058f0c6d3443ce49a3a46688434..8e857d4ff6497d68e462418d75b8378ff7adbc97 100644 +index bdc9911f5a72d2f23a3a01d0420ac9ba6cb78570..d94f045d7fe928c256c5d3e1af02ac73d7897f5a 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -142,7 +142,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -143,7 +143,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { public Bee(EntityType type, Level world) { super(type, world); this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(this.random, 20, 60); diff --git a/patches/unapplied/server/0363-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0361-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 92% rename from patches/unapplied/server/0363-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to patches/server/0361-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 7c34763e9..db61fd4a4 100644 --- a/patches/unapplied/server/0363-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/patches/server/0361-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either, then unwrap it... diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 39b4ddbb87e6ec2e8103445625ff0d7d368bd513..dec6aab50cebdfe1d0c93d71a8579b78b0ef7b9d 100644 +index 75381eceabd706b5343884dd168dc14801923685..0344d10a7e70109c6d5162c3ddab6dfd6d0b4571 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -600,6 +600,12 @@ public class ServerChunkCache extends ChunkSource { +@@ -601,6 +601,12 @@ public class ServerChunkCache extends ChunkSource { return this.getChunk(x, z, leastStatus, create); }, this.mainThreadProcessor).join(); } else { @@ -23,7 +23,7 @@ index 39b4ddbb87e6ec2e8103445625ff0d7d368bd513..dec6aab50cebdfe1d0c93d71a8579b78 ProfilerFiller gameprofilerfiller = this.level.getProfiler(); gameprofilerfiller.incrementCounter("getChunk"); -@@ -651,39 +657,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -652,39 +658,7 @@ public class ServerChunkCache extends ChunkSource { if (Thread.currentThread() != this.mainThread) { return null; } else { diff --git a/patches/unapplied/server/0364-Add-debug-for-sync-chunk-loads.patch b/patches/server/0362-Add-debug-for-sync-chunk-loads.patch similarity index 97% rename from patches/unapplied/server/0364-Add-debug-for-sync-chunk-loads.patch rename to patches/server/0362-Add-debug-for-sync-chunk-loads.patch index 7b76ff6e0..32d2a5005 100644 --- a/patches/unapplied/server/0364-Add-debug-for-sync-chunk-loads.patch +++ b/patches/server/0362-Add-debug-for-sync-chunk-loads.patch @@ -312,10 +312,10 @@ index 0000000000000000000000000000000000000000..0bb4aaa546939b67a5d22865190f3047 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index dec6aab50cebdfe1d0c93d71a8579b78b0ef7b9d..8f1609bbb5670d3b4acccb2cb4b9238ce13290bb 100644 +index 0344d10a7e70109c6d5162c3ddab6dfd6d0b4571..4581a95a792e8eb157c8577547cb6f76a8e8f883 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -632,6 +632,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -633,6 +633,7 @@ public class ServerChunkCache extends ChunkSource { this.level.asyncChunkTaskManager.raisePriority(x1, z1, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY); com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.level, x1, z1); // Paper end @@ -324,10 +324,10 @@ index dec6aab50cebdfe1d0c93d71a8579b78b0ef7b9d..8f1609bbb5670d3b4acccb2cb4b9238c chunkproviderserver_b.managedBlock(completablefuture::isDone); com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9e779490dfea57112ce088fd398892052b4d9d73..0a7dbafd938141b34dc66d0b4af26dba92a21c06 100644 +index 989f0da37f20c7989183986ffa14e9fe12c7af7f..6bded610f82189a5549e656881dbce0d34f285b2 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -383,6 +383,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -388,6 +388,12 @@ public class ServerLevel extends Level implements WorldGenLevel { }; public final com.destroystokyo.paper.io.chunk.ChunkTaskManager asyncChunkTaskManager; // Paper end diff --git a/patches/unapplied/server/0365-Remove-garbage-Java-version-check.patch b/patches/server/0363-Remove-garbage-Java-version-check.patch similarity index 91% rename from patches/unapplied/server/0365-Remove-garbage-Java-version-check.patch rename to patches/server/0363-Remove-garbage-Java-version-check.patch index 3c72a283d..c17cd041a 100644 --- a/patches/unapplied/server/0365-Remove-garbage-Java-version-check.patch +++ b/patches/server/0363-Remove-garbage-Java-version-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove garbage Java version check diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ee9f7f42a0eeb3c6f9930e227eeda26ba362e7f4..69b7a11d423b1cd8560cd726dd2b9a2b203e7dfd 100644 +index 96c18080e663c055508e0798edb545dcecebc804..fea479165e4cf1e4fc6e462d63123bf31bb4e3c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -189,10 +189,6 @@ public class Main { diff --git a/patches/unapplied/server/0366-Add-ThrownEggHatchEvent.patch b/patches/server/0364-Add-ThrownEggHatchEvent.patch similarity index 100% rename from patches/unapplied/server/0366-Add-ThrownEggHatchEvent.patch rename to patches/server/0364-Add-ThrownEggHatchEvent.patch diff --git a/patches/unapplied/server/0367-Entity-Jump-API.patch b/patches/server/0365-Entity-Jump-API.patch similarity index 92% rename from patches/unapplied/server/0367-Entity-Jump-API.patch rename to patches/server/0365-Entity-Jump-API.patch index 903e91ab9..003c53b24 100644 --- a/patches/unapplied/server/0367-Entity-Jump-API.patch +++ b/patches/server/0365-Entity-Jump-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 1ebd099af4abd40e848787ac96a53aa7287f469b..b28689f2621ee7d5129ab6d1853d9ee8823bf1d0 100644 +index 5330ce940918cc858cbce74665f1c928249bb957..70670065642766501918dfca21fdb3ea78a90a31 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3183,8 +3183,10 @@ public abstract class LivingEntity extends Entity { +@@ -3215,8 +3215,10 @@ public abstract class LivingEntity extends Entity { } else if (this.isInLava() && (!this.onGround || d7 > d8)) { this.jumpInLiquid(FluidTags.LAVA); } else if ((this.onGround || flag && d7 <= d8) && this.noJumpDelay == 0) { @@ -20,7 +20,7 @@ index 1ebd099af4abd40e848787ac96a53aa7287f469b..b28689f2621ee7d5129ab6d1853d9ee8 } else { this.noJumpDelay = 0; diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java -index f584f5a6fc503cdf08a3a2c3720f086031c11798..306aa8c36be92d66ebcc6b7e0dbb9dee6ec41a9b 100644 +index dbcf70dacf99b61c0147b43edd6a374b31809733..9c07e3f5554b3b9cf2a2c4d9239a72342567d7f1 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Panda.java +++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java @@ -515,7 +515,9 @@ public class Panda extends Animal { diff --git a/patches/unapplied/server/0368-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0366-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 89% rename from patches/unapplied/server/0368-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to patches/server/0366-Add-option-to-nerf-pigmen-from-nether-portals.patch index ceeba597e..1cd6f679c 100644 --- a/patches/unapplied/server/0368-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/0366-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -21,10 +21,10 @@ index a9b3442a49dc359959496d1f6adadefa76bfc863..62dfb6afe204c078f579a3dae944d935 private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 55bfca9606770ac8eb0c15ed83c5d3c605c22871..32e93c0c9c56a00585ede420f488cfe4a1b37ffa 100644 +index a0a5c5b4e5a684f5ead6ad021966723c11d49547..ea522476dff5408e1b7e488c4460406409d140ca 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -324,6 +324,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -345,6 +345,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // Paper start public long activatedImmunityTick = Integer.MIN_VALUE; // Paper public boolean isTemporarilyActive = false; // Paper @@ -32,7 +32,7 @@ index 55bfca9606770ac8eb0c15ed83c5d3c605c22871..32e93c0c9c56a00585ede420f488cfe4 protected int numCollisions = 0; // Paper public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one @javax.annotation.Nullable -@@ -1895,6 +1896,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1943,6 +1944,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (spawnedViaMobSpawner) { nbt.putBoolean("Paper.FromMobSpawner", true); } @@ -42,7 +42,7 @@ index 55bfca9606770ac8eb0c15ed83c5d3c605c22871..32e93c0c9c56a00585ede420f488cfe4 // Paper end return nbt; } catch (Throwable throwable) { -@@ -2034,6 +2038,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2082,6 +2086,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -51,7 +51,7 @@ index 55bfca9606770ac8eb0c15ed83c5d3c605c22871..32e93c0c9c56a00585ede420f488cfe4 String spawnReasonName = nbt.getString("Paper.SpawnReason"); try { diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -index 8edc7e3cf88eeebc06408a713ba6a41c9bd53e40..d2b82872f6f8c3febb6c4b6468fd39f3549b1ed8 100644 +index 33078e2199c8eb0ce012a72eeb4421df12817b84..fe073237dbec6e9890395575206bbc893bef6d9b 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java @@ -66,6 +66,8 @@ public class NetherPortalBlock extends Block { diff --git a/patches/unapplied/server/0369-Make-the-GUI-graph-fancier.patch b/patches/server/0367-Make-the-GUI-graph-fancier.patch similarity index 100% rename from patches/unapplied/server/0369-Make-the-GUI-graph-fancier.patch rename to patches/server/0367-Make-the-GUI-graph-fancier.patch diff --git a/patches/unapplied/server/0370-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0368-add-hand-to-BlockMultiPlaceEvent.patch similarity index 100% rename from patches/unapplied/server/0370-add-hand-to-BlockMultiPlaceEvent.patch rename to patches/server/0368-add-hand-to-BlockMultiPlaceEvent.patch diff --git a/patches/unapplied/server/0371-Validate-tripwire-hook-placement-before-update.patch b/patches/server/0369-Validate-tripwire-hook-placement-before-update.patch similarity index 79% rename from patches/unapplied/server/0371-Validate-tripwire-hook-placement-before-update.patch rename to patches/server/0369-Validate-tripwire-hook-placement-before-update.patch index 9c50f803d..fd8a74807 100644 --- a/patches/unapplied/server/0371-Validate-tripwire-hook-placement-before-update.patch +++ b/patches/server/0369-Validate-tripwire-hook-placement-before-update.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Validate tripwire hook placement before update diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -index 5efec24bbc23b6a4db29693cb875b8e2e7ece9e2..02a3e1ced592784b9c66927c76376c7ab413367d 100644 +index a5f8c7d9d9998eebce7f15e01c157651b9831516..4a516828e5c6abd63511ee7c93fcff11203cf8d0 100644 --- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -@@ -174,6 +174,7 @@ public class TripWireHookBlock extends Block { +@@ -175,6 +175,7 @@ public class TripWireHookBlock extends Block { - this.playSound(world, pos, flag4, flag5, flag2, flag3); + 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); diff --git a/patches/unapplied/server/0372-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0370-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 92% rename from patches/unapplied/server/0372-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to patches/server/0370-Add-option-to-allow-iron-golems-to-spawn-in-air.patch index 8a40babfc..48ef19cb7 100644 --- a/patches/unapplied/server/0372-Add-option-to-allow-iron-golems-to-spawn-in-air.patch +++ b/patches/server/0370-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -21,10 +21,10 @@ index 62dfb6afe204c078f579a3dae944d9350aaf72d0..82d8299d949ee26eefba2952b625650c private void armorStandEntityLookups() { armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -index 3e4241d83ec26e575dcdbd0f7fb6b1edbf0b2d05..8299b48bad7a38d4310ca93b1de37d6c9170fc09 100644 +index d2864615588aadf81ac9763ba402ede0c1eebb23..0a239df9a43669047be3d6006597128860862060 100644 --- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java +++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -@@ -323,7 +323,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { +@@ -334,7 +334,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { BlockPos blockposition1 = blockposition.below(); BlockState iblockdata = world.getBlockState(blockposition1); diff --git a/patches/unapplied/server/0373-Configurable-chance-of-villager-zombie-infection.patch b/patches/server/0371-Configurable-chance-of-villager-zombie-infection.patch similarity index 87% rename from patches/unapplied/server/0373-Configurable-chance-of-villager-zombie-infection.patch rename to patches/server/0371-Configurable-chance-of-villager-zombie-infection.patch index 72cfcc4a7..ac5f85134 100644 --- a/patches/unapplied/server/0373-Configurable-chance-of-villager-zombie-infection.patch +++ b/patches/server/0371-Configurable-chance-of-villager-zombie-infection.patch @@ -24,21 +24,22 @@ index 82d8299d949ee26eefba2952b625650c1aca0e6a..6e7699e5a725eac05de3e809ae9a45a4 private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 0760fcc3bde6b819ae526e2c66486b09a948d98b..f09e9ae8e976b0150c00995cd22e64feaefd27be 100644 +index 374fccfec47769d2df51056fb6d1948f472a6802..6efce73f5233927104ec772e16a370926317d80d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -449,10 +449,13 @@ public class Zombie extends Monster { - @Override - public void killed(ServerLevel world, LivingEntity other) { - super.killed(world, other); +@@ -450,10 +450,14 @@ public class Zombie extends Monster { + public boolean wasKilled(ServerLevel world, LivingEntity other) { + boolean flag = super.wasKilled(world, other); + - if ((world.getDifficulty() == Difficulty.NORMAL || world.getDifficulty() == Difficulty.HARD) && other instanceof Villager) { - if (world.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) { ++ // Paper start + if (level.paperConfig.zombieVillagerInfectionChance != 0.0 && (level.paperConfig.zombieVillagerInfectionChance != -1.0 || world.getDifficulty() == Difficulty.NORMAL || world.getDifficulty() == Difficulty.HARD) && other instanceof Villager) { + if (level.paperConfig.zombieVillagerInfectionChance == -1.0 && world.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) { - return; + return flag; } + if (level.paperConfig.zombieVillagerInfectionChance != -1.0 && (this.random.nextDouble() * 100.0) > level.paperConfig.zombieVillagerInfectionChance) { -+ return; ++ return flag; + } // Paper end Villager entityvillager = (Villager) other; diff --git a/patches/unapplied/server/0374-Optimise-Chunk-getFluid.patch b/patches/server/0372-Optimise-Chunk-getFluid.patch similarity index 87% rename from patches/unapplied/server/0374-Optimise-Chunk-getFluid.patch rename to patches/server/0372-Optimise-Chunk-getFluid.patch index a46d5ac5e..a88f9d0fc 100644 --- a/patches/unapplied/server/0374-Optimise-Chunk-getFluid.patch +++ b/patches/server/0372-Optimise-Chunk-getFluid.patch @@ -8,10 +8,10 @@ faster on its own, however removing the try catch makes it easier to inline due to code size diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 1a64618e533426147ad6ab1211afb9cc676cc185..f994d393929ca6813d4209fb9c93550e4f692228 100644 +index 74952112182ac94942474f1c7cf21a6301abbcc7..930fa1703727249585b4ac045db15d55736c58fd 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -373,18 +373,20 @@ public class LevelChunk extends ChunkAccess { +@@ -381,18 +381,20 @@ public class LevelChunk extends ChunkAccess { } public FluidState getFluidState(int x, int y, int z) { @@ -38,7 +38,7 @@ index 1a64618e533426147ad6ab1211afb9cc676cc185..f994d393929ca6813d4209fb9c93550e } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Getting fluid state"); CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Block being got"); -@@ -394,6 +396,7 @@ public class LevelChunk extends ChunkAccess { +@@ -402,6 +404,7 @@ public class LevelChunk extends ChunkAccess { }); throw new ReportedException(crashreport); } @@ -47,10 +47,10 @@ index 1a64618e533426147ad6ab1211afb9cc676cc185..f994d393929ca6813d4209fb9c93550e // CraftBukkit start diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index 67b06640358e04752bf149e9380f5f83d5d1d0f6..cdd17e501c678a4f4bebbaaccdaec1682351e2f2 100644 +index ba4da27861236eb62d208f2a660e232a143232ac..2ad73237f4664535c3d5120a54b713f44cddb793 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -@@ -52,7 +52,7 @@ public class LevelChunkSection { +@@ -54,7 +54,7 @@ public class LevelChunkSection { } public FluidState getFluidState(int x, int y, int z) { diff --git a/patches/unapplied/server/0375-Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/0373-Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 100% rename from patches/unapplied/server/0375-Set-spigots-verbose-world-setting-to-false-by-def.patch rename to patches/server/0373-Set-spigots-verbose-world-setting-to-false-by-def.patch diff --git a/patches/unapplied/server/0376-Add-tick-times-API-and-mspt-command.patch b/patches/server/0374-Add-tick-times-API-and-mspt-command.patch similarity index 92% rename from patches/unapplied/server/0376-Add-tick-times-API-and-mspt-command.patch rename to patches/server/0374-Add-tick-times-API-and-mspt-command.patch index 85c152995..1000f4afd 100644 --- a/patches/unapplied/server/0376-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0374-Add-tick-times-API-and-mspt-command.patch @@ -122,10 +122,10 @@ index 0be8f68c3e61f132ada9381e36b743dd7477eece..8158a00821727104a23958a76e19cd8b version = getInt("config-version", 27); set("config-version", 27); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 632743678f8c65e078080fda7c8eeee9a2d5753c..03ebc2a0476aef9297cbbc7f358915703a469b02 100644 +index 5b9cd88e77a492bbd9c52d5c245b35bb53cf024e..661342339930573509571feb5a6f613d53186f00 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -244,6 +244,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop