Search in sources :

Example 1 with ConditionTag

use of dev.rosewood.rosestacker.spawner.conditions.ConditionTag in project RoseStacker by Rosewood-Development.

the class StackedSpawnerGui method buildGui.

/**
 * Builds the GUI from scratch
 */
private void buildGui() {
    this.guiContainer = GuiFactory.createContainer().setTickRate(Setting.SPAWNER_GUI_TICK_UPDATE_RATE.getInt());
    SpawnerStackSettings stackSettings = this.stackedSpawner.getStackSettings();
    GuiScreen mainScreen = GuiFactory.createScreen(this.guiContainer, GuiSize.ROWS_THREE).setTitle(this.localeManager.getLocaleMessage("gui-stacked-spawner-title", StringPlaceholders.single("name", stackSettings.getDisplayName()))).addButtonAt(11, GuiFactory.createButton()).addButtonAt(13, GuiFactory.createButton()).addButtonAt(15, GuiFactory.createButton());
    List<Integer> fillerSlots = IntStream.range(0, GuiSize.ROWS_THREE.getNumSlots()).boxed().collect(Collectors.toList());
    fillerSlots.removeAll(Arrays.asList(4, 7, 8, 9, 11, 13, 15, 17, 18, 19));
    Material filler = GuiHelper.parseMaterial(Setting.SPAWNER_GUI_BORDER_MATERIAL.getString());
    Material corner = GuiHelper.parseMaterial(Setting.SPAWNER_GUI_BORDER_CORNER_MATERIAL.getString());
    Material accent = GuiHelper.parseMaterial(Setting.SPAWNER_GUI_BORDER_ACCENT_MATERIAL.getString());
    Material info = GuiHelper.parseMaterial(Setting.SPAWNER_GUI_SPAWNER_STATS_MATERIAL.getString());
    Material spawner = GuiHelper.parseMaterial(Setting.SPAWNER_GUI_CENTRAL_MATERIAL.getString());
    Material conditionsValid = GuiHelper.parseMaterial(Setting.SPAWNER_GUI_VALID_SPAWN_CONDITIONS_MATERIAL.getString());
    Material conditionsInvalid = GuiHelper.parseMaterial(Setting.SPAWNER_GUI_INVALID_SPAWN_CONDITIONS_MATERIAL.getString());
    ItemStack fillerItem = new ItemStack(filler);
    ItemMeta fillerItemMeta = fillerItem.getItemMeta();
    if (fillerItemMeta != null) {
        fillerItemMeta.setDisplayName(" ");
        fillerItemMeta.addItemFlags(ItemFlag.values());
        fillerItem.setItemMeta(fillerItemMeta);
    }
    for (int slot : fillerSlots) mainScreen.addItemStackAt(slot, fillerItem);
    ItemStack cornerItem = fillerItem.clone();
    cornerItem.setType(corner);
    for (int slot : Arrays.asList(8, 18)) mainScreen.addItemStackAt(slot, cornerItem);
    ItemStack accentItem = fillerItem.clone();
    accentItem.setType(accent);
    for (int slot : Arrays.asList(7, 9, 17, 19)) mainScreen.addItemStackAt(slot, accentItem);
    ItemStack skull = RoseStacker.getInstance().getManager(StackSettingManager.class).getEntityStackSettings(stackSettings.getEntityType()).getEntityTypeData().getSkullItem();
    ItemMeta skullMeta = skull.getItemMeta();
    if (skullMeta != null) {
        String displayString;
        if (this.stackedSpawner.getStackSize() == 1 && !Setting.SPAWNER_DISPLAY_TAGS_SINGLE_AMOUNT.getBoolean()) {
            displayString = RoseStacker.getInstance().getManager(LocaleManager.class).getLocaleMessage("spawner-stack-display-single", StringPlaceholders.builder("amount", this.stackedSpawner.getStackSize()).addPlaceholder("name", this.stackedSpawner.getStackSettings().getDisplayName()).build());
        } else {
            displayString = RoseStacker.getInstance().getManager(LocaleManager.class).getLocaleMessage("spawner-stack-display", StringPlaceholders.builder("amount", this.stackedSpawner.getStackSize()).addPlaceholder("name", this.stackedSpawner.getStackSettings().getDisplayName()).build());
        }
        skullMeta.setDisplayName(displayString);
        skull.setItemMeta(skullMeta);
    }
    mainScreen.addButtonAt(4, GuiFactory.createButton(skull));
    mainScreen.addButtonAt(11, GuiFactory.createButton().setIcon(info).setName(this.getString("stats")).setLoreSupplier(() -> {
        List<GuiString> lore = new ArrayList<>();
        StackedSpawnerTile spawnerTile = this.stackedSpawner.getSpawnerTile();
        lore.add(this.getString("min-spawn-delay", StringPlaceholders.single("delay", spawnerTile.getMinSpawnDelay())));
        lore.add(this.getString("max-spawn-delay", StringPlaceholders.single("delay", spawnerTile.getMaxSpawnDelay())));
        lore.add(this.getString("disabled-mob-ai", StringPlaceholders.single("disabled", String.valueOf(stackSettings.isMobAIDisabled()))));
        int range = stackSettings.getEntitySearchRange() == -1 ? spawnerTile.getSpawnRange() : stackSettings.getEntitySearchRange();
        lore.add(this.getString("entity-search-range", StringPlaceholders.single("range", range)));
        lore.add(this.getString("player-activation-range", StringPlaceholders.single("range", spawnerTile.getRequiredPlayerRange())));
        lore.add(this.getString("spawn-range", StringPlaceholders.single("range", spawnerTile.getSpawnRange())));
        if (stackSettings.getSpawnCountStackSizeMultiplier() != -1) {
            if (Setting.SPAWNER_SPAWN_COUNT_STACK_SIZE_RANDOMIZED.getBoolean()) {
                lore.add(this.getString("min-spawn-amount", StringPlaceholders.single("amount", this.stackedSpawner.getStackSize())));
                lore.add(this.getString("max-spawn-amount", StringPlaceholders.single("amount", spawnerTile.getSpawnCount())));
            } else {
                lore.add(this.getString("spawn-amount", StringPlaceholders.single("amount", spawnerTile.getSpawnCount())));
            }
        } else {
            lore.add(this.getString("min-spawn-amount", StringPlaceholders.single("amount", 1)));
            lore.add(this.getString("max-spawn-amount", StringPlaceholders.single("amount", spawnerTile.getSpawnCount())));
        }
        lore.add(GuiFactory.createString());
        lore.add(this.getString("spawn-conditions"));
        List<ConditionTag> spawnConditions = stackSettings.getSpawnRequirements();
        for (ConditionTag conditionTag : spawnConditions) for (String line : conditionTag.getInfoMessage(this.localeManager)) lore.add(GuiFactory.createString(line));
        return lore;
    }));
    mainScreen.addButtonAt(13, GuiFactory.createButton().setIcon(spawner).setNameSupplier(() -> this.getString("time-until-next-spawn", StringPlaceholders.single("time", this.stackedSpawner.getSpawnerTile().getDelay() + 1))).setLoreSupplier(() -> Collections.singletonList(this.getString("total-spawns", StringPlaceholders.single("amount", StackerUtils.formatNumber(PersistentDataUtils.getTotalSpawnCount(this.stackedSpawner.getSpawnerTile())))))));
    mainScreen.addButtonAt(15, GuiFactory.createButton().setIconSupplier(() -> GuiFactory.createIcon(this.stackedSpawner.getLastInvalidConditions().isEmpty() ? conditionsValid : conditionsInvalid)).setNameSupplier(() -> {
        if (this.stackedSpawner.getLastInvalidConditions().isEmpty()) {
            return this.getString("valid-spawn-conditions");
        } else {
            return this.getString("invalid-spawn-conditions");
        }
    }).setLoreSupplier(() -> {
        List<Class<? extends ConditionTag>> invalidConditions = this.stackedSpawner.getLastInvalidConditions();
        if (invalidConditions.isEmpty())
            return Collections.singletonList(this.getString("entities-can-spawn"));
        List<GuiString> lore = new ArrayList<>();
        lore.add(this.getString("conditions-preventing-spawns"));
        for (Class<? extends ConditionTag> conditionTagClass : invalidConditions) lore.add(GuiFactory.createString(ConditionTags.getErrorMessage(conditionTagClass, this.localeManager)));
        return lore;
    }));
    this.guiContainer.addScreen(mainScreen);
    this.guiFramework.getGuiManager().registerGui(this.guiContainer);
}
Also used : SpawnerStackSettings(dev.rosewood.rosestacker.stack.settings.SpawnerStackSettings) ConditionTag(dev.rosewood.rosestacker.spawner.conditions.ConditionTag) Material(org.bukkit.Material) StackSettingManager(dev.rosewood.rosestacker.manager.StackSettingManager) GuiString(dev.rosewood.guiframework.gui.GuiString) StackedSpawnerTile(dev.rosewood.rosestacker.nms.spawner.StackedSpawnerTile) GuiScreen(dev.rosewood.guiframework.gui.screen.GuiScreen) ArrayList(java.util.ArrayList) List(java.util.List) ItemStack(org.bukkit.inventory.ItemStack) ItemMeta(org.bukkit.inventory.meta.ItemMeta)

Example 2 with ConditionTag

use of dev.rosewood.rosestacker.spawner.conditions.ConditionTag in project RoseStacker by Rosewood-Development.

the class ItemSpawningMethod method spawn.

@Override
public void spawn(StackedSpawner stackedSpawner) {
    StackedSpawnerTile spawnerTile = stackedSpawner.getSpawnerTile();
    SpawnerStackSettings stackSettings = stackedSpawner.getStackSettings();
    // Mob spawning logic
    List<ConditionTag> spawnRequirements = new ArrayList<>();
    // Check general spawner conditions // TODO
    List<ConditionTag> perSpawnConditions = spawnRequirements.stream().filter(ConditionTag::isRequiredPerSpawn).collect(Collectors.toList());
    spawnRequirements.removeAll(perSpawnConditions);
    Set<ConditionTag> invalidSpawnConditions = spawnRequirements.stream().filter(x -> !x.check(stackedSpawner, stackedSpawner.getBlock())).collect(Collectors.toSet());
    if (Setting.SPAWNER_SPAWN_ONLY_PLAYER_PLACED.getBoolean() && !stackedSpawner.isPlacedByPlayer())
        invalidSpawnConditions.add(NotPlayerPlacedConditionTag.INSTANCE);
    boolean passedSpawnerChecks = invalidSpawnConditions.isEmpty();
    // Will be removed when they pass
    invalidSpawnConditions.addAll(perSpawnConditions);
    // Spawn the items
    int spawnAmount;
    if (Setting.SPAWNER_SPAWN_COUNT_STACK_SIZE_RANDOMIZED.getBoolean()) {
        if (stackSettings.getSpawnCountStackSizeMultiplier() != -1) {
            int spawnerSpawnCount = Math.max(spawnerTile.getSpawnCount(), 0);
            spawnAmount = StackerUtils.randomInRange(stackedSpawner.getStackSize(), spawnerSpawnCount);
        } else {
            spawnAmount = this.random.nextInt(spawnerTile.getSpawnCount()) + 1;
        }
    } else {
        spawnAmount = spawnerTile.getSpawnCount();
    }
    Bukkit.getScheduler().runTaskAsynchronously(RoseStacker.getInstance(), () -> {
        Set<Location> spawnLocations = new HashSet<>();
        int spawnRange = spawnerTile.getSpawnRange();
        for (int i = 0; i < spawnAmount; i++) {
            int attempts = 0;
            while (attempts < Setting.SPAWNER_MAX_FAILED_SPAWN_ATTEMPTS.getInt()) {
                int xOffset = this.random.nextInt(spawnRange * 2 + 1) - spawnRange;
                int yOffset = !Setting.SPAWNER_USE_VERTICAL_SPAWN_RANGE.getBoolean() ? this.random.nextInt(3) - 1 : this.random.nextInt(spawnRange * 2 + 1) - spawnRange;
                int zOffset = this.random.nextInt(spawnRange * 2 + 1) - spawnRange;
                Location spawnLocation = stackedSpawner.getLocation().clone().add(xOffset + 0.5, yOffset, zOffset + 0.5);
                Block target = stackedSpawner.getLocation().clone().add(xOffset, yOffset, zOffset).getBlock();
                boolean invalid = false;
                for (ConditionTag conditionTag : perSpawnConditions) {
                    if (!conditionTag.check(stackedSpawner, target)) {
                        invalid = true;
                    } else {
                        invalidSpawnConditions.remove(conditionTag);
                    }
                }
                if (invalid) {
                    attempts++;
                    continue;
                }
                if (!passedSpawnerChecks)
                    break;
                spawnLocations.add(spawnLocation);
                break;
            }
        }
        int successfulSpawns = spawnLocations.size() > 0 ? spawnAmount : 0;
        // Drop items
        Bukkit.getScheduler().runTask(RoseStacker.getInstance(), () -> {
            // Assign each location a portion of the total items to drop
            int amountPerLocation = (int) Math.ceil((double) spawnAmount / spawnLocations.size());
            int amountLeft = spawnAmount;
            for (Location location : spawnLocations) {
                int amount = Math.min(amountPerLocation, amountLeft);
                amountLeft -= amount;
                for (ItemStack itemStack : GuiUtil.getMaterialAmountAsItemStacks(this.itemType, amount)) stackedSpawner.getWorld().dropItemNaturally(location.clone().add(0.5, 0.5, 0.5), itemStack);
                stackedSpawner.getWorld().spawnParticle(Particle.EXPLOSION_NORMAL, location.clone().add(0, 0.75, 0), 2, 0.25, 0.25, 0.25, 0.01);
            }
        });
        stackedSpawner.getLastInvalidConditions().clear();
        if (successfulSpawns <= 0) {
            if (invalidSpawnConditions.isEmpty()) {
                stackedSpawner.getLastInvalidConditions().add(NoneConditionTag.class);
            } else {
                List<Class<? extends ConditionTag>> invalidSpawnConditionClasses = new ArrayList<>();
                for (ConditionTag conditionTag : invalidSpawnConditions) invalidSpawnConditionClasses.add(conditionTag.getClass());
                stackedSpawner.getLastInvalidConditions().addAll(invalidSpawnConditionClasses);
            }
            // Spawn particles indicating the spawn did not occur
            stackedSpawner.getWorld().spawnParticle(Particle.SMOKE_NORMAL, stackedSpawner.getLocation().clone().add(0.5, 0.5, 0.5), 50, 0.5, 0.5, 0.5, 0);
        } else {
            // Spawn particles indicating the spawn occurred
            stackedSpawner.getWorld().spawnParticle(Particle.FLAME, stackedSpawner.getLocation().clone().add(0.5, 0.5, 0.5), 50, 0.5, 0.5, 0.5, 0);
            Bukkit.getScheduler().runTask(RoseStacker.getInstance(), () -> {
                if (stackedSpawner.getBlock().getType() == Material.SPAWNER)
                    PersistentDataUtils.increaseSpawnCount(spawnerTile, successfulSpawns);
            });
        }
    });
}
Also used : Setting(dev.rosewood.rosestacker.manager.ConfigurationManager.Setting) ConditionTag(dev.rosewood.rosestacker.spawner.conditions.ConditionTag) RoseStacker(dev.rosewood.rosestacker.RoseStacker) NoneConditionTag(dev.rosewood.rosestacker.spawner.conditions.tags.NoneConditionTag) Set(java.util.Set) Random(java.util.Random) StackedSpawner(dev.rosewood.rosestacker.stack.StackedSpawner) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) ItemStack(org.bukkit.inventory.ItemStack) HashSet(java.util.HashSet) Particle(org.bukkit.Particle) List(java.util.List) Block(org.bukkit.block.Block) GuiUtil(dev.rosewood.guiframework.framework.util.GuiUtil) Location(org.bukkit.Location) NotPlayerPlacedConditionTag(dev.rosewood.rosestacker.spawner.conditions.tags.NotPlayerPlacedConditionTag) StackedSpawnerTile(dev.rosewood.rosestacker.nms.spawner.StackedSpawnerTile) PersistentDataUtils(dev.rosewood.rosestacker.utils.PersistentDataUtils) StackerUtils(dev.rosewood.rosestacker.utils.StackerUtils) Material(org.bukkit.Material) SpawnerStackSettings(dev.rosewood.rosestacker.stack.settings.SpawnerStackSettings) Bukkit(org.bukkit.Bukkit) SpawnerStackSettings(dev.rosewood.rosestacker.stack.settings.SpawnerStackSettings) ConditionTag(dev.rosewood.rosestacker.spawner.conditions.ConditionTag) NoneConditionTag(dev.rosewood.rosestacker.spawner.conditions.tags.NoneConditionTag) NotPlayerPlacedConditionTag(dev.rosewood.rosestacker.spawner.conditions.tags.NotPlayerPlacedConditionTag) ArrayList(java.util.ArrayList) StackedSpawnerTile(dev.rosewood.rosestacker.nms.spawner.StackedSpawnerTile) Block(org.bukkit.block.Block) ItemStack(org.bukkit.inventory.ItemStack) Location(org.bukkit.Location) HashSet(java.util.HashSet)

Example 3 with ConditionTag

use of dev.rosewood.rosestacker.spawner.conditions.ConditionTag in project RoseStacker by Rosewood-Development.

the class MobSpawningMethod method spawn.

@Override
public void spawn(StackedSpawner stackedSpawner) {
    StackedSpawnerTile spawnerTile = stackedSpawner.getSpawnerTile();
    SpawnerStackSettings stackSettings = stackedSpawner.getStackSettings();
    // Mob spawning logic
    List<ConditionTag> spawnRequirements = new ArrayList<>(stackSettings.getSpawnRequirements());
    // Check general spawner conditions
    List<ConditionTag> perSpawnConditions = spawnRequirements.stream().filter(ConditionTag::isRequiredPerSpawn).collect(Collectors.toList());
    spawnRequirements.removeAll(perSpawnConditions);
    Set<ConditionTag> invalidSpawnConditions = spawnRequirements.stream().filter(x -> !x.check(stackedSpawner, stackedSpawner.getBlock())).collect(Collectors.toSet());
    if (Setting.SPAWNER_SPAWN_ONLY_PLAYER_PLACED.getBoolean() && !stackedSpawner.isPlacedByPlayer())
        invalidSpawnConditions.add(NotPlayerPlacedConditionTag.INSTANCE);
    boolean passedSpawnerChecks = invalidSpawnConditions.isEmpty();
    // Will be removed when they pass
    invalidSpawnConditions.addAll(perSpawnConditions);
    // Spawn the mobs
    int spawnAmount;
    if (Setting.SPAWNER_SPAWN_COUNT_STACK_SIZE_RANDOMIZED.getBoolean()) {
        if (stackSettings.getSpawnCountStackSizeMultiplier() != -1) {
            int spawnerSpawnCount = Math.max(spawnerTile.getSpawnCount(), 0);
            spawnAmount = StackerUtils.randomInRange(stackedSpawner.getStackSize(), spawnerSpawnCount);
        } else {
            spawnAmount = this.random.nextInt(spawnerTile.getSpawnCount()) + 1;
        }
    } else {
        spawnAmount = spawnerTile.getSpawnCount();
    }
    EntityCacheManager entityCacheManager = RoseStacker.getInstance().getManager(EntityCacheManager.class);
    StackManager stackManager = RoseStacker.getInstance().getManager(StackManager.class);
    Bukkit.getScheduler().runTaskAsynchronously(RoseStacker.getInstance(), () -> {
        Set<Location> spawnLocations = new HashSet<>();
        int spawnRange = spawnerTile.getSpawnRange();
        for (int i = 0; i < spawnAmount; i++) {
            int attempts = 0;
            while (attempts < Setting.SPAWNER_MAX_FAILED_SPAWN_ATTEMPTS.getInt()) {
                int xOffset = this.random.nextInt(spawnRange * 2 + 1) - spawnRange;
                int yOffset = !Setting.SPAWNER_USE_VERTICAL_SPAWN_RANGE.getBoolean() ? this.random.nextInt(3) - 1 : this.random.nextInt(spawnRange * 2 + 1) - spawnRange;
                int zOffset = this.random.nextInt(spawnRange * 2 + 1) - spawnRange;
                Location spawnLocation = stackedSpawner.getLocation().clone().add(xOffset + 0.5, yOffset, zOffset + 0.5);
                Block target = stackedSpawner.getLocation().clone().add(xOffset, yOffset, zOffset).getBlock();
                boolean invalid = false;
                for (ConditionTag conditionTag : perSpawnConditions) {
                    if (!conditionTag.check(stackedSpawner, target)) {
                        invalid = true;
                    } else {
                        invalidSpawnConditions.remove(conditionTag);
                    }
                }
                if (invalid) {
                    attempts++;
                    continue;
                }
                if (!passedSpawnerChecks)
                    break;
                spawnLocations.add(spawnLocation);
                break;
            }
        }
        EntityType entityType = stackedSpawner.getSpawnerTile().getSpawnedType();
        Predicate<Entity> predicate = entity -> entity.getType() == entityType;
        Collection<Entity> nearbyEntities = entityCacheManager.getNearbyEntities(stackedSpawner.getLocation(), stackSettings.getSpawnRange(), predicate);
        List<StackedEntity> nearbyStackedEntities = new ArrayList<>();
        for (Entity entity : nearbyEntities) {
            StackedEntity stackedEntity = stackManager.getStackedEntity((LivingEntity) entity);
            if (stackedEntity != null)
                nearbyStackedEntities.add(stackedEntity);
        }
        int successfulSpawns = this.spawnEntitiesIntoNearbyStacks(stackedSpawner, spawnAmount, spawnLocations, nearbyStackedEntities, stackManager);
        stackedSpawner.getLastInvalidConditions().clear();
        if (successfulSpawns <= 0) {
            if (invalidSpawnConditions.isEmpty()) {
                stackedSpawner.getLastInvalidConditions().add(NoneConditionTag.class);
            } else {
                List<Class<? extends ConditionTag>> invalidSpawnConditionClasses = new ArrayList<>();
                for (ConditionTag conditionTag : invalidSpawnConditions) invalidSpawnConditionClasses.add(conditionTag.getClass());
                stackedSpawner.getLastInvalidConditions().addAll(invalidSpawnConditionClasses);
            }
            // Spawn particles indicating the spawn did not occur
            stackedSpawner.getWorld().spawnParticle(Particle.SMOKE_NORMAL, stackedSpawner.getLocation().clone().add(0.5, 0.5, 0.5), 50, 0.5, 0.5, 0.5, 0);
        } else {
            // Spawn particles indicating the spawn occurred
            stackedSpawner.getWorld().spawnParticle(Particle.FLAME, stackedSpawner.getLocation().clone().add(0.5, 0.5, 0.5), 50, 0.5, 0.5, 0.5, 0);
            Bukkit.getScheduler().runTask(RoseStacker.getInstance(), () -> {
                if (stackedSpawner.getBlock().getType() == Material.SPAWNER)
                    PersistentDataUtils.increaseSpawnCount(spawnerTile, successfulSpawns);
            });
        }
    });
}
Also used : RoseStacker(dev.rosewood.rosestacker.RoseStacker) WorldGuardHook(dev.rosewood.rosestacker.hook.WorldGuardHook) StackedEntity(dev.rosewood.rosestacker.stack.StackedEntity) NoneConditionTag(dev.rosewood.rosestacker.spawner.conditions.tags.NoneConditionTag) Random(java.util.Random) SpawnerSpawnEvent(org.bukkit.event.entity.SpawnerSpawnEvent) StackedSpawner(dev.rosewood.rosestacker.stack.StackedSpawner) ArrayList(java.util.ArrayList) EntityStackSettings(dev.rosewood.rosestacker.stack.settings.EntityStackSettings) HashSet(java.util.HashSet) StackSettingManager(dev.rosewood.rosestacker.manager.StackSettingManager) Block(org.bukkit.block.Block) Location(org.bukkit.Location) NotPlayerPlacedConditionTag(dev.rosewood.rosestacker.spawner.conditions.tags.NotPlayerPlacedConditionTag) World(org.bukkit.World) NMSHandler(dev.rosewood.rosestacker.nms.NMSHandler) StackedSpawnerTile(dev.rosewood.rosestacker.nms.spawner.StackedSpawnerTile) PersistentDataUtils(dev.rosewood.rosestacker.utils.PersistentDataUtils) Material(org.bukkit.Material) Ageable(org.bukkit.entity.Ageable) Bukkit(org.bukkit.Bukkit) Setting(dev.rosewood.rosestacker.manager.ConfigurationManager.Setting) ConditionTag(dev.rosewood.rosestacker.spawner.conditions.ConditionTag) Entity(org.bukkit.entity.Entity) Predicate(java.util.function.Predicate) CreatureSpawnEvent(org.bukkit.event.entity.CreatureSpawnEvent) Collection(java.util.Collection) Set(java.util.Set) EntityType(org.bukkit.entity.EntityType) LivingEntity(org.bukkit.entity.LivingEntity) EntityCacheManager(dev.rosewood.rosestacker.manager.EntityCacheManager) Collectors(java.util.stream.Collectors) Particle(org.bukkit.Particle) Vector(org.bukkit.util.Vector) StackManager(dev.rosewood.rosestacker.manager.StackManager) SpawnerFlagPersistenceHook(dev.rosewood.rosestacker.hook.SpawnerFlagPersistenceHook) List(java.util.List) Optional(java.util.Optional) StackerUtils(dev.rosewood.rosestacker.utils.StackerUtils) NMSAdapter(dev.rosewood.rosestacker.nms.NMSAdapter) SpawnerStackSettings(dev.rosewood.rosestacker.stack.settings.SpawnerStackSettings) SpawnerStackSettings(dev.rosewood.rosestacker.stack.settings.SpawnerStackSettings) StackedEntity(dev.rosewood.rosestacker.stack.StackedEntity) Entity(org.bukkit.entity.Entity) LivingEntity(org.bukkit.entity.LivingEntity) StackedEntity(dev.rosewood.rosestacker.stack.StackedEntity) NoneConditionTag(dev.rosewood.rosestacker.spawner.conditions.tags.NoneConditionTag) NotPlayerPlacedConditionTag(dev.rosewood.rosestacker.spawner.conditions.tags.NotPlayerPlacedConditionTag) ConditionTag(dev.rosewood.rosestacker.spawner.conditions.ConditionTag) StackManager(dev.rosewood.rosestacker.manager.StackManager) ArrayList(java.util.ArrayList) EntityCacheManager(dev.rosewood.rosestacker.manager.EntityCacheManager) StackedSpawnerTile(dev.rosewood.rosestacker.nms.spawner.StackedSpawnerTile) EntityType(org.bukkit.entity.EntityType) Block(org.bukkit.block.Block) Location(org.bukkit.Location) HashSet(java.util.HashSet)

Aggregations

StackedSpawnerTile (dev.rosewood.rosestacker.nms.spawner.StackedSpawnerTile)3 ConditionTag (dev.rosewood.rosestacker.spawner.conditions.ConditionTag)3 SpawnerStackSettings (dev.rosewood.rosestacker.stack.settings.SpawnerStackSettings)3 ArrayList (java.util.ArrayList)3 List (java.util.List)3 Material (org.bukkit.Material)3 RoseStacker (dev.rosewood.rosestacker.RoseStacker)2 Setting (dev.rosewood.rosestacker.manager.ConfigurationManager.Setting)2 StackSettingManager (dev.rosewood.rosestacker.manager.StackSettingManager)2 NoneConditionTag (dev.rosewood.rosestacker.spawner.conditions.tags.NoneConditionTag)2 NotPlayerPlacedConditionTag (dev.rosewood.rosestacker.spawner.conditions.tags.NotPlayerPlacedConditionTag)2 StackedSpawner (dev.rosewood.rosestacker.stack.StackedSpawner)2 PersistentDataUtils (dev.rosewood.rosestacker.utils.PersistentDataUtils)2 StackerUtils (dev.rosewood.rosestacker.utils.StackerUtils)2 HashSet (java.util.HashSet)2 Random (java.util.Random)2 Set (java.util.Set)2 Collectors (java.util.stream.Collectors)2 Bukkit (org.bukkit.Bukkit)2 Location (org.bukkit.Location)2