Pattern variables and fix logic

This commit is contained in:
koolkrafter5 committed 2025-10-08 01:25:12 -04:00
1 parent 0d1393f333
commit 96b4d8d7da
1 file changed
+6 -6
@@ -495,12 +495,12 @@ public class FMEventHandler {
}
}
if (event.source.getEntity() instanceof EntityPlayer) {
ItemStack equip = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
if (equip != null && equip.getItem() instanceof ItemWandCasting) {
String capTag = ((ItemWandCasting) equip.getItem()).getCap(equip).getTag();
if (capTag.equals("alchemical") || capTag.equals("blood_iron")
&& ((ItemWandCasting) equip.getItem()).getRod(equip).getTag().startsWith("blood")) {
if (event.source.getEntity() instanceof EntityPlayer player) {
ItemStack equip = player.getCurrentEquippedItem();
if (equip != null && equip.getItem() instanceof ItemWandCasting wand) {
String capTag = wand.getCap(equip).getTag();
if ((capTag.equals("alchemical") || capTag.equals("blood_iron"))
&& wand.getRod(equip).getTag().startsWith("blood")) {
event.entityLiving.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
}
}