Skip to content

Commit

Permalink
Address issues raised by Kindlich.
Browse files Browse the repository at this point in the history
  • Loading branch information
noobanidus committed Apr 11, 2020
1 parent ecbfbd0 commit e2d34b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ public interface IItemStack extends IIngredient {
* @return Whether or not the item linked to this stack is an itemblock.
*/
@ZenGetter("isItemBlock")
boolean isItemBlock();
default boolean isItemBlock() {
CraftTweakerAPI.logError("Class " + this.getClass().getCanonicalName() + " doesns't override IItemStack::isItemBlock!");
return false;
}

/**
* Gets the unlocalized item name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ public IItemDefinition getDefinition() {

@Override
public boolean isItemBlock() {
if (stack.isEmpty()) {
return false;
}

return stack.getItem() instanceof ItemBlock;
}

Expand Down

0 comments on commit e2d34b6

Please sign in to comment.