UltimateStacker/UltimateStacker-API/src/main/java/com/craftaro/ultimatestacker/api/stack/spawner/SpawnerStack.java

66 lines
2.0 KiB
Java
Raw Normal View History

2023-05-25 19:20:03 +02:00
package com.craftaro.ultimatestacker.api.stack.spawner;
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;
/**
* Represents a stack of spawners
*/
public interface SpawnerStack extends Stackable, Hologramable, Data {
2023-05-25 19:20:03 +02:00
/**
* Get the id of this stack
* @return The id of this stack
*/
2023-05-25 19:20:03 +02:00
int getId();
/**
* 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);
/**
* 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
}