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.entity.type.projectile.WitherSkull;

Extending AbstractHurtingProjectile

Link to extending-abstracthurtingprojectile

WitherSkull extends AbstractHurtingProjectile. That means all methods available in AbstractHurtingProjectile are also available in WitherSkull

Constructor #构造函数

Link to constructor-构造函数

ZenScript
Copy
new WitherSkull(level as Level, owner as LivingEntity, xPower as double, yPower as double, zPower as double) as WitherSkull
new WitherSkull(level, entity, 9, 9, 9);
参数类型描述
参数
level
类型
Level
描述
The level the entity is in.
参数
owner
类型
LivingEntity
描述
The owner of the skull, used for position.
参数
xPower
类型
double
描述
The xPower of the entity.
参数
yPower
类型
double
描述
The yPower of the entity.
参数
zPower
类型
double
描述
The zPower of the entity.

Name: isDangerous

Gets whether this skull is dangerous or not.

Returns: true if dangerous, false otherwise.
Return Type: boolean

ZenScript
Copy
// WitherSkull.isDangerous() as boolean

myWitherSkull.isDangerous();

Name: setDangerous

Sets whether this skull is dangerous or not.

ZenScript
Copy
// WitherSkull.setDangerous(dangerous as boolean)

myWitherSkull.setDangerous(true);
参数类型
参数
dangerous
类型
布尔值
名称类型可获得可设置描述
名称
isDangerous
类型
布尔值
可获得
true
可设置
true
描述
Gets whether this skull is dangerous or not.