why are you still on 1.7.10 ??
edit this is the code you need but you need to be on 1.10.2
@SubscribeEvent
public void itemDespawnEvent(ItemExpireEvent event){
BlockPos pos = new BlockPos(event.getEntity().posX ,event.getEntity().posY, event.getEntity().posZ);
event.getEntity().worldObj.setBlockState(pos,Blocks.CHEST.getDefaultState());
TileEntity tile = event.getEntity().worldObj.getTileEntity(pos);
IItemHandler handler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP);
handler.insertItem(0, event.getEntityItem().getEntityItem(), false);
}