From 889192e8f86808898d39a0311fc0aa2d6911daf7 Mon Sep 17 00:00:00 2001 From: Mariell Hoversholm Date: Sat, 5 Dec 2020 14:59:05 +0100 Subject: [PATCH] Fix merging spawning values --- .../implement-optional-per-player-mob-spawns.patch | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/implement-optional-per-player-mob-spawns.patch index a845b02da6..918dd87622 100644 --- a/Spigot-Server-Patches/implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/implement-optional-per-player-mob-spawns.patch @@ -710,11 +710,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return spawnercreature_d.a(entitytypes, blockposition, ichunkaccess); }, (entityinsentient, ichunkaccess) -> { spawnercreature_d.a(entityinsentient, ichunkaccess); +- }); + }, + difference, worldserver.paperConfig.perPlayerMobSpawns ? worldserver.getChunkProvider().playerChunkMap::updatePlayerMobTypeMap : null); -+ spawnercreature_d.getEntityCountsByType().mergeInt(enumcreaturetype, spawnCount, (keyInMap, valueInMap) -> { -+ return Integer.valueOf(spawnCount + valueInMap.intValue()); - }); ++ spawnercreature_d.getEntityCountsByType().mergeInt(enumcreaturetype, spawnCount, Integer::sum); + // Paper end - per player mob spawning } }