Skip to content

Commit

Permalink
add entity mech polar_bear_standing
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 15, 2021
1 parent 5acb55e commit 1f97439
Showing 1 changed file with 13 additions and 0 deletions.
@@ -1,5 +1,6 @@
package com.denizenscript.denizen.objects;

import com.denizenscript.denizen.nms.interfaces.EntityAnimation;
import com.denizenscript.denizen.nms.interfaces.PlayerHelper;
import com.denizenscript.denizen.objects.properties.entity.EntityAge;
import com.denizenscript.denizen.objects.properties.entity.EntityColor;
Expand Down Expand Up @@ -3284,6 +3285,18 @@ else if (getBukkitEntity() instanceof Creeper) {
NMSHandler.getEntityHelper().setHeadAngle(getBukkitEntity(), mechanism.getValue().asFloat());
}

// <--[mechanism]
// @object EntityTag
// @name polar_bear_standing
// @input ElementTag(Boolean)
// @description
// Sets whether the polar bear entity should stand up.
// -->
if (mechanism.matches("polar_bear_standing") && mechanism.requireBoolean()) {
EntityAnimation entityAnimation = NMSHandler.getAnimationHelper().getEntityAnimation(mechanism.getValue().asBoolean() ? "POLAR_BEAR_START_STANDING" : "POLAR_BEAR_STOP_STANDING");
entityAnimation.play(entity);
}

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

0 comments on commit 1f97439

Please sign in to comment.