IDamageSource
An IDamageSource object is the source of damage to an entity.
Importing the class
It might be required to import the class to avoid errors.
import crafttweaker.damage.IDamageSource;
Zengetters and ZenMethods without parameters
ZenGetter | ZenMethod | Return Type |
---|---|---|
ZenGetter harmInCreative | ZenMethod canHarmInCreative(); | Return Type bool |
ZenGetter damageType | ZenMethod getDamageType(); | Return Type string |
ZenGetter hungerDamage | ZenMethod getHungerDamage(); | Return Type float |
ZenGetter immediateSource | ZenMethod getImmediateSource(); | Return Type IEntity |
ZenGetter trueSource | ZenMethod getTrueSource(); | Return Type IEntity |
ZenGetter creativePlayer | ZenMethod isCreativePlayer(); | Return Type bool |
ZenGetter damageLocation | ZenMethod getDamageLocation(); | Return Type IVector3d |
ZenGetter damageAbsolute | ZenMethod isDamageAbsolute(); | Return Type bool |
ZenGetter damageUnblockable | ZenMethod isDamageUnblockable(); | Return Type bool |
ZenGetter difficultyScaled | ZenMethod isDifficultyScaled(); | Return Type bool |
ZenGetter explosion | ZenMethod isExplosion(); | Return Type bool |
ZenGetter fireDamage | ZenMethod isFireDamage(); | Return Type bool |
ZenGetter magicDamage | ZenMethod isMagicDamage(); | Return Type bool |
ZenGetter projectile | ZenMethod isProjectile(); | Return Type bool |
ZenGetter | ZenMethod setDamageAllowedInCreativeMode(); | Return Type IDamageSource |
ZenGetter | ZenMethod setDamageBypassesArmor(); | Return Type IDamageSource |
ZenGetter | ZenMethod setDamageIsAbsolute(); | Return Type IDamageSource |
ZenGetter | ZenMethod setDifficultyScaled(); | Return Type IDamageSource |
ZenGetter | ZenMethod setExplosion(); | Return Type IDamageSource |
ZenGetter | ZenMethod setFireDamage(); | Return Type IDamageSource |
ZenGetter | ZenMethod setMagicDamage(); | Return Type IDamageSource |
ZenGetter | ZenMethod setProjectile(); | Return Type IDamageSource |
ZenMethod with Parameters
- getDeathMessage(IEntity entity); → Returns a string containing the death message for the entity if it dies by this damageSource
Getting an IDamageSource Object
You can either use these methods or the Damage Source Bracket Handler.