Fix Paper comments

Dieser Commit ist enthalten in:
Nassim Jahnke 2021-11-24 10:20:21 +01:00 committet von MiniDigger | Martin
Ursprung f43f1e217e
Commit 8f64c190ef

Datei anzeigen

@ -645,7 +645,7 @@ index b193f8dfbe7b61c919ad5eb452d29885982e25e4..01b9edc8aaf472650f171f1b88229807
// 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 63deac19b4006c5d64596cd30e6641caaabc7c1d..c62e76912413c4412ee807435d23038a65caa9ea 100644
index 63deac19b4006c5d64596cd30e6641caaabc7c1d..63ba93538d990fdd4c9e8c491bb715adc8d57986 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -65,7 +65,13 @@ public final class NaturalSpawner {
@ -662,17 +662,19 @@ index 63deac19b4006c5d64596cd30e6641caaabc7c1d..c62e76912413c4412ee807435d23038a
PotentialCalculator spawnercreatureprobabilities = new PotentialCalculator();
Object2IntOpenHashMap<MobCategory> object2intopenhashmap = new Object2IntOpenHashMap();
Iterator iterator = entities.iterator();
@@ -106,6 +112,9 @@ public final class NaturalSpawner {
@@ -106,6 +112,11 @@ public final class NaturalSpawner {
}
object2intopenhashmap.addTo(enumcreaturetype, 1);
+ // Paper start
+ if (countMobs) {
+ chunk.level.getChunkSource().chunkMap.updatePlayerMobTypeMap(entity);
+ }
+ // Paper end
});
}
}
@@ -169,13 +178,30 @@ public final class NaturalSpawner {
@@ -169,13 +180,30 @@ public final class NaturalSpawner {
continue;
}
@ -705,7 +707,7 @@ index 63deac19b4006c5d64596cd30e6641caaabc7c1d..c62e76912413c4412ee807435d23038a
}
}
@@ -183,12 +209,18 @@ public final class NaturalSpawner {
@@ -183,12 +211,18 @@ public final class NaturalSpawner {
world.getProfiler().pop();
}
@ -721,11 +723,11 @@ index 63deac19b4006c5d64596cd30e6641caaabc7c1d..c62e76912413c4412ee807435d23038a
- NaturalSpawner.spawnCategoryForPosition(group, world, chunk, blockposition, checker, runner);
+ return NaturalSpawner.spawnCategoryForPosition(group, world, chunk, blockposition, checker, runner, maxSpawns, trackEntity); // Paper
}
+ return 0; // paper
+ return 0; // Paper
}
@VisibleForDebug
@@ -199,15 +231,21 @@ public final class NaturalSpawner {
@@ -199,15 +233,21 @@ public final class NaturalSpawner {
});
}
@ -748,7 +750,7 @@ index 63deac19b4006c5d64596cd30e6641caaabc7c1d..c62e76912413c4412ee807435d23038a
int k = 0;
while (k < 3) {
@@ -249,14 +287,14 @@ public final class NaturalSpawner {
@@ -249,14 +289,14 @@ public final class NaturalSpawner {
// Paper start
Boolean doSpawning = isValidSpawnPostitionForType(world, group, structuremanager, chunkgenerator, biomesettingsmobs_c, blockposition_mutableblockposition, d2);
if (doSpawning == null) {
@ -765,7 +767,7 @@ index 63deac19b4006c5d64596cd30e6641caaabc7c1d..c62e76912413c4412ee807435d23038a
}
entityinsentient.moveTo(d0, (double) i, d1, world.random.nextFloat() * 360.0F, 0.0F);
@@ -268,10 +306,15 @@ public final class NaturalSpawner {
@@ -268,10 +308,15 @@ public final class NaturalSpawner {
++j;
++k1;
runner.run(entityinsentient, chunk);
@ -783,7 +785,7 @@ index 63deac19b4006c5d64596cd30e6641caaabc7c1d..c62e76912413c4412ee807435d23038a
}
if (entityinsentient.isMaxGroupSizeReached(k1)) {
@@ -293,6 +336,7 @@ public final class NaturalSpawner {
@@ -293,6 +338,7 @@ public final class NaturalSpawner {
}
}