mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-14 01:14:18 +00:00
Knapsacks drop items in the proper spot
This commit is contained in:
1 parent
56c1cec850
commit
71ba72abab
1 file changed
+7
-16
@@ -410,21 +410,6 @@ public class TEventHandler
|
||||
}
|
||||
}
|
||||
|
||||
/*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);
|
||||
@@ -434,6 +419,12 @@ public class TEventHandler
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onLivingDeath(LivingDeathEvent event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void addDrops(LivingDropsEvent event, ItemStack dropStack)
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack);
|
||||
@@ -462,7 +453,7 @@ public class TEventHandler
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user