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.DamageSource;

Link to g-

Name: getDirectEntity

Return Type: Entity

ZenScript
Copy
// DamageSource.getDirectEntity() as Entity

myDamageSource.getDirectEntity();

Link to g--1

Name: getEntity

Return Type: Entity

ZenScript
Copy
// DamageSource.getEntity() as Entity

myDamageSource.getEntity();

Link to g--2

Name: getFoodExhaustion

Return Type: float

ZenScript
Copy
// DamageSource.getFoodExhaustion() as float

myDamageSource.getFoodExhaustion();

Link to g--3

Name: getLocalizedDeathMessage

Return Type: Component

ZenScript
Copy
DamageSource.getLocalizedDeathMessage(entity as LivingEntity) as Component
ParameterTypeDescription
Parameter
entity
Type
LivingEntity
Description
No Description Provided

Link to g--4

Name: getMsgId

Return Type: string

ZenScript
Copy
// DamageSource.getMsgId() as string

myDamageSource.getMsgId();

Link to g--5

Name: getSourcePosition

Return Type: Vec3

ZenScript
Copy
// DamageSource.getSourcePosition() as Vec3

myDamageSource.getSourcePosition();

Link to g--6

Name: isBypassArmor

Return Type: boolean

ZenScript
Copy
// DamageSource.isBypassArmor() as boolean

myDamageSource.isBypassArmor();

Link to g--7

Name: isBypassInvul

Return Type: boolean

ZenScript
Copy
// DamageSource.isBypassInvul() as boolean

myDamageSource.isBypassInvul();

Link to g--8

Name: isBypassMagic

Return Type: boolean

ZenScript
Copy
// DamageSource.isBypassMagic() as boolean

myDamageSource.isBypassMagic();

Link to g--9

Name: isCreativePlayer

Return Type: boolean

ZenScript
Copy
// DamageSource.isCreativePlayer() as boolean

myDamageSource.isCreativePlayer();

Link to g--10

Name: isDamageHelmet

Return Type: boolean

ZenScript
Copy
// DamageSource.isDamageHelmet() as boolean

myDamageSource.isDamageHelmet();

Link to g--11

Name: isExplosion

Return Type: boolean

ZenScript
Copy
// DamageSource.isExplosion() as boolean

myDamageSource.isExplosion();

Name: isFall

Return Type: boolean

ZenScript
Copy
// DamageSource.isFall() as boolean

myDamageSource.isFall();

Name: isFire

Return Type: boolean

ZenScript
Copy
// DamageSource.isFire() as boolean

myDamageSource.isFire();

Name: isMagic

Return Type: boolean

ZenScript
Copy
// DamageSource.isMagic() as boolean

myDamageSource.isMagic();

Link to g--15

Name: isNoAggro

Return Type: boolean

ZenScript
Copy
// DamageSource.isNoAggro() as boolean

myDamageSource.isNoAggro();

Link to g--16

Name: isProjectile

Return Type: boolean

ZenScript
Copy
// DamageSource.isProjectile() as boolean

myDamageSource.isProjectile();

Link to g--17

Name: scalesWithDifficulty

Return Type: boolean

ZenScript
Copy
// DamageSource.scalesWithDifficulty() as boolean

myDamageSource.scalesWithDifficulty();

Link to g--18

Name: setExplosion

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setExplosion() as DamageSource

myDamageSource.setExplosion();

Link to g--19

Name: setIsFall

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setIsFall() as DamageSource

myDamageSource.setIsFall();

Name: setMagic

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setMagic() as DamageSource

myDamageSource.setMagic();

Link to g--21

Name: setNoAggro

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setNoAggro() as DamageSource

myDamageSource.setNoAggro();

Link to g--22

Name: setProjectile

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setProjectile() as DamageSource

myDamageSource.setProjectile();

Link to g--23

Name: setScalesWithDifficulty

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setScalesWithDifficulty() as DamageSource

myDamageSource.setScalesWithDifficulty();
NameTypeHas GetterHas SetterDescription
Name
directEntity
Type
Entity
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
doesBypassArmor
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
doesBypassInvul
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
doesBypassMagic
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
doesDamageHelmet
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
entity
Type
Entity
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
foodExhaustion
Type
float
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
isCreativePlayer
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
isExplosion
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
isFall
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
isFire
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
isMagic
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
isNoAggro
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
isProjectile
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
msgId
Type
string
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
scalesWithDifficulty
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
source
Type
Vec3
Has Getter
true
Has Setter
false
Description
No Description Provided