Skip to content

Commit

Permalink
Add dEntity.tame mechanism
Browse files Browse the repository at this point in the history
Just a quick mech to tame entities.
... mechanisms need quite a bit of cleaning. Will do that soon if not
done by someone else first.
  • Loading branch information
mcmonkey4eva committed Dec 12, 2013
1 parent 87ccf75 commit cb700d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/dEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1821,6 +1821,19 @@ public void adjust(Mechanism mechanism, Element value) {
if (mechanism.matches("remaining_air"))
getLivingEntity().setRemainingAir(value.asInt());

// <--[mechanism]
// @object dEntity
// @name tame
// @input Element(Boolean)
// @description
// Sets whether the entity is considered tame.
// @tags
// <e@entity.is_tamed>
// <e@entity.is_tameable>
// -->
if (mechanism.matches("tame")) // TODO: Verify that entity is tameable first
((Tameable)getLivingEntity()).setTamed(value.asBoolean());


}

Expand Down

0 comments on commit cb700d8

Please sign in to comment.