DamageSource
Link to damagesource
Импорт класса
Link to импорт-класса
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 Copyimport crafttweaker.api.world.DamageSource;
Static Methods
Link to static-methods
Name: arrow
Return Type: DamageSource
ZenScript CopyDamageSource.arrow(arrow as Arrow, owner as Entity?) as DamageSource
Параметр | Тип |
---|---|
Параметр arrow | Тип Arrow |
Параметр owner | Тип Entity? |
Name: badRespawnPointExplosion
Return Type: DamageSource
ZenScript Copy// DamageSource.badRespawnPointExplosion() as DamageSource
DamageSource.badRespawnPointExplosion();
Name: explosion
Return Type: DamageSource
ZenScript CopyDamageSource.explosion(explosion as Explosion?) as DamageSource
Параметр | Тип |
---|---|
Параметр explosion | Тип Explosion? |
Name: explosion
Return Type: DamageSource
ZenScript CopyDamageSource.explosion(owner as LivingEntity?) as DamageSource
Параметр | Тип | Optional |
---|---|---|
Параметр owner | Тип LivingEntity? | Optional true |
Name: fireball
Return Type: DamageSource
ZenScript CopyDamageSource.fireball(fireball as Fireball, owner as Entity?) as DamageSource
Параметр | Тип |
---|---|
Параметр fireball | Тип Fireball |
Параметр owner | Тип Entity? |
Name: fireworks
Return Type: DamageSource
ZenScript CopyDamageSource.fireworks(entity as FireworkRocketEntity, owner as Entity?) as DamageSource
Параметр | Тип |
---|---|
Параметр entity | Тип FireworkRocketEntity |
Параметр owner | Тип Entity? |
Name: indirectMagic
Return Type: DamageSource
ZenScript CopyDamageSource.indirectMagic(entity as Entity, owner as Entity?) as DamageSource
Параметр | Тип |
---|---|
Параметр entity | Тип Entity |
Параметр owner | Тип Entity? |
Name: indirectMobAttack
Return Type: DamageSource
ZenScript CopyDamageSource.indirectMobAttack(entity as Entity, owner as LivingEntity?) as DamageSource
Параметр | Тип |
---|---|
Параметр entity | Тип Entity |
Параметр owner | Тип LivingEntity? |
Name: mobAttack
Return Type: DamageSource
ZenScript CopyDamageSource.mobAttack(living as LivingEntity) as DamageSource
Параметр | Тип |
---|---|
Параметр living | Тип LivingEntity |
Name: playerAttack
Return Type: DamageSource
ZenScript CopyDamageSource.playerAttack(player as Player) as DamageSource
Параметр | Тип |
---|---|
Параметр player | Тип Player |
Name: string
Return Type: DamageSource
ZenScript CopyDamageSource.string(living as LivingEntity) as DamageSource
Параметр | Тип |
---|---|
Параметр living | Тип LivingEntity |
Name: thorns
Return Type: DamageSource
ZenScript CopyDamageSource.thorns(entity as Entity) as DamageSource
Параметр | Тип |
---|---|
Параметр entity | Тип Entity |
Name: thrown
Return Type: DamageSource
ZenScript CopyDamageSource.thrown(entity as Entity, owner as Entity?) as DamageSource
Параметр | Тип |
---|---|
Параметр entity | Тип Entity |
Параметр owner | Тип Entity? |
Name: trident
Return Type: DamageSource
ZenScript CopyDamageSource.trident(entity as Entity, owner as Entity?) as DamageSource
Параметр | Тип |
---|---|
Параметр entity | Тип Entity |
Параметр owner | Тип Entity? |
Name: witherSkull
Return Type: DamageSource
ZenScript CopyDamageSource.witherSkull(witherSkull as WitherSkull, owner as Entity?) as DamageSource
Параметр | Тип |
---|---|
Параметр witherSkull | Тип WitherSkull |
Параметр owner | Тип Entity? |
Методы
Link to методы
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();
Name: getFoodExhaustion
Return Type: float
ZenScript Copy// DamageSource.getFoodExhaustion() as float
myDamageSource.getFoodExhaustion();
Name: getLocalizedDeathMessage
Return Type: Component
ZenScript CopyDamageSource.getLocalizedDeathMessage(entity as LivingEntity) as Component
Параметр | Тип |
---|---|
Параметр entity | Тип LivingEntity |
Name: getMsgId
Return Type: string
ZenScript Copy// DamageSource.getMsgId() as string
myDamageSource.getMsgId();
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();
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();
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();
Name: setScalesWithDifficulty
Return Type: DamageSource
ZenScript Copy// DamageSource.setScalesWithDifficulty() as DamageSource
myDamageSource.setScalesWithDifficulty();
Свойства
Link to свойства
Название | Тип | Имеет Getter | Имеет Setter |
---|---|---|---|
Название directEntity | Тип Entity? | Имеет Getter true | Имеет Setter false |
Название doesBypassArmor | Тип boolean | Имеет Getter true | Имеет Setter false |
Название doesBypassInvul | Тип boolean | Имеет Getter true | Имеет Setter false |
Название doesBypassMagic | Тип boolean | Имеет Getter true | Имеет Setter false |
Название doesDamageHelmet | Тип boolean | Имеет Getter true | Имеет Setter false |
Название entity | Тип Entity? | Имеет Getter true | Имеет Setter false |
Название foodExhaustion | Тип float | Имеет Getter true | Имеет Setter false |
Название isCreativePlayer | Тип boolean | Имеет Getter true | Имеет Setter false |
Название isExplosion | Тип boolean | Имеет Getter true | Имеет Setter false |
Название isFall | Тип boolean | Имеет Getter true | Имеет Setter false |
Название isFire | Тип boolean | Имеет Getter true | Имеет Setter false |
Название isMagic | Тип boolean | Имеет Getter true | Имеет Setter false |
Название isNoAggro | Тип boolean | Имеет Getter true | Имеет Setter false |
Название isProjectile | Тип boolean | Имеет Getter true | Имеет Setter false |
Название msgId | Тип string | Имеет Getter true | Имеет Setter false |
Название scalesWithDifficulty | Тип boolean | Имеет Getter true | Имеет Setter false |
Название источник | Тип Vec3? | Имеет Getter true | Имеет Setter false |