DamageSources

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.world.damage.DamageSources;

Members

anvil(entity as Entity) as DamageSource
script.zs
// DamageSources.anvil(entity as Entity) as DamageSource;
myDamageSources.anvil(myEntity);

Parameters:

entity Type: Entity

Return Type: DamageSource

arrow(arrow as AbstractArrow, cause as Entity = null) as DamageSource
script.zs
// DamageSources.arrow(arrow as AbstractArrow, cause as Entity = null) as DamageSource;
myDamageSources.arrow(myAbstractArrow, myEntity);

Parameters:

arrow Type: Arrow
cause (optional) Type: Entity

Default Value: null

Return Type: DamageSource

badRespawnPointExplosion(position as Vec3) as DamageSource
script.zs
// DamageSources.badRespawnPointExplosion(position as Vec3) as DamageSource;
myDamageSources.badRespawnPointExplosion(myVec3);

Parameters:

position Type: Vec3

Return Type: DamageSource

Getter
script.zs
// DamageSources.cactus as DamageSource
myDamageSources.cactus

Return Type: DamageSource

Getter
script.zs
// DamageSources.cramming as DamageSource
myDamageSources.cramming

Return Type: DamageSource

Getter
script.zs
// DamageSources.dragonBreath as DamageSource
myDamageSources.dragonBreath

Return Type: DamageSource

Getter
script.zs
// DamageSources.drown as DamageSource
myDamageSources.drown

Return Type: DamageSource

Getter
script.zs
// DamageSources.dryOut as DamageSource
myDamageSources.dryOut

Return Type: DamageSource

explosion(explosion as Explosion = null) as DamageSource
script.zs
// DamageSources.explosion(explosion as Explosion = null) as DamageSource;
myDamageSources.explosion(myExplosion);

Parameters:

explosion (optional) Type: Explosion

Default Value: null

Return Type: DamageSource

explosion(entity as Entity = null, cause as Entity = null) as DamageSource
script.zs
// DamageSources.explosion(entity as Entity = null, cause as Entity = null) as DamageSource;
myDamageSources.explosion(myEntity, myEntity);

Parameters:

entity (optional) Type: Entity

Default Value: null

cause (optional) Type: Entity

Default Value: null

Return Type: DamageSource

Getter
script.zs
// DamageSources.fall as DamageSource
myDamageSources.fall

Return Type: DamageSource

fallingBlock(entity as Entity) as DamageSource
script.zs
// DamageSources.fallingBlock(entity as Entity) as DamageSource;
myDamageSources.fallingBlock(myEntity);

Parameters:

entity Type: Entity

Return Type: DamageSource

fallingStalactite(entity as Entity) as DamageSource
script.zs
// DamageSources.fallingStalactite(entity as Entity) as DamageSource;
myDamageSources.fallingStalactite(myEntity);

Parameters:

entity Type: Entity

Return Type: DamageSource

Getter
script.zs
// DamageSources.fellOutOfWorld as DamageSource
myDamageSources.fellOutOfWorld

Return Type: DamageSource

fireball(entity as Fireball, cause as Entity = null) as DamageSource
script.zs
// DamageSources.fireball(entity as Fireball, cause as Entity = null) as DamageSource;
myDamageSources.fireball(myFireball, myEntity);

Parameters:

entity Type: Fireball
cause (optional) Type: Entity

Default Value: null

Return Type: DamageSource

fireworks(entity as FireworkRocketEntity, cause as Entity = null) as DamageSource
script.zs
// DamageSources.fireworks(entity as FireworkRocketEntity, cause as Entity = null) as DamageSource;
myDamageSources.fireworks(myFireworkRocketEntity, myEntity);

Parameters:

cause (optional) Type: Entity

Default Value: null

Return Type: DamageSource

Getter
script.zs
// DamageSources.flyIntoWall as DamageSource
myDamageSources.flyIntoWall

Return Type: DamageSource

Getter
script.zs
// DamageSources.freeze as DamageSource
myDamageSources.freeze

Return Type: DamageSource

Getter
script.zs
// DamageSources.generic as DamageSource
myDamageSources.generic

Return Type: DamageSource

Getter
script.zs
// DamageSources.genericKill as DamageSource
myDamageSources.genericKill

Return Type: DamageSource

Getter
script.zs
// DamageSources.hotFloor as DamageSource
myDamageSources.hotFloor

Return Type: DamageSource

indirectMagic(entity as Entity, cause as Entity = null) as DamageSource
script.zs
// DamageSources.indirectMagic(entity as Entity, cause as Entity = null) as DamageSource;
myDamageSources.indirectMagic(myEntity, myEntity);

Parameters:

entity Type: Entity
cause (optional) Type: Entity

Default Value: null

Return Type: DamageSource

Getter
script.zs
// DamageSources.inFire as DamageSource
myDamageSources.inFire

Return Type: DamageSource

Getter
script.zs
// DamageSources.inWall as DamageSource
myDamageSources.inWall

Return Type: DamageSource

Getter
script.zs
// DamageSources.lava as DamageSource
myDamageSources.lava

Return Type: DamageSource

Getter
script.zs
// DamageSources.lightningBolt as DamageSource
myDamageSources.lightningBolt

Return Type: DamageSource

Getter
script.zs
// DamageSources.magic as DamageSource
myDamageSources.magic

Return Type: DamageSource

mobAttack(entity as LivingEntity) as DamageSource
script.zs
// DamageSources.mobAttack(entity as LivingEntity) as DamageSource;
myDamageSources.mobAttack(myLivingEntity);

Parameters:

entity Type: LivingEntity

Return Type: DamageSource

mobProjectile(entity as Entity, cause as LivingEntity = null) as DamageSource
script.zs
// DamageSources.mobProjectile(entity as Entity, cause as LivingEntity = null) as DamageSource;
myDamageSources.mobProjectile(myEntity, myLivingEntity);

Parameters:

entity Type: Entity
cause (optional) Type: LivingEntity

Default Value: null

Return Type: DamageSource

noAggroMobAttack(entity as LivingEntity) as DamageSource
script.zs
// DamageSources.noAggroMobAttack(entity as LivingEntity) as DamageSource;
myDamageSources.noAggroMobAttack(myLivingEntity);

Parameters:

entity Type: LivingEntity

Return Type: DamageSource

Getter
script.zs
// DamageSources.onFire as DamageSource
myDamageSources.onFire

Return Type: DamageSource

Getter
script.zs
// DamageSources.outOfBorder as DamageSource
myDamageSources.outOfBorder

Return Type: DamageSource

playerAttack(player as Player) as DamageSource
script.zs
// DamageSources.playerAttack(player as Player) as DamageSource;
myDamageSources.playerAttack(myPlayer);

Parameters:

player Type: Player

Return Type: DamageSource

sonicBoom(entity as Entity) as DamageSource
script.zs
// DamageSources.sonicBoom(entity as Entity) as DamageSource;
myDamageSources.sonicBoom(myEntity);

Parameters:

entity Type: Entity

Return Type: DamageSource

Getter
script.zs
// DamageSources.stalagmite as DamageSource
myDamageSources.stalagmite

Return Type: DamageSource

Getter
script.zs
// DamageSources.starve as DamageSource
myDamageSources.starve

Return Type: DamageSource

sting(entity as LivingEntity) as DamageSource
script.zs
// DamageSources.sting(entity as LivingEntity) as DamageSource;
myDamageSources.sting(myLivingEntity);

Parameters:

entity Type: LivingEntity

Return Type: DamageSource

Getter
script.zs
// DamageSources.sweetBerryBush as DamageSource
myDamageSources.sweetBerryBush

Return Type: DamageSource

thorns(entity as Entity) as DamageSource
script.zs
// DamageSources.thorns(entity as Entity) as DamageSource;
myDamageSources.thorns(myEntity);

Parameters:

entity Type: Entity

Return Type: DamageSource

thrown(entity as Entity, cause as Entity = null) as DamageSource
script.zs
// DamageSources.thrown(entity as Entity, cause as Entity = null) as DamageSource;
myDamageSources.thrown(myEntity, myEntity);

Parameters:

entity Type: Entity
cause (optional) Type: Entity

Default Value: null

Return Type: DamageSource

trident(entity as Entity, cause as Entity = null) as DamageSource
script.zs
// DamageSources.trident(entity as Entity, cause as Entity = null) as DamageSource;
myDamageSources.trident(myEntity, myEntity);

Parameters:

entity Type: Entity
cause (optional) Type: Entity

Default Value: null

Return Type: DamageSource

Getter
script.zs
// DamageSources.wither as DamageSource
myDamageSources.wither

Return Type: DamageSource

witherSkull(entity as WitherSkull, cause as Entity) as DamageSource
script.zs
// DamageSources.witherSkull(entity as WitherSkull, cause as Entity) as DamageSource;
myDamageSources.witherSkull(myWitherSkull, myEntity);

Parameters:

entity Type: WitherSkull
cause Type: Entity

Return Type: DamageSource