Use the same test in the new spell icon as the new spell book tooltip

This commit is contained in:
Electroblob77
2020-07-15 00:21:37 +01:00
parent 2e3df272ec
commit a945201cec
@@ -95,9 +95,11 @@ public class WizardTradeTweaksHandler {
if(recipe != null && recipe.getItemToSell().getItem() instanceof ItemSpellBook){
EntityPlayer player = Minecraft.getMinecraft().player;
Spell spell = Spell.byMetadata(recipe.getItemToSell().getMetadata());
if(!WizardData.get(player).hasSpellBeenDiscovered(Spell.byMetadata(recipe.getItemToSell().getMetadata()))){
if(Wizardry.settings.discoveryMode && !player.isCreative() && Wizardry.proxy.shouldDisplayDiscovered(spell, recipe.getItemToSell())
&& WizardData.get(player) != null && !WizardData.get(player).hasSpellBeenDiscovered(spell)){
int x = gui.inventorySlots.getSlot(2).xPos + 14;
int y = gui.inventorySlots.getSlot(2).yPos - 17;