Импорт класса

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
Copy
import crafttweaker.api.world.DamageSource;

Name: arrow

Return Type: DamageSource

ZenScript
Copy
DamageSource.arrow(arrow as Arrow, owner as Entity?) as DamageSource
ПараметрТипОписание
Параметр
arrow
Тип
Arrow
Описание
No Description Provided
Параметр
owner
Тип
Entity?
Описание
No Description Provided

Link to badRespawnPointExplosion

Name: badRespawnPointExplosion

Return Type: DamageSource

ZenScript
Copy
// DamageSource.badRespawnPointExplosion() as DamageSource

DamageSource.badRespawnPointExplosion();

Name: explosion

Return Type: DamageSource

ZenScript
Copy
DamageSource.explosion(explosion as Explosion?) as DamageSource
ПараметрТипОписание
Параметр
explosion
Тип
Explosion?
Описание
No Description Provided

Name: explosion

Return Type: DamageSource

ZenScript
Copy
DamageSource.explosion(owner as LivingEntity?) as DamageSource
ПараметрТипОписаниеOptionalDefaultValue
Параметр
owner
Тип
LivingEntity?
Описание
No Description Provided
Optional
true
DefaultValue

Name: fireball

Return Type: DamageSource

ZenScript
Copy
DamageSource.fireball(fireball as Fireball, owner as Entity?) as DamageSource
ПараметрТипОписание
Параметр
fireball
Тип
Fireball
Описание
No Description Provided
Параметр
owner
Тип
Entity?
Описание
No Description Provided

Name: fireworks

Return Type: DamageSource

ZenScript
Copy
DamageSource.fireworks(entity as FireworkRocketEntity, owner as Entity?) as DamageSource
ПараметрТипОписание
Параметр
entity
Тип
FireworkRocketEntity
Описание
No Description Provided
Параметр
owner
Тип
Entity?
Описание
No Description Provided

Name: indirectMagic

Return Type: DamageSource

ZenScript
Copy
DamageSource.indirectMagic(entity as Entity, owner as Entity?) as DamageSource
ПараметрТипОписание
Параметр
entity
Тип
Entity
Описание
No Description Provided
Параметр
owner
Тип
Entity?
Описание
No Description Provided

Link to indirectMobAttack

Name: indirectMobAttack

Return Type: DamageSource

ZenScript
Copy
DamageSource.indirectMobAttack(entity as Entity, owner as LivingEntity?) as DamageSource
ПараметрТипОписание
Параметр
entity
Тип
Entity
Описание
No Description Provided
Параметр
owner
Тип
LivingEntity?
Описание
No Description Provided

Name: mobAttack

Return Type: DamageSource

ZenScript
Copy
DamageSource.mobAttack(living as LivingEntity) as DamageSource
ПараметрТипОписание
Параметр
living
Тип
LivingEntity
Описание
No Description Provided

Name: playerAttack

Return Type: DamageSource

ZenScript
Copy
DamageSource.playerAttack(player as Player) as DamageSource
ПараметрТипОписание
Параметр
player
Тип
Player
Описание
No Description Provided

Name: string

Return Type: DamageSource

ZenScript
Copy
DamageSource.string(living as LivingEntity) as DamageSource
ПараметрТипОписание
Параметр
living
Тип
LivingEntity
Описание
No Description Provided

Name: thorns

Return Type: DamageSource

ZenScript
Copy
DamageSource.thorns(entity as Entity) as DamageSource
ПараметрТипОписание
Параметр
entity
Тип
Entity
Описание
No Description Provided

Name: thrown

Return Type: DamageSource

ZenScript
Copy
DamageSource.thrown(entity as Entity, owner as Entity?) as DamageSource
ПараметрТипОписание
Параметр
entity
Тип
Entity
Описание
No Description Provided
Параметр
owner
Тип
Entity?
Описание
No Description Provided

Name: trident

Return Type: DamageSource

ZenScript
Copy
DamageSource.trident(entity as Entity, owner as Entity?) as DamageSource
ПараметрТипОписание
Параметр
entity
Тип
Entity
Описание
No Description Provided
Параметр
owner
Тип
Entity?
Описание
No Description Provided

Name: witherSkull

Return Type: DamageSource

ZenScript
Copy
DamageSource.witherSkull(witherSkull as WitherSkull, owner as Entity?) as DamageSource
ПараметрТипОписание
Параметр
witherSkull
Тип
WitherSkull
Описание
No Description Provided
Параметр
owner
Тип
Entity?
Описание
No Description Provided

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

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
directEntity
Тип
Entity?
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
doesBypassArmor
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
doesBypassInvul
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
doesBypassMagic
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
doesDamageHelmet
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
entity
Тип
Entity?
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
foodExhaustion
Тип
float
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
isCreativePlayer
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
isExplosion
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
isFall
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
isFire
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
isMagic
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
isNoAggro
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
isProjectile
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
msgId
Тип
string
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
scalesWithDifficulty
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
источник
Тип
Vec3?
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided