API improvements to spell books:
- Allow spells to set which book/scroll items they can appear on - Allow spell books to set custom GUI textures - Tweaks to loot functions and wizards to accommodate the changes
This commit is contained in:
@@ -115,6 +115,7 @@ public class RandomSpell extends LootFunction {
|
||||
// the spell randomiser use any element) change the overall outcome at all?
|
||||
List<Spell> spellsList = Spell.getSpells(new Spell.TierElementFilter(tier, element, spellContext));
|
||||
|
||||
spellsList.removeIf(s -> !s.applicableForItem(stack.getItem()));
|
||||
if(stack.getItem() instanceof ItemScroll) spellsList.removeIf(s -> !s.isEnabled(SpellProperties.Context.SCROLL));
|
||||
if(stack.getItem() instanceof ItemSpellBook) spellsList.removeIf(s -> !s.isEnabled(SpellProperties.Context.BOOK));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user