Post-merge fixups
In particular, act as if a spellbook has been discovered during tooltip generation if player is null. This allows JEI to index all the spell names.
This commit is contained in:
@@ -62,12 +62,11 @@ public class ItemSpellBook extends Item {
|
||||
// Tooltip is left blank for wizards buying generic spell books.
|
||||
if(itemstack.getItemDamage() != OreDictionary.WILDCARD_VALUE){
|
||||
EntityPlayerSP player = Minecraft.getMinecraft().player;
|
||||
if (player == null) { return; }
|
||||
|
||||
|
||||
Spell spell = Spell.get(itemstack.getItemDamage());
|
||||
|
||||
boolean discovered = true;
|
||||
if(Wizardry.settings.discoveryMode && !player.capabilities.isCreativeMode && WizardData.get(player) != null
|
||||
if(player != null && Wizardry.settings.discoveryMode && !player.capabilities.isCreativeMode && WizardData.get(player) != null
|
||||
&& !WizardData.get(player).hasSpellBeenDiscovered(spell)){
|
||||
discovered = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user