Unicopia/src/main/java/com/minelittlepony/unicopia/spell/ICaster.java

24 lines
542 B
Java
Raw Normal View History

2018-09-12 01:29:49 +02:00
package com.minelittlepony.unicopia.spell;
import com.minelittlepony.unicopia.player.IOwned;
2018-09-12 01:29:49 +02:00
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
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;
}
/**
* Gets the entity directly responsible for casting.
*/
2018-09-12 01:29:49 +02:00
default Entity getEntity() {
return getOwner();
}
}