WitherSkull
Link to witherskull
导入类
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.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 Copynew 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. |
使用方式
Link to 使用方式
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. |