Skip to content

Commit

Permalink
Knapsacks drop items in the proper spot
Browse files Browse the repository at this point in the history
  • Loading branch information
mDiyo committed Sep 5, 2013
1 parent 56c1cec commit 71ba72a
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/tconstruct/util/TEventHandler.java
Expand Up @@ -410,28 +410,19 @@ else if (event.source.damageType.equals("player"))
}
}

/*if (!player.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
if (!player.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
{
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username);
stats.armor.dropItems();
stats.knapsack.dropItems();
}*/
}
}
}

@ForgeSubscribe
public void onLivingDeath(LivingDeathEvent event)
{
if (event.entityLiving instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.entityLiving;
if (!player.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
{
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username);
stats.armor.dropItems();
stats.knapsack.dropItems();
}
}

}

void addDrops(LivingDropsEvent event, ItemStack dropStack)
Expand Down Expand Up @@ -462,7 +453,7 @@ public void onLivingSpawn(LivingSpawnEvent.SpecialSpawn event)
creeper.mountEntity(living.riddenByEntity);
else
creeper.mountEntity(living);

EntityXPOrb orb = new EntityXPOrb(living.worldObj, living.posX, living.posY, living.posZ, random.nextInt(20) + 20);
orb.mountEntity(creeper);
}
Expand Down

0 comments on commit 71ba72a

Please sign in to comment.