Skip to content

Commit

Permalink
fix scroll forge only allowing one result to be taken
Browse files Browse the repository at this point in the history
  • Loading branch information
iron431 committed Jul 17, 2024
1 parent b477ef2 commit 6c959a4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected void onTake(Player p_150601_, ItemStack p_150602_) {
level.playSound(null, pos, SoundEvents.ANVIL_USE, SoundSource.BLOCKS, .8f, 1.1f);
level.playSound(null, pos, SoundEvents.AMETHYST_BLOCK_BREAK, SoundSource.BLOCKS, 1f, 1f);
});
createResult();
}

@Override
Expand All @@ -70,7 +71,8 @@ public void createResult() {
var baseRarity = spell1.getRarity();
var nextRarity = spell1.getSpell().getRarity(spell1.getLevel() + 1);
if (nextRarity.equals(inkItem.getRarity())) {
result = new ItemStack(ItemRegistry.SCROLL.get());
result = baseItemStack.copy();
result.setCount(1);
ISpellContainer.createScrollContainer(spell1.getSpell(), spell1.getLevel() + 1, result);
}
}
Expand Down

0 comments on commit 6c959a4

Please sign in to comment.