2018-09-12 01:29:49 +02:00
|
|
|
package com.minelittlepony.unicopia.spell;
|
|
|
|
|
2018-09-16 00:45:44 +02:00
|
|
|
import com.minelittlepony.unicopia.player.IOwned;
|
|
|
|
|
2018-09-12 01:29:49 +02:00
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
import net.minecraft.entity.EntityLivingBase;
|
|
|
|
|
2018-09-16 00:45:44 +02:00
|
|
|
public interface ICaster<E extends EntityLivingBase> extends IOwned<E> {
|
2018-09-12 01:29:49 +02:00
|
|
|
void setEffect(IMagicEffect effect);
|
|
|
|
|
|
|
|
IMagicEffect getEffect();
|
|
|
|
|
|
|
|
default boolean hasEffect() {
|
|
|
|
return getEffect() != null;
|
|
|
|
}
|
|
|
|
|
2018-09-21 17:53:33 +02:00
|
|
|
/**
|
|
|
|
* Gets the entity directly responsible for casting.
|
|
|
|
*/
|
2018-09-12 01:29:49 +02:00
|
|
|
default Entity getEntity() {
|
|
|
|
return getOwner();
|
|
|
|
}
|
|
|
|
}
|