Search in sources :

Example 1 with StackedSpawner

use of com.bgsoftware.wildstacker.api.objects.StackedSpawner in project IridiumSkyblock by Iridium-Development.

the class WildStackerSupport method getExtraSpawners.

@Override
public int getExtraSpawners(Island island, EntityType entityType) {
    IslandSpawners islandSpawners = IridiumSkyblock.getInstance().getIslandManager().getIslandSpawners(island, entityType);
    int stackedSpawners = 0;
    for (StackedSpawner stackedSpawner : WildStackerAPI.getWildStacker().getSystemManager().getStackedSpawners()) {
        if (!island.isInIsland(stackedSpawner.getLocation()))
            continue;
        if (stackedSpawner.getSpawnedType() != entityType)
            continue;
        stackedSpawners += stackedSpawner.getStackAmount();
    }
    islandSpawners.setExtraAmount(stackedSpawners);
    return stackedSpawners;
}
Also used : StackedSpawner(com.bgsoftware.wildstacker.api.objects.StackedSpawner) IslandSpawners(com.iridium.iridiumskyblock.database.IslandSpawners)

Aggregations

StackedSpawner (com.bgsoftware.wildstacker.api.objects.StackedSpawner)1 IslandSpawners (com.iridium.iridiumskyblock.database.IslandSpawners)1