Have heart-drops respect the doMobLoot gamerule #1386

This commit is contained in:
Bernhard Bonigl committed 2015-02-12 10:22:01 +01:00
1 parent 53999baa28
commit 48ac94e2cf
1 file changed
+3
@@ -26,6 +26,9 @@ public class TinkerArmorEvents
if (event.entityLiving == null)
return;
if(!event.entityLiving.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot"))
return;
if (TConstruct.random.nextInt(200) == 0 && event.entityLiving instanceof IMob && event.source.damageType.equals("player"))
{
ItemStack dropStack = new ItemStack(TinkerArmor.heartCanister, 1, 1);