geforkt von Mirrors/Paper
Reset spawner timer when spawner event is cancelled
Dieser Commit ist enthalten in:
Ursprung
08aaee1b77
Commit
d00d3df166
@ -40,7 +40,7 @@
|
||||
} else {
|
||||
boolean flag = false;
|
||||
RandomSource randomsource = world.getRandom();
|
||||
@@ -157,13 +164,25 @@
|
||||
@@ -157,13 +164,26 @@
|
||||
((Mob) entity).finalizeSpawn(world, world.getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.SPAWNER, (SpawnGroupData) null);
|
||||
}
|
||||
|
||||
@ -59,6 +59,7 @@
|
||||
|
||||
- if (!world.tryAddFreshEntityWithPassengers(entity)) {
|
||||
+ entity.spawnedViaMobSpawner = true; // Paper
|
||||
+ flag = true; // Paper
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||
+ continue;
|
||||
@ -68,3 +69,12 @@
|
||||
this.delay(world, pos);
|
||||
return;
|
||||
}
|
||||
@@ -174,7 +194,7 @@
|
||||
((Mob) entity).spawnAnim();
|
||||
}
|
||||
|
||||
- flag = true;
|
||||
+ //flag = true; // Paper - moved up above cancellable event
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren