Skip to content

Commit

Permalink
Add cuboid.min, cuboid.max
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 9, 2013
1 parent a0d0dff commit 1551289
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/dCuboid.java
Expand Up @@ -439,6 +439,24 @@ public String getAttribute(Attribute attribute) {
.getAttribute(attribute.fulfill(1));
}

// <--[tag]
// @attribute <cu@cuboid.min>
// @returns dLocation
// @description Returns the lowest-numbered corner location.
// -->
if (attribute.startsWith("min")) {
return loc_1.getAttribute(attribute.fulfill(1));
}

// <--[tag]
// @attribute <cu@cuboid.max>
// @returns dLocation
// @description Returns the highest-numbered corner location.
// -->
if (attribute.startsWith("max")) {
return loc_2.getAttribute(attribute.fulfill(1));
}

return new Element(identify()).getAttribute(attribute.fulfill(0));
}

Expand Down

0 comments on commit 1551289

Please sign in to comment.