mirror of
https://github.com/craftaro/EpicSpawners.git
synced 2025-01-09 03:57:40 +08:00
Block, Command and Item spawners added to boosting system.
This commit is contained in:
parent
f49ee5131e
commit
ddcd524b49
@ -33,7 +33,8 @@ public class SpawnOptionBlock implements SpawnOption {
|
||||
Location location = spawner.getLocation();
|
||||
if (location == null || location.getWorld() == null) return;
|
||||
|
||||
for (int i = 0; i < spawner.getSpawnerDataCount(); i++) {
|
||||
int spawnerBoost = spawner.getBoost();
|
||||
for (int i = 0; i < spawner.getSpawnerDataCount() + spawnerBoost; i++) {
|
||||
for (Material material : blocks) {
|
||||
int searchIndex = 0;
|
||||
while (searchIndex++ <= MAX_SEARCH_COUNT) {
|
||||
|
@ -37,7 +37,8 @@ public class SpawnOptionCommand implements SpawnOption {
|
||||
Location location = spawner.getLocation();
|
||||
if (location == null || location.getWorld() == null) return;
|
||||
|
||||
for (int i = 0; i < spawner.getSpawnerDataCount(); i++) {
|
||||
int spawnerBoost = spawner.getBoost();
|
||||
for (int i = 0; i < spawner.getSpawnerDataCount() + spawnerBoost; i++) {
|
||||
for (String command : commands) {
|
||||
String finalCommand = command;
|
||||
String lowercaseCommand = finalCommand.toLowerCase();
|
||||
|
@ -37,7 +37,8 @@ public class SpawnOptionItem implements SpawnOption {
|
||||
Location spawnLocation = location.clone().add(0.5, 0.9, 0.5);
|
||||
location.getWorld().playSound(location, Sound.ENTITY_ITEM_PICKUP, 0.1F, 1F);
|
||||
|
||||
for (int i = 0; i < spawner.getSpawnerDataCount(); i++) {
|
||||
int spawnerBoost = spawner.getBoost();
|
||||
for (int i = 0; i < spawner.getSpawnerDataCount() + spawnerBoost; i++) {
|
||||
for (ItemStack item : items) {
|
||||
Item droppedItem = world.dropItem(spawnLocation, item);
|
||||
spawner.setSpawnCount(spawner.getSpawnCount() + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user