Skip to content

Commit

Permalink
Add a data mech to dLocation
Browse files Browse the repository at this point in the history
Yay for advanced internal control!
  • Loading branch information
mcmonkey4eva committed Jan 10, 2015
1 parent c96727e commit 09b0a86
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/dLocation.java
Expand Up @@ -1636,6 +1636,19 @@ && getBlock().getState() instanceof CreatureSpawner) {
}
}

// <--[mechanism]
// @object dLocation
// @name data
// @input Element(Number)
// @description
// Sets the data-value of a block.
// @tags
// <l@location.material.data>
// -->
if (mechanism.matches("data") && mechanism.hasValue()) {
getBlock().setData((byte)value.asInt());
}

if (!mechanism.fulfilled())
mechanism.reportInvalid();
}
Expand Down

0 comments on commit 09b0a86

Please sign in to comment.