Improve cancelling PreCreatureSpawnEvent with per player mob spawns (#9400)
This commit is contained in:
parent
183462c9f0
commit
1b4291893f
4 changed files with 125 additions and 11 deletions
|
@ -504,12 +504,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
while (k < 3) {
|
||||
@@ -0,0 +0,0 @@ public final class NaturalSpawner {
|
||||
// Paper start
|
||||
Boolean doSpawning = isValidSpawnPostitionForType(world, group, structuremanager, chunkgenerator, biomesettingsmobs_c, blockposition_mutableblockposition, d2);
|
||||
if (doSpawning == null) {
|
||||
PreSpawnStatus doSpawning = isValidSpawnPostitionForType(world, group, structuremanager, chunkgenerator, biomesettingsmobs_c, blockposition_mutableblockposition, d2);
|
||||
if (doSpawning == PreSpawnStatus.ABORT) {
|
||||
- return;
|
||||
+ return j; // Paper
|
||||
}
|
||||
if (doSpawning && checker.test(biomesettingsmobs_c.type, blockposition_mutableblockposition, chunk)) {
|
||||
if (doSpawning == PreSpawnStatus.SUCCESS && checker.test(biomesettingsmobs_c.type, blockposition_mutableblockposition, chunk)) {
|
||||
// Paper end
|
||||
Mob entityinsentient = NaturalSpawner.getMobForSpawn(world, biomesettingsmobs_c.type);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue