Skip to content

Commit

Permalink
add a way to check if a MCTag is a certain type of tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredlll08 committed Feb 7, 2020
1 parent 457020b commit 10a2b04
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main/java/com/blamejared/crafttweaker/impl/tag/MCTag.java
Expand Up @@ -157,6 +157,23 @@ public boolean matches(IItemStack stack) {
return false;
}


@ZenCodeType.Getter("isItemTag")
public boolean isItemTag() {
return getItemTag() != null;
}

@ZenCodeType.Getter("isBlockTag")
public boolean isBlockTag() {
return getBlockTag() != null;
}

@ZenCodeType.Getter("isEntityTypeTag")
public boolean isEntityTypeTag() {
return getEntityTypeTag() != null;
}


@Override
public Ingredient asVanillaIngredient() {
return Ingredient.fromTag(getItemTag());
Expand Down

0 comments on commit 10a2b04

Please sign in to comment.