Skip to content

Commit

Permalink
add tag material.is_item
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 30, 2019
1 parent f76f29f commit 94a4518
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -611,6 +611,18 @@ public static void registerTags() {
return new ElementTag(object.material.isBlock());
});

// <--[tag]
// @attribute <MaterialTag.is_item>
// @returns ElementTag(Boolean)
// @description
// Returns whether the material is a holdable item.
// Note that most blocks are valid items as well.
// This only returns "false" for certain non-holdable "special" blocks, like Fire.
// -->
registerTag("is_item", (attribute, object) -> {
return new ElementTag(object.material.isItem());
});

// <--[tag]
// @attribute <MaterialTag.is_burnable>
// @returns ElementTag(Boolean)
Expand Down

0 comments on commit 94a4518

Please sign in to comment.