Skip to content

Commit

Permalink
Have heart-drops respect the doMobLoot gamerule #1386
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Feb 12, 2015
1 parent 53999ba commit 48ac94e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/tconstruct/armor/TinkerArmorEvents.java
Expand Up @@ -26,6 +26,9 @@ public void onLivingDrop (LivingDropsEvent event)
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);
Expand Down

0 comments on commit 48ac94e

Please sign in to comment.