Skip to content

Commit

Permalink
fix: divination rod JEI recipes not showing if IE and NERB are both p…
Browse files Browse the repository at this point in the history
…resent
  • Loading branch information
klikli-dev committed Jun 3, 2023
1 parent 9186166 commit 57bea42
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,10 @@ public Component getName(ItemStack pStack) {
}

@Override
public @Nullable ICapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundTag nbt) {
var tag = stack.getOrCreateTag();
public void verifyTagAfterLoad(CompoundTag tag) {
//moved from initCapabilities, because that is now lazy loaded.
//that lazy load caused: https://github.com/klikli-dev/theurgy/issues/117
//Issue explained very well here: https://github.com/BluSunrize/ImmersiveEngineering/issues/5708#issuecomment-1574885125

//fill in any nbt that is not provided by the recipe with default values
if (!tag.contains(TheurgyConstants.Nbt.Divination.SETTING_TIER))
Expand All @@ -346,7 +348,7 @@ public Component getName(ItemStack pStack) {
if (!tag.contains(TheurgyConstants.Nbt.Divination.SETTING_ALLOW_ATTUNING))
tag.putBoolean(TheurgyConstants.Nbt.Divination.SETTING_ALLOW_ATTUNING, this.defaultAllowAttuning);

return super.initCapabilities(stack, nbt);
super.verifyTagAfterLoad(tag);
}

@Override
Expand Down

0 comments on commit 57bea42

Please sign in to comment.