2023-05-25 19:20:03 +02:00
|
|
|
package com.craftaro.ultimatestacker.api.stack.spawner;
|
|
|
|
|
2023-06-30 22:28:37 +02:00
|
|
|
import com.craftaro.core.database.Data;
|
|
|
|
import com.craftaro.core.nms.world.SpawnedEntity;
|
2024-01-07 12:16:27 +01:00
|
|
|
import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial;
|
2023-05-25 19:20:03 +02:00
|
|
|
import com.craftaro.ultimatestacker.api.utils.Hologramable;
|
|
|
|
import com.craftaro.ultimatestacker.api.utils.Stackable;
|
|
|
|
import org.bukkit.Location;
|
|
|
|
import org.bukkit.World;
|
|
|
|
import org.bukkit.entity.EntityType;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
2023-07-08 11:17:12 +02:00
|
|
|
/**
|
|
|
|
* Represents a stack of spawners
|
|
|
|
*/
|
2023-06-05 16:25:37 +02:00
|
|
|
public interface SpawnerStack extends Stackable, Hologramable, Data {
|
2023-05-25 19:20:03 +02:00
|
|
|
|
2023-07-08 11:17:12 +02:00
|
|
|
/**
|
|
|
|
* Get the id of this stack
|
|
|
|
* @return The id of this stack
|
|
|
|
*/
|
2023-05-25 19:20:03 +02:00
|
|
|
int getId();
|
|
|
|
|
2023-07-08 11:17:12 +02:00
|
|
|
/**
|
|
|
|
* Calculate the amount of entities that will spawn from this stack
|
|
|
|
* @param type The type of entity to calculate for
|
|
|
|
* @param ignoreRestrictions Weather or not to ignore max stack size and if the entity is stackable
|
|
|
|
* @return The calculated amount
|
|
|
|
*/
|
|
|
|
int calculateSpawnCount(EntityType type, boolean ignoreRestrictions);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Spawn the entities for this SpawnerStack
|
|
|
|
* @return The amount of entities that spawned
|
|
|
|
*/
|
|
|
|
int spawn();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Spawn the entities for this SpawnerStack
|
|
|
|
* @param noAI Weather or not to spawn the entities with no AI
|
|
|
|
* @return The amount of entities that spawned
|
|
|
|
*/
|
|
|
|
int spawn(boolean noAI);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Spawn the entities for this SpawnerStack
|
|
|
|
* @param amount The amount of entities to spawn
|
|
|
|
* @param noAI Weather or not to spawn the entities with no AI
|
|
|
|
* @return The amount of entities that spawned
|
|
|
|
*/
|
|
|
|
int spawn(int amount, boolean noAI);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Spawn the entities for this stack
|
|
|
|
* @return The amount of entities that spawned
|
|
|
|
*/
|
2023-05-25 19:20:03 +02:00
|
|
|
int spawn(int amountToSpawn, EntityType... types);
|
|
|
|
|
2023-07-08 11:17:12 +02:00
|
|
|
/**
|
|
|
|
* Spawn the entities for this stack
|
|
|
|
* @return The location of this stack
|
|
|
|
*/
|
2023-06-29 11:18:18 +02:00
|
|
|
int spawn(int amountToSpawn, String particle, Set<XMaterial> canSpawnOn, SpawnedEntity spawned, EntityType... types);
|
2023-05-25 19:20:03 +02:00
|
|
|
}
|