Search in sources :

Example 1 with ArmorEquipable

use of org.spongepowered.api.entity.ArmorEquipable in project Skree by Skelril.

the class SnipeeBossManager method handleBinds.

private void handleBinds() {
    List<Instruction<BindCondition, Boss<Living, ZoneBossDetail<FreakyFourInstance>>>> bindProcessor = getBindProcessor();
    bindProcessor.add(new NamedBindInstruction<>("Snipee"));
    bindProcessor.add(new HealthBindInstruction<>(config.snipeeHP));
    bindProcessor.add((condition, boss) -> {
        Living entity = boss.getTargetEntity().get();
        if (entity instanceof ArmorEquipable) {
            ((ArmorEquipable) entity).setItemInHand(HandTypes.MAIN_HAND, newItemStack(ItemTypes.BOW));
        }
        return Optional.empty();
    });
}
Also used : ArmorEquipable(org.spongepowered.api.entity.ArmorEquipable) Living(org.spongepowered.api.entity.living.Living) NamedBindInstruction(com.skelril.skree.content.zone.group.catacombs.instruction.bossmove.NamedBindInstruction) Instruction(com.skelril.openboss.Instruction) HealthBindInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealthBindInstruction) HealableInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealableInstruction) BackTeleportInstruction(com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.BackTeleportInstruction) ZoneBossDetail(com.skelril.skree.content.zone.ZoneBossDetail)

Aggregations

Instruction (com.skelril.openboss.Instruction)1 ZoneBossDetail (com.skelril.skree.content.zone.ZoneBossDetail)1 NamedBindInstruction (com.skelril.skree.content.zone.group.catacombs.instruction.bossmove.NamedBindInstruction)1 BackTeleportInstruction (com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.BackTeleportInstruction)1 HealableInstruction (com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealableInstruction)1 HealthBindInstruction (com.skelril.skree.content.zone.group.freakyfour.boss.bossmove.HealthBindInstruction)1 ArmorEquipable (org.spongepowered.api.entity.ArmorEquipable)1 Living (org.spongepowered.api.entity.living.Living)1