2020-09-28 15:33:03 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
|
|
Date: Mon, 28 Sep 2020 16:25:34 +0300
|
2020-10-22 13:37:58 +02:00
|
|
|
Subject: [PATCH] PaperPR: Fix merging spawning values
|
2020-09-28 15:33:03 +02:00
|
|
|
|
2020-10-31 10:28:14 +01:00
|
|
|
This patch is licensed under bukkit's original license, GPLv3
|
2020-09-28 15:33:03 +02:00
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
2020-11-26 10:52:33 +01:00
|
|
|
index 6c15409982fd8005fede7c56c1ca74db5993d548..5e8c57aa026f5be735b0316da450b919692385f6 100644
|
2020-09-28 15:33:03 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
2020-10-08 13:04:22 +02:00
|
|
|
@@ -157,9 +157,12 @@ public final class SpawnerCreature {
|
2020-09-28 15:33:03 +02:00
|
|
|
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());
|
|
|
|
- });
|
|
|
|
+ // Yatopia start - fix this
|
|
|
|
+ //spawnercreature_d.getEntityCountsByType().mergeInt(enumcreaturetype, spawnCount, (keyInMap, valueInMap) -> {
|
|
|
|
+ // return Integer.valueOf(spawnCount + valueInMap.intValue());
|
|
|
|
+ //});
|
|
|
|
+ spawnercreature_d.getEntityCountsByType().mergeInt(enumcreaturetype, spawnCount, Integer::sum);
|
|
|
|
+ // Yatopia end
|
|
|
|
// Paper end - per player mob spawning
|
|
|
|
}
|
|
|
|
}
|