Skip to content

Commit

Permalink
skip tiers with null inverse tag
Browse files Browse the repository at this point in the history
closes #260
  • Loading branch information
deirn committed May 1, 2024
1 parent 3bfe0a9 commit 4909664
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/mcp/mobius/waila/service/ApiService.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,15 @@ public List<Tier> getTiers() {

for (var item : BuiltInRegistries.ITEM) {
if (item instanceof TieredItem tiered && !(tiered.getTier() instanceof Tiers)) {
custom.add(tiered.getTier());
var tier = tiered.getTier();

//noinspection ConstantValue
if (tier.getIncorrectBlocksForDrops() == null) {
LOG.warn("Found tier of class [{}] with null inverse tag, skipping", tier.getClass().getName());
continue;
}

custom.add(tier);
}
}

Expand Down

0 comments on commit 4909664

Please sign in to comment.