Skip to content

Commit

Permalink
add entitytag ignite mechanism for creepers
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 15, 2021
1 parent 55da361 commit 7b62812
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Expand Up @@ -482,8 +482,4 @@ public void setHeadAngle(Entity entity, float angle) {
public void setGhastAttacking(Entity entity, boolean attacking) {
throw new UnsupportedOperationException();
}

public boolean isGhastAttacking(Entity entity) {
throw new UnsupportedOperationException();
}
}
Expand Up @@ -3273,6 +3273,22 @@ else if (getBukkitEntity() instanceof Creeper) {
}
}

// <--[mechanism]
// @object EntityTag
// @name ignite
// @input None
// @description
// If the entity is a creeper, ignites it.
// -->
if (mechanism.matches("ignite")) {
if (getBukkitEntity() instanceof Creeper) {
((Creeper) getBukkitEntity()).ignite();
}
else {
Debug.echoError("Cannot ignite entity of type '" + getBukkitEntityType().name() + "'.");
}
}

// <--[mechanism]
// @object EntityTag
// @name head_angle
Expand Down

0 comments on commit 7b62812

Please sign in to comment.