mirror of
https://github.com/craftaro/EpicSpawners.git
synced 2025-01-08 11:37:51 +08:00
Added the ability to ignore the max entity count on first spawn.
This commit is contained in:
parent
847f86a0ae
commit
d0b5ffa339
@ -125,6 +125,10 @@ public class Settings {
|
||||
"This value depicts the variable {RAND} in equations used by this plugin",
|
||||
"It generates a random number between (by default) 1 and 4.");
|
||||
|
||||
public static final ConfigSetting IGNORE_MAX_ON_FIRST_SPAWN = new ConfigSetting(config, "Main.Ignore Max On First Spawn", false,
|
||||
"Should the max entity count around spawners be",
|
||||
"ignored on their first spawn?");
|
||||
|
||||
public static final ConfigSetting REMOVE_CORRUPTED_SPAWNERS = new ConfigSetting(config, "Main.Remove Corrupted Spawners", true,
|
||||
"Should spawners without valid values be removed?",
|
||||
"This may need to be disabled for compatibility that use",
|
||||
|
@ -172,6 +172,10 @@ public class SpawnOptionEntity_1_12 implements SpawnOption {
|
||||
maxEntitiesAllowed = ((SpawnConditionNearbyEntities) spawnCondition).getMax();
|
||||
}
|
||||
|
||||
// Should we skip the max entity amount on first spawn?
|
||||
if (spawner.getSpawnCount() == 0 && Settings.IGNORE_MAX_ON_FIRST_SPAWN.getBoolean())
|
||||
maxEntitiesAllowed = Integer.MAX_VALUE;
|
||||
|
||||
// Get the amount of entities around the spawner.
|
||||
int size = SpawnConditionNearbyEntities.getEntitiesAroundSpawner(location, true);
|
||||
|
||||
|
@ -219,6 +219,10 @@ public class SpawnOptionEntity_1_13 implements SpawnOption {
|
||||
maxEntitiesAllowed = ((SpawnConditionNearbyEntities) spawnCondition).getMax();
|
||||
}
|
||||
|
||||
// Should we skip the max entity amount on first spawn?
|
||||
if (spawner.getSpawnCount() == 0 && Settings.IGNORE_MAX_ON_FIRST_SPAWN.getBoolean())
|
||||
maxEntitiesAllowed = Integer.MAX_VALUE;
|
||||
|
||||
// Get the amount of entities around the spawner.
|
||||
int size = SpawnConditionNearbyEntities.getEntitiesAroundSpawner(location, true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user