Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.world.damage.DamageSources;

Name: anvil

Return Type: DamageSource

ZenScript
Copy
DamageSources.anvil(entity as Entity) as DamageSource
ParameterType
Parameter
entity
Type
Entity

Name: arrow

Return Type: DamageSource

ZenScript
Copy
DamageSources.arrow(arrow as Arrow, cause as Entity) as DamageSource
ParameterTypeOptional
Parameter
arrow
Type
Arrow
Optional
false
Parameter
cause
Type
Entity
Optional
true

Link to badRespawnPointExplosion

Name: badRespawnPointExplosion

Return Type: DamageSource

ZenScript
Copy
DamageSources.badRespawnPointExplosion(position as Vec3) as DamageSource
ParameterType
Parameter
position
Type
Vec3

Name: explosion

Return Type: DamageSource

ZenScript
Copy
DamageSources.explosion(explosion as Explosion) as DamageSource
ParameterTypeOptional
Parameter
explosion
Type
Explosion
Optional
true

Name: explosion

Return Type: DamageSource

ZenScript
Copy
DamageSources.explosion(entity as Entity, cause as Entity) as DamageSource
ParameterTypeOptional
Parameter
entity
Type
Entity
Optional
true
Parameter
cause
Type
Entity
Optional
true

Name: fallingBlock

Return Type: DamageSource

ZenScript
Copy
DamageSources.fallingBlock(entity as Entity) as DamageSource
ParameterType
Parameter
entity
Type
Entity

Link to fallingStalactite

Name: fallingStalactite

Return Type: DamageSource

ZenScript
Copy
DamageSources.fallingStalactite(entity as Entity) as DamageSource
ParameterType
Parameter
entity
Type
Entity

Name: fireball

Return Type: DamageSource

ZenScript
Copy
DamageSources.fireball(entity as Fireball, cause as Entity) as DamageSource
ParameterTypeOptional
Parameter
entity
Type
Fireball
Optional
false
Parameter
cause
Type
Entity
Optional
true

Name: fireworks

Return Type: DamageSource

ZenScript
Copy
DamageSources.fireworks(entity as FireworkRocketEntity, cause as Entity) as DamageSource
ParameterTypeOptional
Parameter
entity
Type
FireworkRocketEntity
Optional
false
Parameter
cause
Type
Entity
Optional
true

Name: indirectMagic

Return Type: DamageSource

ZenScript
Copy
DamageSources.indirectMagic(entity as Entity, cause as Entity) as DamageSource
ParameterTypeOptional
Parameter
entity
Type
Entity
Optional
false
Parameter
cause
Type
Entity
Optional
true

Name: mobAttack

Return Type: DamageSource

ZenScript
Copy
DamageSources.mobAttack(entity as LivingEntity) as DamageSource
ParameterType
Parameter
entity
Type
LivingEntity

Name: mobProjectile

Return Type: DamageSource

ZenScript
Copy
DamageSources.mobProjectile(entity as Entity, cause as LivingEntity) as DamageSource
ParameterTypeOptional
Parameter
entity
Type
Entity
Optional
false
Parameter
cause
Type
LivingEntity
Optional
true

Link to noAggroMobAttack

Name: noAggroMobAttack

Return Type: DamageSource

ZenScript
Copy
DamageSources.noAggroMobAttack(entity as LivingEntity) as DamageSource
ParameterType
Parameter
entity
Type
LivingEntity

Name: playerAttack

Return Type: DamageSource

ZenScript
Copy
DamageSources.playerAttack(player as Player) as DamageSource
ParameterType
Parameter
player
Type
Player

Name: sonicBoom

Return Type: DamageSource

ZenScript
Copy
DamageSources.sonicBoom(entity as Entity) as DamageSource
ParameterType
Parameter
entity
Type
Entity

Name: sting

Return Type: DamageSource

ZenScript
Copy
DamageSources.sting(entity as LivingEntity) as DamageSource
ParameterType
Parameter
entity
Type
LivingEntity

Name: thorns

Return Type: DamageSource

ZenScript
Copy
DamageSources.thorns(entity as Entity) as DamageSource
ParameterType
Parameter
entity
Type
Entity

Name: thrown

Return Type: DamageSource

ZenScript
Copy
DamageSources.thrown(entity as Entity, cause as Entity) as DamageSource
ParameterTypeOptional
Parameter
entity
Type
Entity
Optional
false
Parameter
cause
Type
Entity
Optional
true

Name: trident

Return Type: DamageSource

ZenScript
Copy
DamageSources.trident(entity as Entity, cause as Entity) as DamageSource
ParameterTypeOptional
Parameter
entity
Type
Entity
Optional
false
Parameter
cause
Type
Entity
Optional
true

Name: witherSkull

Return Type: DamageSource

ZenScript
Copy
DamageSources.witherSkull(entity as WitherSkull, cause as Entity) as DamageSource
ParameterType
Parameter
entity
Type
WitherSkull
Parameter
cause
Type
Entity
NameTypeHas GetterHas Setter
Name
‚Äč
Type
DamageSource
Has Getter
true
Has Setter
false
Name
cactus
Type
DamageSource
Has Getter
true
Has Setter
false
Name
cramming
Type
DamageSource
Has Getter
true
Has Setter
false
Name
dragonBreath
Type
DamageSource
Has Getter
true
Has Setter
false
Name
drown
Type
DamageSource
Has Getter
true
Has Setter
false
Name
dryOut
Type
DamageSource
Has Getter
true
Has Setter
false
Name
fall
Type
DamageSource
Has Getter
true
Has Setter
false
Name
fellOutOfWorld
Type
DamageSource
Has Getter
true
Has Setter
false
Name
flyIntoWall
Type
DamageSource
Has Getter
true
Has Setter
false
Name
freeze
Type
DamageSource
Has Getter
true
Has Setter
false
Name
generic
Type
DamageSource
Has Getter
true
Has Setter
false
Name
hotFloor
Type
DamageSource
Has Getter
true
Has Setter
false
Name
inFire
Type
DamageSource
Has Getter
true
Has Setter
false
Name
inWall
Type
DamageSource
Has Getter
true
Has Setter
false
Name
lava
Type
DamageSource
Has Getter
true
Has Setter
false
Name
lightningBolt
Type
DamageSource
Has Getter
true
Has Setter
false
Name
magic
Type
DamageSource
Has Getter
true
Has Setter
false
Name
onFire
Type
DamageSource
Has Getter
true
Has Setter
false
Name
stalagmite
Type
DamageSource
Has Getter
true
Has Setter
false
Name
starve
Type
DamageSource
Has Getter
true
Has Setter
false
Name
sweetBerryBush
Type
DamageSource
Has Getter
true
Has Setter
false
Name
wither
Type
DamageSource
Has Getter
true
Has Setter
false