2020-04-15 14:22:03 +02:00
|
|
|
package com.minelittlepony.unicopia.entity;
|
2020-01-16 12:35:46 +01:00
|
|
|
|
2020-04-15 14:22:03 +02:00
|
|
|
import com.minelittlepony.unicopia.Race;
|
|
|
|
import com.minelittlepony.unicopia.util.InbtSerialisable;
|
2020-01-16 12:35:46 +01:00
|
|
|
|
|
|
|
import net.minecraft.entity.projectile.ProjectileEntity;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
2020-01-27 17:37:22 +01:00
|
|
|
public interface IEntity extends InbtSerialisable, Updatable {
|
2020-01-16 12:35:46 +01:00
|
|
|
Race getSpecies();
|
|
|
|
|
|
|
|
void setSpecies(Race race);
|
|
|
|
|
|
|
|
void onDimensionalTravel(int destinationDimension);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if this player is fully invisible.
|
|
|
|
* Held items and other effects will be hidden as well.
|
|
|
|
*/
|
|
|
|
default boolean isInvisible() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets whether this player should be invisible.
|
|
|
|
*/
|
|
|
|
default void setInvisible(boolean invisible) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-01-27 11:05:22 +01:00
|
|
|
* Called at the beginning of an update cycle.
|
2020-01-16 12:35:46 +01:00
|
|
|
*/
|
2020-01-27 17:37:22 +01:00
|
|
|
default boolean beforeUpdate() {
|
|
|
|
return false;
|
|
|
|
}
|
2020-01-16 12:35:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2020-01-27 11:05:22 +01:00
|
|
|
* Event triggered when this entity is hit by a projectile.
|
2020-01-16 12:35:46 +01:00
|
|
|
*/
|
|
|
|
default boolean onProjectileImpact(ProjectileEntity projectile) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when this player finishes eating food.
|
|
|
|
*/
|
|
|
|
default void onUse(ItemStack stack) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when this entity jumps
|
|
|
|
*/
|
|
|
|
default void onJump() {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|