Allow spawners to be disabled without adding a stupid high tick rate (#6837)
This commit is contained in:
@@ -37,6 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Paper start - Configurable mob spawner tick rate
|
+ // Paper start - Configurable mob spawner tick rate
|
||||||
+ if (spawnDelay > 0 && --tickDelay > 0) return;
|
+ if (spawnDelay > 0 && --tickDelay > 0) return;
|
||||||
+ tickDelay = world.paperConfig.mobSpawnerTickRate;
|
+ tickDelay = world.paperConfig.mobSpawnerTickRate;
|
||||||
|
+ if (tickDelay == -1) { return; } // If disabled
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
if (this.isNearPlayer(world, pos)) {
|
if (this.isNearPlayer(world, pos)) {
|
||||||
- if (this.spawnDelay == -1) {
|
- if (this.spawnDelay == -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user