From ca7f1cc8cafa679a231f259ba72b4176b06de697 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Sun, 20 Jun 2021 23:44:04 +0100 Subject: [PATCH] Prevent Hyeleth's amulet from casting the shield spell from a scroll, fixes #680 --- src/main/java/electroblob/wizardry/item/ItemArtefact.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/electroblob/wizardry/item/ItemArtefact.java b/src/main/java/electroblob/wizardry/item/ItemArtefact.java index a286dd91..b6be7218 100644 --- a/src/main/java/electroblob/wizardry/item/ItemArtefact.java +++ b/src/main/java/electroblob/wizardry/item/ItemArtefact.java @@ -344,6 +344,8 @@ public class ItemArtefact extends Item { findMatchingWandAndExecute(player, Spells.shield, wand -> { + if(wand.getItem() instanceof ItemScroll) return; // Ignore scrolls since they shouldn't work + List projectiles = EntityUtils.getEntitiesWithinRadius(5, player.posX, player.posY, player.posZ, world, Entity.class); projectiles.removeIf(e -> !(e instanceof IProjectile)); Vec3d look = player.getLookVec();