Improve bookshelf search and account for undiscovered spells

This commit is contained in:
Electroblob77
2020-04-04 21:32:57 +01:00
parent 71302b3219
commit a67eb2381d
4 changed files with 65 additions and 16 deletions
@@ -79,6 +79,7 @@ import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import org.lwjgl.input.Keyboard;
import javax.annotation.Nullable;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.List;
@@ -208,7 +209,7 @@ public class ClientProxy extends CommonProxy {
// ===============================================================================================================
@Override
public boolean shouldDisplayDiscovered(Spell spell, ItemStack stack){
public boolean shouldDisplayDiscovered(Spell spell, @Nullable ItemStack stack){
EntityPlayerSP player = Minecraft.getMinecraft().player;