Skip to content

Commit

Permalink
yet another NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Jun 6, 2022
1 parent 5fb33e4 commit 4f85586
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ public void wasPlaced(@Nullable LivingEntity livingEntity, ItemStack stack) {
}

private ItemInfo[] fetchKnowledge() {
if (info != null) return info;
return info = ProjectEAPI.getTransmutationProxy().getKnowledgeProviderFor(owner).getKnowledge().toArray(new ItemInfo[0]);
try {
if (info != null) return info;
return info = ProjectEAPI.getTransmutationProxy().getKnowledgeProviderFor(owner).getKnowledge().toArray(new ItemInfo[0]);
} catch (NullPointerException ignore) {
return new ItemInfo[]{};
}
}

private int getMaxCount(int slot) {
Expand Down

0 comments on commit 4f85586

Please sign in to comment.