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;

Name: getDirectEntity

Return Type: Entity

ZenScript
Copy
// DamageSource.getDirectEntity() as Entity

myDamageSource.getDirectEntity();

Name: getEntity

Return Type: Entity

ZenScript
Copy
// DamageSource.getEntity() as Entity

myDamageSource.getEntity();

Link to getFoodExhaustion

Name: getFoodExhaustion

Return Type: float

ZenScript
Copy
// DamageSource.getFoodExhaustion() as float

myDamageSource.getFoodExhaustion();

Link to getLocalizedDeathMessage

Name: getLocalizedDeathMessage

Return Type: Component

ZenScript
Copy
DamageSource.getLocalizedDeathMessage(entity as LivingEntity) as Component
参数类型描述
参数
entity
类型
LivingEntity
描述
No Description Provided

Name: getMsgId

Return Type: string

ZenScript
Copy
// DamageSource.getMsgId() as string

myDamageSource.getMsgId();

Link to getSourcePosition

Name: getSourcePosition

Return Type: Vec3

ZenScript
Copy
// DamageSource.getSourcePosition() as Vec3

myDamageSource.getSourcePosition();

Name: isBypassArmor

Return Type: boolean

ZenScript
Copy
// DamageSource.isBypassArmor() as boolean

myDamageSource.isBypassArmor();

Name: isBypassInvul

Return Type: boolean

ZenScript
Copy
// DamageSource.isBypassInvul() as boolean

myDamageSource.isBypassInvul();

Name: isBypassMagic

Return Type: boolean

ZenScript
Copy
// DamageSource.isBypassMagic() as boolean

myDamageSource.isBypassMagic();

Link to isCreativePlayer

Name: isCreativePlayer

Return Type: boolean

ZenScript
Copy
// DamageSource.isCreativePlayer() as boolean

myDamageSource.isCreativePlayer();

Name: isDamageHelmet

Return Type: boolean

ZenScript
Copy
// DamageSource.isDamageHelmet() as boolean

myDamageSource.isDamageHelmet();

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();

Name: isNoAggro

Return Type: boolean

ZenScript
Copy
// DamageSource.isNoAggro() as boolean

myDamageSource.isNoAggro();

Name: isProjectile

Return Type: boolean

ZenScript
Copy
// DamageSource.isProjectile() as boolean

myDamageSource.isProjectile();

Link to scalesWithDifficulty

Name: scalesWithDifficulty

Return Type: boolean

ZenScript
Copy
// DamageSource.scalesWithDifficulty() as boolean

myDamageSource.scalesWithDifficulty();

Name: setExplosion

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setExplosion() as DamageSource

myDamageSource.setExplosion();

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();

Name: setNoAggro

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setNoAggro() as DamageSource

myDamageSource.setNoAggro();

Name: setProjectile

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setProjectile() as DamageSource

myDamageSource.setProjectile();

Link to setScalesWithDifficulty

Name: setScalesWithDifficulty

Return Type: DamageSource

ZenScript
Copy
// DamageSource.setScalesWithDifficulty() as DamageSource

myDamageSource.setScalesWithDifficulty();
名称类型可获得可设置描述
名称
directEntity
类型
Entity
可获得
true
可设置
false
描述
No Description Provided
名称
doesBypassArmor
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
doesBypassInvul
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
doesBypassMagic
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
doesDamageHelmet
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
entity
类型
Entity
可获得
true
可设置
false
描述
No Description Provided
名称
foodExhaustion
类型
浮点数
可获得
true
可设置
false
描述
No Description Provided
名称
isCreativePlayer
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isExplosion
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isFall
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isFire
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isMagic
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isNoAggro
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isProjectile
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
msgId
类型
string
可获得
true
可设置
false
描述
No Description Provided
名称
scalesWithDifficulty
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
来源
类型
Vec3
可获得
true
可设置
false
描述
No Description Provided