mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-14 15:34:43 +00:00
35 lines
937 B
Java
35 lines
937 B
Java
package noppes.npcs.api;
|
|
|
|
import net.minecraft.util.DamageSource;
|
|
import noppes.npcs.api.entity.IEntity;
|
|
|
|
public interface IDamageSource {
|
|
/**
|
|
*
|
|
* @return The damage type of the damage source as a string. Ex: "lava", "explosion", "magic", "outOfWorld", etc.
|
|
*/
|
|
String getType();
|
|
|
|
boolean isUnblockable();
|
|
|
|
boolean isProjectile();
|
|
|
|
/**
|
|
*
|
|
* @return The entity source of where the damage source originated. If a player was shot by an arrow from a skeleton, this would return an IEntity object of the skeleton.
|
|
*/
|
|
IEntity getTrueSource();
|
|
|
|
/**
|
|
*
|
|
* @return The entity source of where the damage source originated. If a player was shot by an arrow from a skeleton, this would return an IEntity object of the arrow.
|
|
*/
|
|
IEntity getImmediateSource();
|
|
|
|
/**
|
|
*
|
|
* @return An obfuscated MC damage source object.
|
|
*/
|
|
DamageSource getMCDamageSource();
|
|
}
|