use of org.spongepowered.api.entity.living.monster.CaveSpider in project Skree by Skelril.
the class FreakyFourInstance method spawnCharlotteMinion.
private void spawnCharlotteMinion(Vector3d position) {
Entity entity = getRegion().getExtent().createEntity(EntityTypes.CAVE_SPIDER, position);
getRegion().getExtent().spawnEntity(entity, Cause.source(SpawnCause.builder().type(SpawnTypes.PLUGIN).build()).build());
Boss<CaveSpider, ZoneBossDetail<FreakyFourInstance>> boss = new Boss<>((CaveSpider) entity, new ZoneBossDetail<>(this));
charlotteMinions.add(boss);
charlotteManager.getMinionManager().bind(boss);
}
use of org.spongepowered.api.entity.living.monster.CaveSpider in project Skree by Skelril.
the class CharlotteMinionManager method handleDamage.
private void handleDamage() {
List<Instruction<DamageCondition, Boss<CaveSpider, ZoneBossDetail<FreakyFourInstance>>>> damageProcessor = getDamageProcessor();
damageProcessor.add((condition, boss) -> {
FreakyFourInstance inst = boss.getDetail().getZone();
Optional<Living> optBossEnt = inst.getBoss(FreakyFourBoss.CHARLOTTE);
if (optBossEnt.isPresent()) {
EntityHealthUtil.heal(optBossEnt.get(), condition.getEvent().getBaseDamage());
}
return Optional.empty();
});
}
Aggregations