From 3ce6735920179f83f3a83b76ed8aa889b3c794e9 Mon Sep 17 00:00:00 2001 From: Nicholas Ignoffo Date: Mon, 9 May 2016 16:38:43 -0700 Subject: [PATCH] Allow Demonic Will to drop from passive mobs in Peaceful (#733) Goes along with b2d1b75f49a138a0422dd144a97ad0f3a7311676 and #711 --- .../java/WayofTime/bloodmagic/util/handler/EventHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java index c6a6ae8c..6bcf2da1 100644 --- a/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java +++ b/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java @@ -30,6 +30,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.EnumDifficulty; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.AnvilUpdateEvent; @@ -798,7 +799,7 @@ public class EventHandler DamageSource source = event.getSource(); Entity entity = source.getEntity(); - if (attackedEntity.isPotionActive(ModPotions.soulSnare) && attackedEntity instanceof EntityMob) + if (attackedEntity.isPotionActive(ModPotions.soulSnare) && (attackedEntity instanceof EntityMob || attackedEntity.worldObj.getDifficulty() == EnumDifficulty.PEACEFUL)) { PotionEffect eff = attackedEntity.getActivePotionEffect(ModPotions.soulSnare); int lvl = eff.getAmplifier();