Importing the class

Link to importing-the-class

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

ZenScript
Copy
new WitherSkull(level as Level, owner as LivingEntity, direction as Vec3) as WitherSkull
new WitherSkull(level, entity, new Vec3(1, 2, 3));
ParameterTypeDescription
Parameter
level
Type
Level
Description
The level the entity is in.
Parameter
owner
Type
LivingEntity
Description
The owner of the skull, used for position.
Parameter
direction
Type
Vec3
Description
The direction that the skull is moving in

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);
ParameterType
Parameter
dangerous
Type
boolean
NameTypeHas GetterHas SetterDescription
Name
isDangerous
Type
boolean
Has Getter
true
Has Setter
true
Description
Gets whether this skull is dangerous or not.